From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 03D9828A2CE; Thu, 13 Feb 2025 19:31:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739475118; cv=none; b=mcXkO3r/jimHFnbw85Ue2CzIA6FzmPBk0XC7Cdp0WzVI9fwyxGSLOc7aOto+M/E1lcTwkKlLjVle4Tff7DrPCzDTJI35tmxQ5FcdcwpOOZGa7f9xfcuHlhZ3LUyRLoSZLSrrTIq2noN6Cgx3pjrynzABFExq2ECK9qFZqAM0Lk0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739475118; c=relaxed/simple; bh=3isR7VFoqzfVxZrvhDXXIeUYz1Uzy8aLfsgglxXjle0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qo1fM8rvd/0QIxXCvHs46VYpdf8Bktl5C9I9ayZt/wLvgfu61vLB8RHJtYpSL7J5Hte5CuFNqStTqaNpZFZXGzJIDLbpGFCgWnh6bp0G29wJlJRtU0ROpoSBa38XVXELNVmFiRHWXKXBGDPzqhcvHXUxU3F6iAAL0jg87Pw1N1E= 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=GHAnpFY2; arc=none smtp.client-ip=192.198.163.19 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="GHAnpFY2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739475117; x=1771011117; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3isR7VFoqzfVxZrvhDXXIeUYz1Uzy8aLfsgglxXjle0=; b=GHAnpFY2xzbmKNtalUB5N7/dIGX8pQx8WfVM5FGV73WFTLcqkIYPAgBa JnaZD2riiqvr7mCetvCBZ3YZrdjaqTaJa5EmyfM4LwO9kCJjFNy4dBoYn jEkQL3lnjdJF7idy1rLSDccNtqGcIH481r/NtEblIGfmeokm4MrS7jMmW ejJjUIIsZQj+h/fRlCE9loSiM76wPJnabZJ09lAE90rMO+y/7j5Py1F8A aYhdbQnKTKmzyRXnuHRmbxsQuuf3hqVrE6Jig+bqIS0RGutgZDVJ+pEVT BMnXSBKGqHE5y2tFd8yphSKOHvkHMUggg2MgetMhn3bTjQNJb8dyN52QB Q==; X-CSE-ConnectionGUID: yjR+eW4VSwSKsBHdARw2Qw== X-CSE-MsgGUID: 4vKCwn0dS9iSY79yGun8/g== X-IronPort-AV: E=McAfee;i="6700,10204,11344"; a="39386877" X-IronPort-AV: E=Sophos;i="6.13,282,1732608000"; d="scan'208";a="39386877" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2025 11:31:56 -0800 X-CSE-ConnectionGUID: ilCaPk/2Qx+K/0Rtci5tTQ== X-CSE-MsgGUID: ltjIHdYaRPem+FF+Ox2RJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="136472326" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa002.fm.intel.com with ESMTP; 13 Feb 2025 11:31:54 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6A1B91FD; Thu, 13 Feb 2025 21:31:53 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , 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 v1 1/1] pinctrl: : Switch to use for_each_gpiochip_node() helper Date: Thu, 13 Feb 2025 21:31:52 +0200 Message-ID: <20250213193152.3120396-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-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. Signed-off-by: Andy Shevchenko --- 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 9667CC021A0 for ; Thu, 13 Feb 2025 19:33:23 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Yv51y4mDmz3d3g for ; Fri, 14 Feb 2025 06:33:10 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1739475187; cv=none; b=bQNTo4UfHC0t84JZitMP92YOr1MOE+EN+Ny1Yzf/YJiPkcoEObDzsYM1xLWjaE5qWy/LL+hqFa0skAtzqd5wu8Ex2sAS9mJMLQGTn7m6cYgFvSigrJwGxiJphKDW6hKAGZj6eg4pgP4F4YsMgdFjkHl4i3e6+WrQrEUnHLJmSPiq3f+DBEQhKVGN3QXH7XyWnmFuP+wIA12YIHUGPLGejBIwQN9wAsT0AmDZDMDqrxeOM7MEFyIbfpMv7gCRLKl7b+DdNO0Co6jouYQ2oL/vmuW4M495f+LSSWR0GfbhlVQQfF8qH077h1Cep2M+01PpH40EKmL/wvGKkTbNaa4Fyg== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1739475187; c=relaxed/relaxed; bh=A/sI7wZhr2bQ8gXmYipV8Oec4YgZ/Mzd1qYwyRCPHT8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BON9ZSTzA33K0ziveQt+0MAkJ3bcOt6zl0P2f+o/2ZBaccEbzz6wQmBMdBR2VpswfKO7AsKVcTWrSSKSFumPs/XIGCPnB5HRgT4b73eItci/4lRvPso6m2StewCM/+4+IJoe2Nd9pTx+2T7tmZmApYuxK0G1P5DfB4Yd8LtsLXN0YTwbb/quATHTqXxG5HGnORydALGZ4hdJJWRMGpYaI+xpHXzd8ufavltbWDJPtoQyRfo2wwomCyHlJuX9Vc6NMu0OvqQYAFlUE3FOK6BK2dP7tlwPsv5RIy1+w+5U2fXzVSWENMWb1Mwm7mLxzghWCDblQLAqJCVIdgCILOanZQ== 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=Gps/7zpH; dkim-atps=neutral; spf=none (client-ip=192.198.163.19; 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=Gps/7zpH; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.intel.com (client-ip=192.198.163.19; helo=mgamail.intel.com; envelope-from=andriy.shevchenko@linux.intel.com; receiver=lists.ozlabs.org) X-Greylist: delayed 64 seconds by postgrey-1.37 at boromir; Fri, 14 Feb 2025 06:33:04 AEDT Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 4Yv51r2ffZz2yGs for ; Fri, 14 Feb 2025 06:33:04 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1739475185; x=1771011185; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=3isR7VFoqzfVxZrvhDXXIeUYz1Uzy8aLfsgglxXjle0=; b=Gps/7zpHNZ4xVe+CcnRFR9XE1abImWMRGIWCMoyHrIeHQafeFTnARDMu u4jIWcahQDaNoeRVqxb4cGLrHSzSAMNDC0pZbCE2ahi3xhEV75Kur+asx HdbcmDTn5GmwbxbbJSpPppRCfpFpDcIGQhH1ioWneyUvn1YSzjBQhctm3 0AfELYpCiSe66CCwT1MSng9knzT/EhNKPDE2YFZh/cPzuc6VXbr6Nc/Cz p3rK4WyTx6TfVyTO7OHArYZuPz6hbHxSLqFrRucdueH7TKcTPlBuNagLc /s92u3zakxp1Udc2L/Df4Vp/8VHTQS2fjLEgyqU4fmAlDNqW9xfTGMV/P Q==; X-CSE-ConnectionGUID: xEKI09dZSECWkxoADk9y8g== X-CSE-MsgGUID: wUG9jm6RR4uSG7Hrh/SbUg== X-IronPort-AV: E=McAfee;i="6700,10204,11344"; a="39386876" X-IronPort-AV: E=Sophos;i="6.13,282,1732608000"; d="scan'208";a="39386876" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Feb 2025 11:31:56 -0800 X-CSE-ConnectionGUID: ilCaPk/2Qx+K/0Rtci5tTQ== X-CSE-MsgGUID: ltjIHdYaRPem+FF+Ox2RJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="136472326" Received: from black.fi.intel.com ([10.237.72.28]) by fmviesa002.fm.intel.com with ESMTP; 13 Feb 2025 11:31:54 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6A1B91FD; Thu, 13 Feb 2025 21:31:53 +0200 (EET) From: Andy Shevchenko To: Andy Shevchenko , openbmc@lists.ozlabs.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/1] pinctrl: : Switch to use for_each_gpiochip_node() helper Date: Thu, 13 Feb 2025 21:31:52 +0200 Message-ID: <20250213193152.3120396-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.45.1.3035.g276e886db78b MIME-Version: 1.0 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. Signed-off-by: Andy Shevchenko --- 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