Message ID | 20240228-mbly-gpio-v2-20-3ba757474006@bootlin.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9158FC47DD9 for <linux-arm-kernel@archiver.kernel.org>; Wed, 28 Feb 2024 12:46:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GQrWy80yLAU6l1P1J00Tul/jx1BAzyTVw1r6Y//JTjg=; b=ex7cXEQZOqOcg8 OcUj7j+7pETFtiQhIRsKw5zYqqCzo+qlvxmQsO3K93j0xDnpLM8p3JfK8sCn3V1GBtMs1imBYkxAz 1CcNQQvYfhVsRPcBde7ri/JQsooCakhjeMd4A+6zMVz+FL36ncfvOM26JRaVCzPLZo9/R+sm2jKbd MC49XKVdeAVypPgMyzIxo3DUtMTqhf1lXUtmEAFfBRCShf/p3Fx8BueFTTXZr7R0mcMzoDkiNeb13 dUKXdA+4K0D72e99mSn5PNbnxSzoPw5Eol57Hfh8qhpaeJu+mylkJk/yqIdBAWjgWLzq7On7BxnP/ +Ax3n5DryKbVkHgdx9/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfJKh-00000009Hvh-3RPx; Wed, 28 Feb 2024 12:46:48 +0000 Received: from relay8-d.mail.gandi.net ([217.70.183.201]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rfI6t-00000008yVU-0aGm for linux-arm-kernel@lists.infradead.org; Wed, 28 Feb 2024 11:28:28 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2574D1BF218; Wed, 28 Feb 2024 11:28:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1709119705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WxIu54NFmTQm8hNsehWJC+M+NOJFTGcij28O895cc+A=; b=h8eRII9pZ0tb8GDAwVRIFfmiql0iTGIE70/fRLgPkWkGlQzSAfmhKVQJXo9J9H+ZQWTfr2 n3vl3ZTEqPv0Di6MHlYG6B4tbeFmd/uU4giyF04BZda91t03zQ68bin8PikzX67G5iVSbG ocLdX1e3GvfLQlBe24Aj7BeTw/XqyJaFOJRx+AC5h3F+7DRCQUq5cuC5grutClJ6WnBQTM V6qATt294LM4EzuEHiPE1j6CwTL6C8j0NBbmclgeDu2amd8+Sqs2IeMUSutu5Fs4nF9MdO Qq4HYzqJQv5zDPK6uFP8fsvnazVAcjgFv/CFmojaK1zF0qV5+Yk979DCdfDUFg== From: =?utf-8?q?Th=C3=A9o_Lebrun?= <theo.lebrun@bootlin.com> Date: Wed, 28 Feb 2024 12:28:18 +0100 Subject: [PATCH v2 20/30] gpio: nomadik: make clock optional MIME-Version: 1.0 Message-Id: <20240228-mbly-gpio-v2-20-3ba757474006@bootlin.com> References: <20240228-mbly-gpio-v2-0-3ba757474006@bootlin.com> In-Reply-To: <20240228-mbly-gpio-v2-0-3ba757474006@bootlin.com> To: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Philipp Zabel <p.zabel@pengutronix.de>, Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, Gregory CLEMENT <gregory.clement@bootlin.com>, Vladimir Kondratiev <vladimir.kondratiev@mobileye.com>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Tawfik Bayouk <tawfik.bayouk@mobileye.com>, =?utf-8?q?Th=C3=A9o_Lebrun?= <theo.lebrun@bootlin.com> X-Mailer: b4 0.13.0 X-GND-Sasl: theo.lebrun@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240228_032827_391582_B18183BB X-CRM114-Status: GOOD ( 10.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Rework Nomadik GPIO to add Mobileye EyeQ5 support
|
expand
|
On Wed, Feb 28, 2024 at 12:28 PM Théo Lebrun <theo.lebrun@bootlin.com> wrote: > Not all platforms using this platform driver expose a clock for this > GPIO controller. Turn devm_clk_get() into devm_clk_get_optional() to > avoid failing when no clocks are provided. > > Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> Patch applied! Yours, Linus Walleij
diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c index b7d76cc901dc..3ccbb731cb68 100644 --- a/drivers/gpio/gpio-nomadik.c +++ b/drivers/gpio/gpio-nomadik.c @@ -531,7 +531,7 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct device_node *np, } nmk_chip->addr = base; - clk = devm_clk_get(gpio_dev, NULL); + clk = devm_clk_get_optional(gpio_dev, NULL); if (IS_ERR(clk)) { platform_device_put(gpio_pdev); return (void *)clk;
Not all platforms using this platform driver expose a clock for this GPIO controller. Turn devm_clk_get() into devm_clk_get_optional() to avoid failing when no clocks are provided. Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com> --- drivers/gpio/gpio-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)