Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp2945932rwb; Mon, 5 Sep 2022 04:13:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR5/WSm3WHn60wWLY73kuyyl3PpzUBbuVpk9OzBSYAXf7LiXkUDBIcMZgo2vSC/UlOp4vifT X-Received: by 2002:a17:902:f70a:b0:173:36e4:eddf with SMTP id h10-20020a170902f70a00b0017336e4eddfmr47986122plo.9.1662376412696; Mon, 05 Sep 2022 04:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662376412; cv=none; d=google.com; s=arc-20160816; b=X9/Ui4i2jxTemiLTFvb4dLQdau2k9P9P4mOOHsBNZX11rI84po4x6l6eS+9Tf3zj6H pVSLj48x9OA1df3w5a29dQmFNLljZxYwcY7ARKfGtce9N9/beAfD2euwQDg69RLEHpUf zXV/HpYhWm2aCApH81ZFGDa2glp4Q7WsJck3dx/XSzfPzbDefZ2qu0dnvrPvqw00tPuY HlR4N3NCIlupG/xGOXH5d8EB9er41/1S9DU3Xcxed42Af57vWnwQ+pS+t5UMPDf02GSG xjgF1fk6dhATa/xx+S+p80xjV5SNTESB+QncX9F/vf/5rg4892hSBrJ8hNwOBNwA+/hU TTuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GuGrKhvALB+DYbg9DByJZaidZTqMxf1dKNyNwmUzn6Y=; b=BBWuwcuM0h7SA4cNckdlZUsXHTrHHyzpNRUHXQ2JkAFq2fBbbw5eaJe5rXdrHnZLAT t8v7hxcPYNFc4hudSVmz5tOZcSkwBzhYLvYYyuxFFlrX3ULfKQ1w12EpX3Wpvb3PnOd/ aL9KxwQ+x++oQGgECiqJYSHy6bw/hPFXp9j1c8Bletu4SlSQvCvnB784JyCljY6GqxQm zfdl4vC6q30yAP72oD661i3ZKt7YLYBYG59iwA9EHUU0oCSrsMCQigwehrjjKkTdcfWU Ueam47FQoAFLKPFmgOZn2flTLBBZxkvH18RsYQSxn//knEt59Oeyl4yWfNpeq22/SkH7 q9Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hdRIxx5g; 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 n6-20020a63a506000000b0041d35693195si10821803pgf.67.2022.09.05.04.13.15; Mon, 05 Sep 2022 04:13:32 -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=hdRIxx5g; 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 S230096AbiIEKnE (ORCPT + 99 others); Mon, 5 Sep 2022 06:43:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237017AbiIEKnC (ORCPT ); Mon, 5 Sep 2022 06:43:02 -0400 Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12D751A81B; Mon, 5 Sep 2022 03:43:01 -0700 (PDT) Received: by mail-qt1-x82a.google.com with SMTP id y18so5859628qtv.5; Mon, 05 Sep 2022 03:43:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=GuGrKhvALB+DYbg9DByJZaidZTqMxf1dKNyNwmUzn6Y=; b=hdRIxx5gYJprXyb7McPED88U6CjGFW4/o/oE2UEQDAnFQvuRdKTBrAbPBTxaUJ9avf ZhONilidxc49jl4KtjO3UBa42TeRciWGfG7/aHWNdgw4HkempGiN+R8+n9bi+njwfvsf u5vMv6wXB1Ye3Gbinm5yEMDUAfvTO2BfwcWFUoinJoVc2JXFHnCdTpKgEEuyojVrDzWD W+9CAhZTdkGDNzhki05EKQP0hWG3s9bgvQRV731RyOIqcTlNyTSHFHR46gnhjmW/VUhN vl25c1uxIRcxwJheohCT5s/0OzbaRy4WbiXoQTG++iLwB5P3a5Gf9fVcIKfh7m5uIR41 Lt4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=GuGrKhvALB+DYbg9DByJZaidZTqMxf1dKNyNwmUzn6Y=; b=0KTCgkOPfJGLo8UvnDOxHYj9//dODkVaZcqXgN/FMjRu5o97E4RZEI6s/utlVpj84V 9b/VTMPBSHpTYsGg69Gjeabjxgl1wPS5zddaa+pmsKYcgveposZ4bJWMg7oFTEBQkdHw Lsl1cJLYXYHvMP6YGQUyKIwpOa8P6NBwkCCti7/ImiUFcDhnXpD7I0uTLziPq9l32vCq 7Rfp3Pr5F5Dm16Sv88O6l7n41wP0IA9qjvSxS+5yDkP13eS4PhvE9TsWkm0ieDPd0EGg rYU9cMNrWmcFSBELu8Z+CaIFY0bsUXv6D/TF4Py6ut3UeVc5lWujIfzJRUpJkXFarfMB 55gQ== X-Gm-Message-State: ACgBeo3jcEgEfADTeeI/+R9TFrRNyqY8D29yC48pZzyScqVuKqXxwpDJ 6uUwqXz7tVwaUTV1MkZzpj3BINf7+1O8o9fxq2w= X-Received: by 2002:a05:622a:491:b0:344:95bf:8f05 with SMTP id p17-20020a05622a049100b0034495bf8f05mr38933704qtx.61.1662374580142; Mon, 05 Sep 2022 03:43:00 -0700 (PDT) MIME-Version: 1.0 References: <20220903-gpiod_get_from_of_node-remove-v1-0-b29adfb27a6c@gmail.com> <20220903-gpiod_get_from_of_node-remove-v1-8-b29adfb27a6c@gmail.com> In-Reply-To: <20220903-gpiod_get_from_of_node-remove-v1-8-b29adfb27a6c@gmail.com> From: Andy Shevchenko Date: Mon, 5 Sep 2022 13:42:24 +0300 Message-ID: Subject: Re: [PATCH v1 08/11] regulator: bd71815: switch to using devm_fwnode_gpiod_get() To: Dmitry Torokhov Cc: 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_Wilczy=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_Roh=C3=A1r?= , LINUXWATCHDOG , USB , "open list:GPIO SUBSYSTEM" , linux-pci , linux-tegra , "open list:MEMORY TECHNOLOGY..." , Linux Kernel Mailing List , dri-devel , linux-stm32@st-md-mailman.stormreply.com, linux-arm Mailing List Content-Type: text/plain; charset="UTF-8" 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 On Mon, Sep 5, 2022 at 9:33 AM Dmitry Torokhov wrote: > > 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. Special thanks for using dev_fwnode(). Reviewed-by: Andy Shevchenko (Dunno if my suggestion about parent applies here) > Signed-off-by: Dmitry Torokhov > > diff --git a/drivers/regulator/bd71815-regulator.c b/drivers/regulator/bd71815-regulator.c > index acaa6607898e..c2b8b8be7824 100644 > --- a/drivers/regulator/bd71815-regulator.c > +++ b/drivers/regulator/bd71815-regulator.c > @@ -571,11 +571,10 @@ static int bd7181x_probe(struct platform_device *pdev) > dev_err(&pdev->dev, "No parent regmap\n"); > return -ENODEV; > } > - ldo4_en = devm_gpiod_get_from_of_node(&pdev->dev, > - pdev->dev.parent->of_node, > - "rohm,vsel-gpios", 0, > - GPIOD_ASIS, "ldo4-en"); > > + ldo4_en = devm_fwnode_gpiod_get(&pdev->dev, > + dev_fwnode(pdev->dev.parent), > + "rohm,vsel", GPIOD_ASIS, "ldo4-en"); > if (IS_ERR(ldo4_en)) { > ret = PTR_ERR(ldo4_en); > if (ret != -ENOENT) > > -- > b4 0.10.0-dev-fc921 -- With Best Regards, Andy Shevchenko