Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2750106rwb; Mon, 5 Sep 2022 00:19:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR6vXaHou2rkGqnozP7+r+5pt2G6p/sw5jjKANlT5g3/tsxCYOX/HoAc3WyHCx7tWtcwIyIk X-Received: by 2002:a05:6a00:10c2:b0:4f7:5af4:47b6 with SMTP id d2-20020a056a0010c200b004f75af447b6mr49112212pfu.6.1662362375481; Mon, 05 Sep 2022 00:19:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662362375; cv=none; d=google.com; s=arc-20160816; b=AiUJ1RJHxMe87ajzhTjt5yWeKdG+tgxnRKmRL6DfZHeuAzwoQ7dIhlZmitdJpaIVO3 t7riRhPNEwsn+YUWWPdz57FnAj0V0AGTsH88FQbCcbtPE7XWORlZfGCEpSc86rrqDmNE PoH/6PsnoJ4hvHzZkXNyN5T70PacBQH0Z//07fF1zvvdgPno+LFpGyCCp+qAiRnmtWjZ KwhLd4839Mylq6v/Gux1C4EkVc9I63cA8rCorPWJcSY7TwRgE1Z6BTwVTizrbCD6tlFg Y01b/ft+M5XTjbHI0F+arwNAWSOUSfcbXVgU3gI0AJuXt0ESAISZfZEK783LXGvl/ITh Y4DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zVe7w76eC6bgTDoVT05JO9xbEs/H8FGbqX7haQWgZL4=; b=yOPl4Lee6YtSYpayt9+vew+e5N0cSFALbxtEhjmkEuKfSKi6jX/U/USfD/0viWk5KF A6YzINivLGKOBRP5MPsosTPUQGZkqn0+n2I4Pkogigz0R43QuFGK38j0+YpIcfm9/dFK /bO2QwWJyPJfwRX8k2AJZn+IFEFDeUR1QNS9sWK61TnsQ9zWcgjkDkJ3dVxujCC9ActY 2QwcEKRTM7Po8vNUQNu4H/FJkDu/WUIkHoQoauWG7IY6wi+sZHQMuXRUgvX4XBHCjGuQ l6/CSHu9T3nK2PSleJZ1LFKyi1btuAl4VThxyI96sXtx/KsY+/+pHGnnekpgDRvOfMrc HJwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kACI45Uu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020a637a04000000b0043074b49039si6395686pgc.544.2022.09.05.00.19.24; Mon, 05 Sep 2022 00:19:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=kACI45Uu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236806AbiIEGcM (ORCPT + 99 others); Mon, 5 Sep 2022 02:32:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236182AbiIEGbj (ORCPT ); Mon, 5 Sep 2022 02:31:39 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BD7932B92; Sun, 4 Sep 2022 23:31:33 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id p1-20020a17090a2d8100b0020040a3f75eso2796362pjd.4; Sun, 04 Sep 2022 23:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=zVe7w76eC6bgTDoVT05JO9xbEs/H8FGbqX7haQWgZL4=; b=kACI45UuEBwpfjjyassFNG0U98Hr0eJu20A/vSxogzN+vfXjugJ8KzkYn5wwKX5gbB uJeLI0QAz/+xelvX3OGbdcJTSgu2dNpdrSGSQg4famb7eeB/AbL7WHoZEDiXHjg2hnUR 4PSFIifn7lLM+A5nAaRKBTzgdAw7qg0BfzTpJ86cTaNvjX02vYPt0RebiXWe/iwHmm8q zGwFv8Qb/Nc0B3WMsCOQ/E4dqsgR2yN3yxu1FOcDO2Kb6oKm+SyvVHxf73Na21XGjNsa qHG58A2uebJOTkVIVHXCa9lAAMCpYNCKRv84xKCdiCS3bEdL5OBKRFVk2atPS95mlJqb +oMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=zVe7w76eC6bgTDoVT05JO9xbEs/H8FGbqX7haQWgZL4=; b=JODw5gaEMrBFTuNbAR0TtONbKrOsvPU0BrD2Xb1G6XvrWJLwvKc+erj48QP7IDstkY CXr8qY2LXeOLy5J4rEcMCTPCjsdur7tvN3hJJJIV0AdK6kO8lxHXG7GnoT82I3I9WKbX yY3gAbfMM0CL2dZXpzZ+BgZH2vs8zCrPNjjjKo5wOzm0n76hgRnb0RpbIF/UyH/lYoYB qYvlt/JV86ANtH8vyLMCOfzbqofOiUAl+BcqM/0PWk44zx5H0RRhWHk4MHfdIx+Uuh+Y BOcXAIfTW3fla1DwBEStEmjN2Zd3xR/n2g6L45adHa7Iy79DK/xeT7KaAeH1eZEnYVVW mOsA== X-Gm-Message-State: ACgBeo3pDF36Hphw37XUXyGcAv24LDUyyvZUCVAR7CTYFuQh8NHSW9l/ 7LqgTjg2+enJBwZB9hLIEE0= X-Received: by 2002:a17:902:b581:b0:172:a34e:18fd with SMTP id a1-20020a170902b58100b00172a34e18fdmr46918225pls.163.1662359491466; Sun, 04 Sep 2022 23:31:31 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:7332:f188:2984:5930]) by smtp.gmail.com with ESMTPSA id d197-20020a6336ce000000b0042254fce5e7sm5710653pga.50.2022.09.04.23.31.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Sep 2022 23:31:31 -0700 (PDT) From: Dmitry Torokhov To: Thierry Reding , Mark Brown , Matti Vaittinen , Lorenzo Pieralisi , Claudiu Beznea , Liam Girdwood , Wim Van Sebroeck , Greg Kroah-Hartman , Guenter Roeck , Miquel Raynal , Linus Walleij , Felipe Balbi , Alexandre Belloni , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Vignesh Raghavendra , Daniel Vetter , Thomas Petazzoni , Alexandre Torgue , Marc Zyngier , Richard Weinberger , David Airlie , Nicolas Ferre , Alyssa Rosenzweig , Bartosz Golaszewski , Jonathan Hunter , Rob Herring , Maxime Coquelin , Bjorn Helgaas , =?UTF-8?q?Pali=20Roh=C3=A1r?= Cc: linux-watchdog@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v1 09/11] regulator: bd9576: switch to using devm_fwnode_gpiod_get() Date: Sun, 4 Sep 2022 23:31:01 -0700 Message-Id: <20220903-gpiod_get_from_of_node-remove-v1-9-b29adfb27a6c@gmail.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog In-Reply-To: <20220903-gpiod_get_from_of_node-remove-v1-0-b29adfb27a6c@gmail.com> References: <20220903-gpiod_get_from_of_node-remove-v1-0-b29adfb27a6c@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Mailer: b4 0.10.0-dev-fc921 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I would like to stop exporting OF-specific devm_gpiod_get_from_of_node() so that gpiolib can be cleaned a bit, so let's switch to the generic fwnode property API. While at it switch the rest of the calls to read properties in bd957x_probe() to the generic device property API as well. Signed-off-by: Dmitry Torokhov diff --git a/drivers/regulator/bd9576-regulator.c b/drivers/regulator/bd9576-regulator.c index aa42da4d141e..393c8693b327 100644 --- a/drivers/regulator/bd9576-regulator.c +++ b/drivers/regulator/bd9576-regulator.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -939,8 +940,8 @@ static int bd957x_probe(struct platform_device *pdev) } ic_data->regmap = regmap; - vout_mode = of_property_read_bool(pdev->dev.parent->of_node, - "rohm,vout1-en-low"); + vout_mode = device_property_read_bool(pdev->dev.parent, + "rohm,vout1-en-low"); if (vout_mode) { struct gpio_desc *en; @@ -948,10 +949,10 @@ static int bd957x_probe(struct platform_device *pdev) /* VOUT1 enable state judged by VOUT1_EN pin */ /* See if we have GPIO defined */ - en = devm_gpiod_get_from_of_node(&pdev->dev, - pdev->dev.parent->of_node, - "rohm,vout1-en-gpios", 0, - GPIOD_OUT_LOW, "vout1-en"); + en = devm_fwnode_gpiod_get(&pdev->dev, + dev_fwnode(pdev->dev.parent), + "rohm,vout1-en", GPIOD_OUT_LOW, + "vout1-en"); if (!IS_ERR(en)) { /* VOUT1_OPS gpio ctrl */ /* @@ -986,8 +987,8 @@ static int bd957x_probe(struct platform_device *pdev) * like DDR voltage selection. */ platform_set_drvdata(pdev, ic_data); - ddr_sel = of_property_read_bool(pdev->dev.parent->of_node, - "rohm,ddr-sel-low"); + ddr_sel = device_property_read_bool(pdev->dev.parent, + "rohm,ddr-sel-low"); if (ddr_sel) ic_data->regulator_data[2].desc.fixed_uV = 1350000; else -- b4 0.10.0-dev-fc921