Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4223928imw; Tue, 12 Jul 2022 04:22:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vL4+L/idDbDLj3jOM36CcjMNNaH7Wzfoos7ZC8GIKiQITQdFLuvVsZdwhdqmKojgCAmt7F X-Received: by 2002:a17:902:9884:b0:16c:281a:4a95 with SMTP id s4-20020a170902988400b0016c281a4a95mr20928025plp.3.1657624955529; Tue, 12 Jul 2022 04:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657624955; cv=none; d=google.com; s=arc-20160816; b=ykaHRwfZ/ZqYOAzbkT+syV9QvahRvdJTcwRbHwBA6xh1R0xpKzi6Nq7XKk92bQP6hA X82olpUJdjPnRz6lcvbuQJXNJ1pV+MeYQG6xZ15ye+jvgkNcjwNvYsobB3x6ACqCUUx3 RUdAfDhyZ/2T8PuIYlpeVBPc30yG3GtGEiepqo4KHWuciUI1UwqCHQGWPbu5udms3vmm CD78V2BjDe/yJE2pkkVQbu/AVvD01WPRaD9BhMfVMAb/ot5yfAwL6PgkhTg5pPzuyOLS D6glnDCdb3x4RRcGB1YzQDMRr7AYJnnczrt1TXF5js3bTzEBbRB08M28G4qnl8bYNl4H YXnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature; bh=y4TUsHm2ys+GyueOCf8Vgfpjx8Jwowe4nr4ZZTuRB4w=; b=wVEkUl35OaUHbKaKKnFwCkcQagrpKH4vDRrk9ITGNDv3axJRBhhZWbMbyaASqY3Q7k jX8AXdcFQxpt0HYbiRLV2K7EKH34DFLjoduJowLgFwT08y43K3ji/GlCOTsb+97Z45oy zBMd5UMjyQgiYV8k856zCXaWhMRtsEA3ZUB1RZVxI8yS5rCS5xpc9G7lFW7vfOpX1sWV EalopJ6hKzTxOPxSiEKAMHdhVS9GuXb/2dgJpr9f4XMUeYAJDg2e1lSwI3POFU/yptKl chSO/Z9n9OtUBtdjMXsC1NRuQp/EyUVgwEWLWvyP19q9b2ZwohwSJkwm3k8OXOOqxwZt 88DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GlTeeEWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ob6-20020a17090b390600b001ef7d50ed03si17158862pjb.131.2022.07.12.04.22.15; Tue, 12 Jul 2022 04:22:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GlTeeEWJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232094AbiGLKmj (ORCPT + 99 others); Tue, 12 Jul 2022 06:42:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbiGLKmh (ORCPT ); Tue, 12 Jul 2022 06:42:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 883B17CB61; Tue, 12 Jul 2022 03:42:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 21E0361844; Tue, 12 Jul 2022 10:42:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75BCAC3411C; Tue, 12 Jul 2022 10:42:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657622554; bh=bym/CE9Aj5kn+/hAjLYdJF+4twPaMd7GMf1jkhpHwrg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GlTeeEWJYhJKaolay+JIdInK+gzOnXlV/OTTielBgCBE9hulI+PBn86NdOLbvkuOA yMjrA84OYGKr1S+LYFZd33krQ85pD2ywVQW3xW/8yBTszd84q165vs1jRRi/Sq5L8s Ee2eIaR7xomm0PBXcFg/t9TuZS/JTncdwV+7dB5CGATj+EqnOeFFzyPc0OUZBZop3K xF3zUzs/WEPNGys6174DCuDJxyFpoxlladDmdvBl9mj8JvcEBffl0R6dLLo3r3Hm69 BkvCjuteqF3Ud1KMc0q1FyZPLorfOT7q3/ef+RK40XY80W1U2RZHfJfJl1n2eM6rtg /zhWO55RK3Ofg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oBDLc-006uBC-E6; Tue, 12 Jul 2022 11:42:32 +0100 Date: Tue, 12 Jul 2022 11:42:32 +0100 Message-ID: <87edyq1ujr.wl-maz@kernel.org> From: Marc Zyngier To: Robert Marko Cc: bjorn.andersson@linaro.org, agross@kernel.org, linus.walleij@linaro.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pinctrl: qcom: spmi-gpio: make the irqchip immutable In-Reply-To: <20220624195112.894916-1-robimarko@gmail.com> References: <20220624195112.894916-1-robimarko@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: robimarko@gmail.com, bjorn.andersson@linaro.org, agross@kernel.org, linus.walleij@linaro.org, linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 24 Jun 2022 20:51:12 +0100, Robert Marko wrote: > > Commit 6c846d026d49 ("gpio: Don't fiddle with irqchips marked as > immutable") added a warning to indicate if the gpiolib is altering the > internals of irqchips. > > Following this change the following warning is now observed for the SPMI > PMIC pinctrl driver: > gpio gpiochip1: (200f000.spmi:pmic@0:gpio@c000): not an immutable chip, please consider fixing it! > > Fix this by making the irqchip in the SPMI PMIC pinctrl driver immutable. > > Signed-off-by: Robert Marko > --- > drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c > index c3255b0bece4..406ee0933d0b 100644 > --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c > +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c > @@ -171,7 +171,6 @@ struct pmic_gpio_state { > struct regmap *map; > struct pinctrl_dev *ctrl; > struct gpio_chip chip; > - struct irq_chip irq; > u8 usid; > u8 pid_base; > }; > @@ -988,6 +987,17 @@ static void *pmic_gpio_populate_parent_fwspec(struct gpio_chip *chip, > return fwspec; > } > > +static const struct irq_chip spmi_gpio_irq_chip = { > + .name = "spmi-gpio", > + .irq_ack = irq_chip_ack_parent, > + .irq_mask = irq_chip_mask_parent, > + .irq_unmask = irq_chip_unmask_parent, No, this is wrong. Please look at the documentation to see how you must now directly call into the gpiolib helpers for these two callbacks. Thanks, M. -- Without deviation from the norm, progress is not possible.