Re: [PATCH v5 3/3] gpio: pca9570: add slg7xl45106 support

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

 



Hi Shubhrajyoti,

On Fri, Sep 30, 2022 at 1:15 PM Shubhrajyoti Datta
<shubhrajyoti.datta@xxxxxxx> wrote:
> Dialog semiconductors SLG7XL45106 is an 8-bit I2C GPO expander.
> The output port is controlled by a data byte with register
> address. Add a compatible string for the same. Also update
> the driver to write and read from it.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xxxxxxx>
> ---
>
> (no changes since v3)
>
> Changes in v3:
> split the new patch
> Suggested by Andy Shevchenko

Thanks for your patch, which is now commit 6a0411dc1f8694ce
("gpio: pca9570: add slg7xl45106 support") in gpio/gpio/for-next
linux-next/master next-20221026

> --- a/drivers/gpio/gpio-pca9570.c
> +++ b/drivers/gpio/gpio-pca9570.c

> @@ -116,7 +127,8 @@ static int pca9570_probe(struct i2c_client *client)
>         gpio->chip.get = pca9570_get;
>         gpio->chip.set = pca9570_set;
>         gpio->chip.base = -1;
> -       gpio->chip.ngpio = (uintptr_t)device_get_match_data(&client->dev);
> +       gpio->p_data = device_get_match_data(&client->dev);
> +       gpio->chip.ngpio = gpio->p_data->ngpio;

To avoid breakage during bisection, the change to initialize ngpio
should be moved into "[PATCH v5 2/3] gpio: pca9570: add a platform
data structure".

>         gpio->chip.can_sleep = true;
>
>         mutex_init(&gpio->lock);
> @@ -137,14 +149,21 @@ static const struct pca9570_platform_data pca9571_gpio = {
>         .ngpio = 8,
>  };
>
> +static const struct pca9570_platform_data slg7xl45106_gpio = {
> +       .ngpio = 8,
> +       .command = SLG7XL45106_GPO_REG,
> +};
> +
>  static const struct i2c_device_id pca9570_id_table[] = {
>         { "pca9570", (kernel_ulong_t)&pca9570_gpio},
>         { "pca9571", (kernel_ulong_t)&pca9571_gpio },
> +       { "slg7xl45106", (kernel_ulong_t)&slg7xl45106_gpio },
>         { /* sentinel */ }
>  };
>  MODULE_DEVICE_TABLE(i2c, pca9570_id_table);
>
>  static const struct of_device_id pca9570_of_match_table[] = {
> +       { .compatible = "dlg,slg7xl45106", .data = &slg7xl45106_gpio},
>         { .compatible = "nxp,pca9570", .data = &pca9570_gpio },
>         { .compatible = "nxp,pca9571", .data = &pca9571_gpio },
>         { /* sentinel */ }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[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