Re: [PATCH 2/2] pinctrl: Add Cypress cy8c95x0 support

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

 



Hi Patrick, Naresh,

thanks for your patch! This is a VERY good looking driver so I don't
think we will need a lot of iterations before it is finished. (Famous
last words, but it looks very good.)

On Tue, Apr 19, 2022 at 9:17 AM Patrick Rudolph
<patrick.rudolph@xxxxxxxxxxxxx> wrote:

> +static const struct i2c_device_id cy8c95x0_id[] = {
> +       { "cy8c9520", 20, },
> +       { "cy8c9540", 40, },
> +       { "cy8c9560", 60, },
> +       { }

So here is the ngpios for each expander.

> +       chip->tpin = chip->driver_data & CY8C95X0_GPIO_MASK;
> +       ngpios = -1;
> +       if (client->dev.of_node)
> +               of_property_read_u32(client->dev.of_node, "ngpios", &ngpios);
> +
> +       if (ngpios < 0 || ngpios > (chip->driver_data & CY8C95X0_GPIO_MASK))
> +               ngpios = chip->driver_data & CY8C95X0_GPIO_MASK;

So why should this be configurable from the device tree at all?

I understand if not all gpios are used, but we usually just expose all
GPIOs on an expander.

Yours,
Linus Walleij



[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