[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGngYiW6PMUwQnOMqFFdZ_9KZRE_K1Ue4q8LVGCLkawHUDjACg@mail.gmail.com>
Date: Tue, 19 Nov 2019 13:59:06 -0500
From: Sven Van Asbroeck <thesven73@...il.com>
To: Dan Murphy <dmurphy@...com>
Cc: Lee Jones <lee.jones@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
Pavel Machek <pavel@....cz>, Rob Herring <robh+dt@...nel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Grigoryev Denis <grigoryev@...twel.ru>,
Axel Lin <axel.lin@...ics.com>,
Mark Rutland <mark.rutland@....com>,
devicetree <devicetree@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-leds@...r.kernel.org
Subject: Re: [PATCH v2 3/4] leds: tps6105x: add driver for mfd chip led mode
On Tue, Nov 19, 2019 at 1:33 PM Dan Murphy <dmurphy@...com> wrote:
>
> How many LEDs does this device support?
Just a single LED.
> > + struct device_node *led =
> > + of_get_child_by_name(dev->parent->of_node, "led");
> Prefer device_* calls as opposed to of_* calls.
So do I. But because of Mark Brown's suggestions, the mfd children
now have to grab a named sub-node from their parent.
In this case, we grab the parent subnode named 'led' and fetch
the label from it.
(https://lkml.org/lkml/2019/11/18/802)
Perhaps there is a way to accomplish this this with device_*
calls?
> > + label = pdata->led_label ?: label_from_dt(&pdev->dev);
>
> Since this is a new driver do we really have to continue to use the
> pdata for the init
>
> data? Can't we just get the label from the DT node now like other drivers?
Yes we can, but pdata users would not be able to specify the label name.
Until this patch set, pdata was the only way to use the driver.
Of course, no-one is requesting or requiring this. So I guess
it can be dropped.
Powered by blists - more mailing lists