Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp261443pxa; Fri, 14 Aug 2020 03:34:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9r9N0U786SljuUqCqc4xNKZTY2owHzzOOy66lSd9mih43tEU5hnlyn8A0JeLAbn7wNA7B X-Received: by 2002:a17:907:2078:: with SMTP id qp24mr1723627ejb.286.1597401290709; Fri, 14 Aug 2020 03:34:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597401290; cv=none; d=google.com; s=arc-20160816; b=kkEtoasq/6mqdnD6Hj9r81/1IecKjDc9alSMOhwHmFgZpjYOX/Es7DZI1cftXIn0L9 p/pLaz1UIksDRkfFJhvqdgpRzB8lSTQd0LUoptELaJepgQRXxJ5hW0YezFI4kcDPcnim wvMlOJpdXMTUELPuU6qDojfVBVQNP9lxKq+SSfDmdQ3PFHDt+BCt3JXFc3K/vbVPEcr4 GwzXVU9UZUJjAS9Fqu9pmipa+HYBRiaHP/5+cr0jUYgJKRmy6x7pQa+Y+p775zoR803h 6yergcZVLw74r5zZvfL+/Gyy7wqy/+efnLx1FBeyTFPRXnho6T6mnEVq6Blk47+FDeQp LAWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=bCqAznrYkmu0fqZ1SIa43tFi1DUmmC5y1zKaAbthMm4=; b=VNiaMkZ0rODnOrlyhh+AyMXJYi/TzB0wLUSDjeDKjBqOh7oY9o5LoW+NIflg3U/C6G VpMTFzd6VE4bPpeFx0mdJw6OKMPzdJAOitIVjXABlo8SOK30wlKEi75casiYaxfmmVI/ vZNuo2+oyhaQUBH/KWkKpGXk7Aw958ELqNsTiod8DBHdXN6rKxNrLub7bdptJJE02BMW j6pEUpeXyjuaM4/IfUSAoTcXLJF5XsLQxSt6tlz/Z7YNSGOpEzwD3W/dIdyz7NkjaK8C 6Mvxj7LtpjdoLBZe6ML30vvezpGN9NXDPL0MfFfY0inAGNUV642ajcNqOr7OXmxfuIs0 FuqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b16si4858416eju.452.2020.08.14.03.34.27; Fri, 14 Aug 2020 03:34:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727089AbgHNKcH (ORCPT + 99 others); Fri, 14 Aug 2020 06:32:07 -0400 Received: from imap2.colo.codethink.co.uk ([78.40.148.184]:46758 "EHLO imap2.colo.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbgHNKcF (ORCPT ); Fri, 14 Aug 2020 06:32:05 -0400 Received: from [188.210.212.0] (helo=localhost.localdomain) by imap2.colo.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1k6WZD-000572-7J; Fri, 14 Aug 2020 11:04:07 +0100 From: Thomas Preston To: linus.walleij@linaro.org, robh+dt@kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: thomas.preston@codethink.co.uk Subject: [PATCH 2/3] pinctrl: mcp23s08: Remove interrupt-controller Date: Fri, 14 Aug 2020 11:03:56 +0100 Message-Id: <20200814100357.209340-3-thomas.preston@codethink.co.uk> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200814100357.209340-1-thomas.preston@codethink.co.uk> References: <20200814100357.209340-1-thomas.preston@codethink.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mcp23s08 device and friends are interrupt /client/ nodes, and should not reference the interrupt controller device tree property "interrupt-controller" [0]. Fix the mcp23s08 driver so that it activates interrupts when it detects the "interrupts" property instead, which is always present if we want interrupts enabled. [0] Documentation/devicetree/bindings/interrupt-controller/interrupts.txt Signed-off-by: Thomas Preston --- drivers/pinctrl/pinctrl-mcp23s08.c | 7 +++---- drivers/pinctrl/pinctrl-mcp23s08.h | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c index 0138638276e7..ac8926985c28 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08.c +++ b/drivers/pinctrl/pinctrl-mcp23s08.c @@ -566,9 +566,8 @@ int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, if (ret < 0) goto fail; - mcp->irq_controller = - device_property_read_bool(dev, "interrupt-controller"); - if (mcp->irq && mcp->irq_controller) { + mcp->irq_enabled = device_property_present(dev, "interrupts"); + if (mcp->irq && mcp->irq_enabled) { mcp->irq_active_high = device_property_read_bool(dev, "microchip,irq-active-high"); @@ -601,7 +600,7 @@ int mcp23s08_probe_one(struct mcp23s08 *mcp, struct device *dev, goto fail; } - if (mcp->irq && mcp->irq_controller) { + if (mcp->irq && mcp->irq_enabled) { struct gpio_irq_chip *girq = &mcp->chip.irq; girq->chip = &mcp->irq_chip; diff --git a/drivers/pinctrl/pinctrl-mcp23s08.h b/drivers/pinctrl/pinctrl-mcp23s08.h index 90dc27081a3c..1aa9b11780fc 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08.h +++ b/drivers/pinctrl/pinctrl-mcp23s08.h @@ -30,7 +30,7 @@ struct mcp23s08 { u16 irq_rise; u16 irq_fall; int irq; - bool irq_controller; + bool irq_enabled; int cached_gpio; /* lock protects regmap access with bypass/cache flags */ struct mutex lock; -- 2.26.2