[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190916165424.GD237523@dtor-ws>
Date: Mon, 16 Sep 2019 09:54:24 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Thierry Reding <thierry.reding@...il.com>
Cc: David Airlie <airlied@...ux.ie>, Daniel Vetter <daniel@...ll.ch>,
Jonathan Hunter <jonathanh@...dia.com>,
Dmitry Osipenko <digetx@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
dri-devel@...ts.freedesktop.org, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/tegra: switch to using devm_gpiod_get_optional
On Mon, Sep 16, 2019 at 03:59:04PM +0200, Thierry Reding wrote:
> On Sun, Sep 15, 2019 at 12:13:23AM -0700, Dmitry Torokhov wrote:
> > We do not really need to use API that fetches GPIO data from an
> > arbitrary device tree node, as we are dealing with device tree node
> > assigned to the device structure. We can easily switch to
> > devm_gpiod_get_optional() plus gpiod_set_consumer_name() and clean up
> > the code.
> >
> > Note this is part of efforts to get rid of [devm_]gpiod_get_from_of_node
> > in drivers so that gpiolib can be cleaned up.
> >
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
> > ---
> > drivers/gpu/drm/tegra/output.c | 18 +++++++-----------
> > 1 file changed, 7 insertions(+), 11 deletions(-)
>
> We can't do that. There's a special case in rgb.c that sets
> output->of_node to something different than output->dev, so we actually
> need to pass the struct device_node * separately.
Ugh, brainfart on my part. I totally read it is output->dev.of_node,
similar to another driver I was looking at...
Please discard, there will be another patch changing
devm_gpiod_get_from_of_node() to devm_fwnode_gpiod_get() once Linus
merges this new GPIO method.
Thanks.
--
Dmitry
Powered by blists - more mailing lists