Re: [PATCH v9 1/1] gpio: mpfs: add polarfire soc gpio support

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

 



On Thu, Oct 31, 2024 at 02:00:22PM +0100, Bartosz Golaszewski wrote:
> On Thu, Oct 31, 2024 at 1:04 PM Conor Dooley <conor@xxxxxxxxxx> wrote:

> > +       mpfs_gpio->gc.direction_input = mpfs_gpio_direction_input;
> > +       mpfs_gpio->gc.direction_output = mpfs_gpio_direction_output;
> > +       mpfs_gpio->gc.get_direction = mpfs_gpio_get_direction;
> > +       mpfs_gpio->gc.get = mpfs_gpio_get;
> > +       mpfs_gpio->gc.set = mpfs_gpio_set;
> > +       mpfs_gpio->gc.base = -1;
> > +       mpfs_gpio->gc.ngpio = ngpios;
> 
> The "ngpios" property will be parsed by GPIO core so no need to set it.

Are you sure it'll work here? I tried dropping the ngpios parsing, but I
get:
gpiochip_add_data_with_key: GPIOs 0..-1 (20122000.gpio) failed to register, -22

That's coming from the device_property_read_u32(dev, "ngpios", &ngpios);
in gpiochip_get_ngpios(). Checking against the bluefield driver and the
code in gpiochip_add_data_with_key(), it's not immediately obvious what
I am missing.

Attachment: signature.asc
Description: PGP signature


[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