lkml.org 
[lkml]   [2022]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] pinctrl: Add Cypress cy8c95x0 support
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@9elements.com> 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

\
 
 \ /
  Last update: 2022-04-21 22:53    [W:0.068 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site