From patchwork Thu Jun 4 00:28:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 187448 Delivered-To: patches@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp971036ilo; Wed, 3 Jun 2020 17:28:20 -0700 (PDT) X-Received: by 2002:a19:6a09:: with SMTP id u9mr1022064lfu.65.1591230499835; Wed, 03 Jun 2020 17:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591230499; cv=none; d=google.com; s=arc-20160816; b=n4711DPZUIueKLy1YnVafRIxWrSrcy1yL8CIOg7ABdQ5zP1hG5hQBtDyvGBnXlAUck lLo52me0Si1YzojKa2fVdcEqbX3XfVQh7vrQ1CYYbCkMaFG7sxu+0azaZ6HDw1yrH2nC F/f3/PncYRtBRJCDoExQy6nvxArjil1nb8AcEV7qS9kVrfCW28kJSCgE8BD7qew/4DEx p4zqUwaar5DQEYNXz2yLMpn8gwuK90ELxob3r/kaEgoXGm27aGw3C/ZiFvvdQf5iT4cT vcR0g3zsM4MnD7C2e/znXj+fcahmEfmzGgO339Fj71RFeUJZBWdn+jTiPylLlEETY81X X3Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=3VHOWfgLhQyccmK4q8Ldz2IqVj7g3f2Klhib240tNYU=; b=s0TzIG/o+fCOgMzMTWgGoGtQ7BxGhlZhWN4MTfFbdv8qexOt7weZ+rzUlsR6m97XVB 0N9mOz7768WSqiS+UvdDx0kXbCHRYNsI3LdUiNO0Db4wyVrDYPkGWjxoIYoK/O3YiDl7 ncfgP345mOJwJ0IAfVM8BW1GQG99uM3AlahSC24TTuRq0iGmLlHyzg5FFq9Yn4fC3Vfj uyJ/SlQym5EwulB1s+54+76bps8ZHTHhiHCegF6mY9WEEf1Pkkg49Ay/yDM/3BAaiALj hNywljDafL+WH30cMJ0DfCRfP5XmEjN50t802nrwHDpCkvVZMot0rZGVb0AeXGPrTc30 qSUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HBJAvwNz; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id m20sor2058382lji.28.2020.06.03.17.28.19 for (Google Transport Security); Wed, 03 Jun 2020 17:28:19 -0700 (PDT) Received-SPF: pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HBJAvwNz; spf=pass (google.com: domain of dmitry.baryshkov@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=dmitry.baryshkov@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3VHOWfgLhQyccmK4q8Ldz2IqVj7g3f2Klhib240tNYU=; b=HBJAvwNzUOXRnGbLcgIQFhS+ttFVgf08OzqhzrjyAZaqK3Ei9sKm7hM0fTAvvD6wIQ ukZAaxFfk440BT3uIQ0YeySkqiFAh90P8Wm7OSPF+s4Dlz2Kfz39JfAErWI6KcrCfN+f WBkEMFn9RyXVa6RxL0ITT4Iq8JiLyfuW1uSH1qsBDQAC9Lk2aYHvezfFP/NcURtfiDAi c4+ee+YYDRKYNrtobJ8mOmoFzTQJIu/fQNCmozJWZHh+SfDEvDDx7XRLnizvu1EdJucE MZhhyrnc0ienyLmEdkT4Op2ip3ZLRvGR6azoaY44LNVzvyTmL7JPs2u0Dm3v0fjTnplG M+TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=3VHOWfgLhQyccmK4q8Ldz2IqVj7g3f2Klhib240tNYU=; b=kTVJblZzA9vEM9qNKWe9N2PGKKPy5zZFVOjHGtcMM2fw+Wyq67NAwDNwrlq/beDeQf MSyNSGmlDbXCGG1DbMbvmFRbYL4rzLxA3iU9Gh+3U4uSV8xrd7JacXMS7A6CTY+A/xdr JK86Yb03AxGlJK+FRTwEfXXzo5aL8B0+6JodM5hwiBF/uIaAnkgq4tbLL9nUJfj8cyMf OJlo31ZRayvrARf0z79/67QqphDd0F/zXFIFhLAG+MqkyPVtkJmOcie6NVoKHee71C9U X5yqKxzPN6eWr0GitEutpkO/c8ZISTrGoqX1aFIJu+bod6ClElXa8is7t8z1ND5uiLLG kbvw== X-Gm-Message-State: AOAM533QxrK8YuD2tv9/0CWVMmB4YX7odS5KT/ppUMV9wC1o4TPeXBe8 ilYuX6Iy3bUClgI2QzdTrtWN6R8W X-Google-Smtp-Source: ABdhPJy0NDg5HUyn9p7YobjUOZLS9dC/88XxBVGszvY1kZmURhjaoLE7/mPc6dli1TKekNQUUaUciQ== X-Received: by 2002:a05:651c:112b:: with SMTP id e11mr859787ljo.134.1591230499361; Wed, 03 Jun 2020 17:28:19 -0700 (PDT) Return-Path: Received: from eriador.lan ([188.162.64.226]) by smtp.gmail.com with ESMTPSA id q4sm1061357lfm.93.2020.06.03.17.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 17:28:18 -0700 (PDT) From: Dmitry Baryshkov To: Linus Walleij , Bjorn Andersson , Andy Gross Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org, patches@linaro.org, linaro-kernel@lists.linaro.org Subject: [PATCH] pinctrl: qcom: spmi-gpio: fix warning about irq chip reusage Date: Thu, 4 Jun 2020 03:28:17 +0300 Message-Id: <20200604002817.667160-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Fix the following warnings caused by reusage of the same irq_chip instance for all spmi-gpio gpio_irq_chip instances. Instead embed irq_chip into pmic_gpio_state struct. gpio gpiochip2: (c440000.qcom,spmi:pmic@2:gpio@c000): detected irqchip that is shared with multiple gpiochips: please fix the driver. gpio gpiochip3: (c440000.qcom,spmi:pmic@4:gpio@c000): detected irqchip that is shared with multiple gpiochips: please fix the driver. gpio gpiochip4: (c440000.qcom,spmi:pmic@a:gpio@c000): detected irqchip that is shared with multiple gpiochips: please fix the driver. Signed-off-by: Dmitry Baryshkov --- drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) -- 2.26.2 Acked-by: Manivannan Sadhasivam diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c index fe0be8a6ebb7..092a48e4dff5 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c @@ -170,6 +170,7 @@ struct pmic_gpio_state { struct regmap *map; struct pinctrl_dev *ctrl; struct gpio_chip chip; + struct irq_chip irq; }; static const struct pinconf_generic_params pmic_gpio_bindings[] = { @@ -917,16 +918,6 @@ static int pmic_gpio_populate(struct pmic_gpio_state *state, return 0; } -static struct irq_chip pmic_gpio_irq_chip = { - .name = "spmi-gpio", - .irq_ack = irq_chip_ack_parent, - .irq_mask = irq_chip_mask_parent, - .irq_unmask = irq_chip_unmask_parent, - .irq_set_type = irq_chip_set_type_parent, - .irq_set_wake = irq_chip_set_wake_parent, - .flags = IRQCHIP_MASK_ON_SUSPEND, -}; - static int pmic_gpio_domain_translate(struct irq_domain *domain, struct irq_fwspec *fwspec, unsigned long *hwirq, @@ -1053,8 +1044,16 @@ static int pmic_gpio_probe(struct platform_device *pdev) if (!parent_domain) return -ENXIO; + state->irq.name = "spmi-gpio", + state->irq.irq_ack = irq_chip_ack_parent, + state->irq.irq_mask = irq_chip_mask_parent, + state->irq.irq_unmask = irq_chip_unmask_parent, + state->irq.irq_set_type = irq_chip_set_type_parent, + state->irq.irq_set_wake = irq_chip_set_wake_parent, + state->irq.flags = IRQCHIP_MASK_ON_SUSPEND, + girq = &state->chip.irq; - girq->chip = &pmic_gpio_irq_chip; + girq->chip = &state->irq; girq->default_type = IRQ_TYPE_NONE; girq->handler = handle_level_irq; girq->fwnode = of_node_to_fwnode(state->dev->of_node);