Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2488298rbb; Wed, 28 Feb 2024 03:33:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXJ8PK+ma8riJUtJYtQZljmkwn5SYleWZTrxHzkQAkf24YbXbC9UqWBW8qfwD8ynyShRIjwOrUl6Je8jmg5ekZQT6NPkxItqyXhvU6awQ== X-Google-Smtp-Source: AGHT+IGBeL/PdrzoDGFccjL20fQ3gRAsExNoPYnw5J1ygthDtWNKtMiZUXafmGxdnqlkUE6v8iKH X-Received: by 2002:a05:6214:2461:b0:68f:e855:52c3 with SMTP id im1-20020a056214246100b0068fe85552c3mr6156837qvb.45.1709120022949; Wed, 28 Feb 2024 03:33:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709120022; cv=pass; d=google.com; s=arc-20160816; b=zexIiNYchimCimaBPf9YhMJvkrhlG0fgLM0yTQvaPgc2g8EuyFKV+jdgtSzuadTrYc L6a7ZTYvkjb19+zUrvXjsn7DSnKaQGsCf24sC1CXeXj4tcJ8e8SAlguCvH5N8ZMDAdr3 C5Uw+oyweB8FforKBDVUOR+NMav339TcuMk8y5Y+4ByGqz2e+3GCs7O3k+/wjy0slPPF FlSTWWK1C8aoU5vlDmoDEFMiZ2XXm2zqleQYNThh9yJ37dz/VpD34wuRIsInFy4Hq4Hp ePj+B0K1k7tA8u/gjyHdYL+jufjlbUo66PgP5KuIMfnnK9NLdoL9gcYG9ErNlKcqzkI8 CYPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=WxIu54NFmTQm8hNsehWJC+M+NOJFTGcij28O895cc+A=; fh=FEGj322JUxHP58NgFBs9atrc2KpQCnFuCu2ueZtAhdY=; b=BvBOxLp6c7B1ZayYI8zhXvZdMjbwN+DOC/ScdUuvqyNXKMKv+sqqZzngpHc5aCatB+ dJAIBgXD4JEVYNXzGUbBQ4kNRmx3hWOSpvbLkw+QFYR8H4tn8+VeKa97aGvmpg2prIDq krOgPHuLT5D4nHWvQ4GZJLeyc8rbhyXSncJ7KKczjI/v8NyVe0igJlbW3rhJIkST6t6+ cgSs3pgrBwj9leS7a12jD8UBOPMYyjeZJr0+KKaUj0VJEa2OrsvzOfElwDPFpX1mdE2L amefK6PRb770lj3nGGK3FN32ez4mkzTquG0Lj+DxYgW7dQ0iDLLRIeS7hAXsKx+jZOzA GpXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=h8eRII9p; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-84897-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84897-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id gw4-20020a0562140f0400b0068fb764232bsi9485617qvb.224.2024.02.28.03.33.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 03:33:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-84897-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=h8eRII9p; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-84897-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-84897-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9B6961C22AFA for ; Wed, 28 Feb 2024 11:33:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D61B115AAA6; Wed, 28 Feb 2024 11:28:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="h8eRII9p" Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32CE4152DED; Wed, 28 Feb 2024 11:28:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709119709; cv=none; b=UsZGuOKYlBB6IR4tDU5K5sz4p4PbexJSOEhnmqjanO/Kp8IZpjF4vIRtlG3qKCZAFK2Fxcxs/6eHIkhxPqkIdCdRBCn4wD46fvEGhxmbqysSJNB6mXkh1iJU0V2j4Xt3I1p0NnwsR42bBgZ/ex2c8b0YynGnmQV5LCjN+nM5RzA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709119709; c=relaxed/simple; bh=XWWL3eyR8a1smbNLx8fU1UmuVxwfhD8TNlUTq3LKaMk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CSIUw5J491DC4rkxZptHwg4QciyekMfPW1d8tA29HlFOxefk0UHniFAD6vwcReXeVEC4jBRiFJsKWTxMtlQw+8H4ToGCIqzHY/nrVh2ex7guxdrQQQAwvfquI+xNiLpARiFVKu0zdnjEQtGOEzzbvh4/XND0wFNrYxSP49EeLeg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=h8eRII9p; arc=none smtp.client-ip=217.70.183.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com 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?= Date: Wed, 28 Feb 2024 12:28:18 +0100 Subject: [PATCH v2 20/30] gpio: nomadik: make clock optional Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Thomas Bogendoerfer 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 , Vladimir Kondratiev , Thomas Petazzoni , Tawfik Bayouk , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.13.0 X-GND-Sasl: theo.lebrun@bootlin.com 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 --- drivers/gpio/gpio-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.44.0