Re: [PATCH v2 3/4] leds: tps6105x: add driver for mfd chip led mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 19, 2019 at 1:33 PM Dan Murphy <dmurphy@xxxxxx> 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.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux