From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (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 4E0311FF7BF; Thu, 20 Feb 2025 15:50:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740066644; cv=none; b=czGmIHOP1cVoEwhwHrG61ipA4xd8ThPIeJJTPAt4R1nZghrWAoy2Hkt+nV1FYhsffx08/V9gVX8N6qZ6yQgnGyTF/AtVb8ZohTHbb9qlUGWm4bVIyf+QPWDbaYiMrbUu1AUH8Y086TS42SfCSMHelBMbyB9UyC0DRp4X0X01b+c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740066644; c=relaxed/simple; bh=vzatA26r+R++ycxiPiSLdTkUwvefNCuHV3tAWddTjKA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=g/D5P9cmbG+TAW+WqsXGDI7fHOPoMNkYxU6aFaHka3tWwWYrR/xCjjvzdnTARpouBZxxalRj3u4J5QPcpGUMKgOb1vhFs2GrfWppfUi2V8O3PrqpqSWV0L1k5GgOzJL2FdS1FmXG1whl6HFmslUkVNiXUWRrAAAIB7IeJCEiGHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=GSSASs3Q; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GSSASs3Q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1740066642; x=1771602642; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vzatA26r+R++ycxiPiSLdTkUwvefNCuHV3tAWddTjKA=; b=GSSASs3Qb1Md0aITYVdtV8Ce/smzyT+vIQ07P2TAgvE3B6uR1DTE++g0 UXLMIruFyEcYvACDste3NzElyGvE4lPPP+0YR4LXe4bapJBLgZjaSHJGx MyVlBtCWaw6S+nt6fDw2F4lqD/wGGqW5D2zB2LPX29Rilr/HUnVbAdb75 vmCcCdrprTSQGGEcqxoihMp9jnSq/9SFZMC59sBy5YZpzAlGVo6KwYGb2 Oe9k1zcJmpI7co+Q8i1X6mzUKOSbShqQwOFlPizr6kYu7JZoU0kB0BcnA r0rXFcr2RRcXaki5D6kxGz2rry4Zbmbikl/9J3zukQ30W2yVvB+OE2bnZ Q==; X-CSE-ConnectionGUID: YmiK27C6RmK1ScI4iyKqCQ== X-CSE-MsgGUID: IYeTtdPkSFa1ojSGIoa6Yw== X-IronPort-AV: E=McAfee;i="6700,10204,11351"; a="40988444" X-IronPort-AV: E=Sophos;i="6.13,302,1732608000"; d="scan'208";a="40988444" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2025 07:50:41 -0800 X-CSE-ConnectionGUID: LqBONMYDR1CntdZcKgPp2g== X-CSE-MsgGUID: IsN/WvdSRACAcjkGJV+A9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,302,1732608000"; d="scan'208";a="115291368" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa008.fm.intel.com with ESMTP; 20 Feb 2025 07:50:40 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id C609A2D0; Thu, 20 Feb 2025 17:50:38 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , =?UTF-8?q?J=2E=20Neusch=C3=A4fer?= , openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Linus Walleij Subject: [PATCH v2 1/1] pinctrl: wpcm450: Switch to use for_each_gpiochip_node() helper Date: Thu, 20 Feb 2025 17:50:11 +0200 Message-ID: <20250220155036.2734838-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.45.1.3035.g276e886db78b Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Switch the code to use for_each_gpiochip_node() helper. While at it, correct header inclusion as device property APIs are provided in property.h. Reviewed-by: J. Neuschäfer Signed-off-by: Andy Shevchenko --- v2: fixed Subject, added tag (J. Neuschäfer) drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c index cdad4ef11a2f..2f97accef837 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c +++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c @@ -10,7 +10,6 @@ // block, shared between all GPIO banks #include -#include #include #include #include @@ -18,6 +17,7 @@ #include #include #include +#include #include #include @@ -1033,7 +1033,7 @@ static int wpcm450_gpio_register(struct platform_device *pdev, return dev_err_probe(dev, PTR_ERR(pctrl->gpio_base), "Resource fail for GPIO controller\n"); - device_for_each_child_node(dev, child) { + for_each_gpiochip_node(dev, child) { void __iomem *dat = NULL; void __iomem *set = NULL; void __iomem *dirout = NULL; @@ -1044,9 +1044,6 @@ static int wpcm450_gpio_register(struct platform_device *pdev, u32 reg; int i; - if (!fwnode_property_read_bool(child, "gpio-controller")) - continue; - ret = fwnode_property_read_u32(child, "reg", ®); if (ret < 0) return ret; -- 2.45.1.3035.g276e886db78b From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 73B98C021B1 for ; Thu, 20 Feb 2025 15:51:04 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4YzHmC2vj2z3d2n for ; Fri, 21 Feb 2025 02:50:51 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=192.198.163.15 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1740066647; cv=none; b=S7qUYk1TzEzyD5MxNkt9Rk3mELw97S0Ac4iVgqwo7FEUSYmtE3TLhGt4/O90UBEH4jl2hH61xThvkccVkuSp4xrseQ1ZOo8M2xytNuXMo9ZIQa54ho5UkWllG66tIibrzNPvAQDtX9U7QPlAsVgFMklcFnwSbUq2O47SLKsdOcIxnix57f8qP7s1hBQ0Qd0Fzl48Ug4aB6tdlArGjCh5pRaTW38on1P3+1Gh5wxHGSD3kuvF13weEPaD0Y+Dj2Ts73CkRlUKuzzfzk1a4b6RYOy5Os5f88yHkHxq0XYMgeUFuYVaFtphVih/fEiJnFl9RDYTX7sXhJxszM++9V8/cA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1740066647; c=relaxed/relaxed; bh=P5wX0ekbRGVUURKYhqnLB5dp1SglRKRUKFFhjTqpOCI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=XGPot/RqrpzOBaLZyYvpyRfXjmPqjxFTbc7vuxWIRRdHASRNoZXdq0uiKaiHX7KI28pnNeUwW0NJqKi0O02fsFwF30shtN9RbN3S9h1VzsrVR4oIv2NpXsH++XZfq9gzUVbMsiZu9h6obIafoEAsPz+QHR654whYIyRFSnQThq+ZDgYEQtS/kOaYgpDsmGMIg/rspJX1sTcGISLNmvz/DbeFeg6OTo5gcyRpIkhAjHMUp3lxi0FNTIKlOs3UBcxzIuN8gCE5y5Ulcopnf16Opqt1Wy6IQCnhNOgYFkyZ2bBLn3opE7PbilwqKXMVdsSPDM7biF99ZCWBMIzV6haGAw== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=e4Zl2jtn; dkim-atps=neutral; spf=none (client-ip=192.198.163.15; helo=mgamail.intel.com; envelope-from=andriy.shevchenko@linux.intel.com; receiver=lists.ozlabs.org) smtp.mailfrom=linux.intel.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=e4Zl2jtn; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=192.198.163.15; helo=mgamail.intel.com; envelope-from=andriy.shevchenko@linux.intel.com; receiver=lists.ozlabs.org) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4YzHm54YkWz3028 for ; Fri, 21 Feb 2025 02:50:44 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1740066646; x=1771602646; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vzatA26r+R++ycxiPiSLdTkUwvefNCuHV3tAWddTjKA=; b=e4Zl2jtn2jkqXCsYCGSZGBAmgPT4ecUxZkadDlyF+MflIVOhBXzntQEF FTRmiLpdQVO1esXpZMhNs+SYe+sY0ZEZ+hVHdUHsb8fjafcYF3GzkvayZ oE952UwXRxYgFhrSYuy1BMM2SHigSfFSwT9rPhjZEaiUu0erab4cbYXmR eL0NZKClwicRZi889mHhSv27DZsO4Xgd+8h5E44TmfTHLXHAInSohy7o8 qyTSGh8XRpnnoDgZ6bjetWD0XAC0+TzsQTpy7p308Q9lktnjgjLvW6j9F n4vYZSNsYwG6wNAEdpNt3Byk+620RGl5GJrYx+iZ/3JmEnj3m2GCtSfxl Q==; X-CSE-ConnectionGUID: ksWNrB/QTICbJd3Vb6bDRQ== X-CSE-MsgGUID: Pm2iBy4OTqyC2sRRD2ESjg== X-IronPort-AV: E=McAfee;i="6700,10204,11351"; a="40988442" X-IronPort-AV: E=Sophos;i="6.13,302,1732608000"; d="scan'208";a="40988442" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2025 07:50:41 -0800 X-CSE-ConnectionGUID: LqBONMYDR1CntdZcKgPp2g== X-CSE-MsgGUID: IsN/WvdSRACAcjkGJV+A9g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,302,1732608000"; d="scan'208";a="115291368" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa008.fm.intel.com with ESMTP; 20 Feb 2025 07:50:40 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id C609A2D0; Thu, 20 Feb 2025 17:50:38 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , =?UTF-8?q?J=2E=20Neusch=C3=A4fer?= , openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/1] pinctrl: wpcm450: Switch to use for_each_gpiochip_node() helper Date: Thu, 20 Feb 2025 17:50:11 +0200 Message-ID: <20250220155036.2734838-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.45.1.3035.g276e886db78b MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" Switch the code to use for_each_gpiochip_node() helper. While at it, correct header inclusion as device property APIs are provided in property.h. Reviewed-by: J. Neuschäfer Signed-off-by: Andy Shevchenko --- v2: fixed Subject, added tag (J. Neuschäfer) drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c index cdad4ef11a2f..2f97accef837 100644 --- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c +++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c @@ -10,7 +10,6 @@ // block, shared between all GPIO banks #include -#include #include #include #include @@ -18,6 +17,7 @@ #include #include #include +#include #include #include @@ -1033,7 +1033,7 @@ static int wpcm450_gpio_register(struct platform_device *pdev, return dev_err_probe(dev, PTR_ERR(pctrl->gpio_base), "Resource fail for GPIO controller\n"); - device_for_each_child_node(dev, child) { + for_each_gpiochip_node(dev, child) { void __iomem *dat = NULL; void __iomem *set = NULL; void __iomem *dirout = NULL; @@ -1044,9 +1044,6 @@ static int wpcm450_gpio_register(struct platform_device *pdev, u32 reg; int i; - if (!fwnode_property_read_bool(child, "gpio-controller")) - continue; - ret = fwnode_property_read_u32(child, "reg", ®); if (ret < 0) return ret; -- 2.45.1.3035.g276e886db78b