Re: [PATCH v1 1/2] pinctrl: msm: Switch to use device_property_count_uXX()

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

 



On Mon, Aug 05, 2019 at 12:01:11PM +0200, Linus Walleij wrote:
> On Tue, Jul 23, 2019 at 9:27 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> 
> > Use use device_property_count_uXX() directly, that makes code neater.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> (...)
> >         /* The number of GPIOs in the ACPI tables */
> > -       len = ret = device_property_read_u16_array(pctrl->dev, "gpios", NULL,
> > -                                                  0);
> > +       len = ret = device_property_count_u16(pctrl->dev, "gpios");
> 
> Patch applied (makes the kernel a better place) but:

Thanks!

> Can't we just use: gpiod_count(pctrl->dev, NULL); ?

Perhaps. I have no hardware to test and the question probably better to be
addressed to author(s) of the driver.

My scope is to convert to new extension to device property API, so, anyone who
will look for examples will not use the old approach.

> It's more to the point when counting gpios I think.
> 
> However this driver is not includeing <linux/gpio/consumer.h>
> and is this "gpios" property really a consumer property? I think
> so but...

Sounds like this is an old driver and many questions to it applies.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux