Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8241798imu; Fri, 28 Dec 2018 13:30:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN6PuQ10gmFVsdwaJ4EWuevUrzbo40BRXkNWB8OOzzGohif4eeANMioojtpoiTlFBL6kOyun X-Received: by 2002:a63:83c1:: with SMTP id h184mr27513192pge.437.1546032644636; Fri, 28 Dec 2018 13:30:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546032644; cv=none; d=google.com; s=arc-20160816; b=y3COljMnHsItDHHdFQrC7fFDLzXAjpVy29K8SHqvW+wsofua5rZZYpi2gGAe7Lv8ZT cnErDH2Wrj/2+fmVBMbsssrU2L/sIiitKbYE8ARNDdE0bodOkPfJRkABbZURLXXNio83 2S4mQTTTs0pH4gQfa/0lvrfOsIXm5ZfrBy9ISqbKvcq2yBN05fETScKhnK+/iC+lVtUR 4pRjPS5vzihBqvuxWXj6omWZSc4+YQAmiQ6P74dzdgFzc6BN3IJUDgjx/IXKaHPb7O79 LYP7KZCQ6EILoAzrKkHt3JGr1XHqf7aFY2Tm06Rp07oVHG2s8JPk7JBHwtmC04i7xBs2 ytlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=C54x/QDVgkH6UAWjrxZEwnkP4BefYIJPngHnUg2iapg=; b=vkdgd2KnjB+EudtPm0VFxgfSsvz1zSXvPSA7/1MvfBfZz+GXv3HT1+7gMPCf8v8k/k DJY8wm6MQ7ZZO9aR4nsR/NCtDJCed/R6I0NSx885FN8FkF0aLoz4JnY40q2Q6C+/f0e6 vSWoDUPKYK7Ls29I4c/1u1WmuISQ/g/t/muYLESrIVnwGIUEKQn2V1mrXIuoJeN/7vDs UmTVFIhI79B/Bnw19VLaVtagq+r3NRfDexQEi0mVFK7TL9WjTcJEXbGWHHX6CRTY2i3q RKOgkXg7OOi0gjBG8GiE04OEDktEgsh4IT4FY/izkV/02WQEsJgBODrlKw+Ampryrhb/ RVYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n67si39364862pfk.34.2018.12.28.13.30.29; Fri, 28 Dec 2018 13:30:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728147AbeL1Lz5 (ORCPT + 99 others); Fri, 28 Dec 2018 06:55:57 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:34432 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727735AbeL1Lz4 (ORCPT ); Fri, 28 Dec 2018 06:55:56 -0500 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id wBSBrrw9004359; Fri, 28 Dec 2018 05:55:49 -0600 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.cirrus.com Received: from mail1.cirrus.com (mail1.cirrus.com [141.131.3.20]) by mx0b-001ae601.pphosted.com with ESMTP id 2phjjt6tqm-1; Fri, 28 Dec 2018 05:55:49 -0600 Received: from EX17.ad.cirrus.com (unknown [172.20.9.81]) by mail1.cirrus.com (Postfix) with ESMTP id 63DA0611C8B0; Fri, 28 Dec 2018 05:55:49 -0600 (CST) Received: from imbe.wolfsonmicro.main (198.61.95.81) by EX17.ad.cirrus.com (172.20.9.81) with Microsoft SMTP Server id 14.3.408.0; Fri, 28 Dec 2018 11:55:48 +0000 Received: from imbe.wolfsonmicro.main (imbe.wolfsonmicro.main [198.61.95.81]) by imbe.wolfsonmicro.main (8.14.4/8.14.4) with ESMTP id wBSBtm8g031358; Fri, 28 Dec 2018 11:55:48 GMT Date: Fri, 28 Dec 2018 11:55:48 +0000 From: Charles Keepax To: , CC: , Subject: Re: [PATCH] regmap: irq: Make IRQ type support optional Message-ID: <20181228115548.GM16508@imbe.wolfsonmicro.main> References: <20181228112358.5914-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20181228112358.5914-1-ckeepax@opensource.cirrus.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1812280108 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 28, 2018 at 11:23:58AM +0000, Charles Keepax wrote: > Currently only gpio-max77620 is using the type support in regmap IRQ, > but the implementation causes the irq_set_type operation to fail on all > other regmap IRQ chips. Avoid these regressions by skipping the type > handling on any chips that don't define a set of supported types. > > Fixes: 1c2928e3e321 ("regmap: regmap-irq/gpio-max77620: add level-irq support") > Signed-off-by: Charles Keepax > --- > drivers/base/regmap/regmap-irq.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c > index 1bd1145ad8b5e..8c674f1ad0fc8 100644 > --- a/drivers/base/regmap/regmap-irq.c > +++ b/drivers/base/regmap/regmap-irq.c > @@ -257,6 +257,9 @@ static int regmap_irq_set_type(struct irq_data *data, unsigned int type) > int reg; > const struct regmap_irq_type *t = &irq_data->type; > > + if (!t->types_supported) > + return 0; > + > if ((t->types_supported & type) != type) > return -ENOTSUPP; > > -- > 2.11.0 + Matti Vaittinen, apologies for forgetting to include you on the original sending. Thanks, Charles