diff mbox series

[33/43] gpio: ep93xx: add DT support for gpio-ep93xx

Message ID 20230424123522.18302-34-nikita.shubin@maquefel.me
State New
Headers show
Series ep93xx device tree conversion | expand

Commit Message

Nikita Shubin April 24, 2023, 12:34 p.m. UTC
Add match table.

Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
 drivers/gpio/gpio-ep93xx.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Bartosz Golaszewski June 16, 2023, 9:18 a.m. UTC | #1
On Mon, Apr 24, 2023 at 11:36 AM Nikita Shubin
<nikita.shubin@maquefel.me> wrote:
>
> Add match table.
>
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> ---
>  drivers/gpio/gpio-ep93xx.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
> index ca508c7c4f2f..4e3d01fab012 100644
> --- a/drivers/gpio/gpio-ep93xx.c
> +++ b/drivers/gpio/gpio-ep93xx.c
> @@ -363,9 +363,15 @@ static int ep93xx_gpio_probe(struct platform_device *pdev)
>         return devm_gpiochip_add_data(&pdev->dev, gc, egc);
>  }
>
> +static const struct of_device_id ep93xx_gpio_match[] = {
> +       { .compatible = "cirrus,ep9301-gpio" },
> +       { /* end of table */ },
> +};
> +
>  static struct platform_driver ep93xx_gpio_driver = {
>         .driver         = {
>                 .name   = "gpio-ep93xx",
> +               .of_match_table = ep93xx_gpio_match,
>         },
>         .probe          = ep93xx_gpio_probe,
>  };
> --
> 2.39.2
>

I guess this depends on patch 1/43 from this series? Are you going to send a v2?

Bart
Nikita Shubin June 16, 2023, 12:37 p.m. UTC | #2
Hi Bart!

On Fri, 2023-06-16 at 11:18 +0200, Bartosz Golaszewski wrote:
> On Mon, Apr 24, 2023 at 11:36 AM Nikita Shubin
> <nikita.shubin@maquefel.me> wrote:
> > 
> > Add match table.
> > 
> > Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
> > ---
> >  drivers/gpio/gpio-ep93xx.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-
> > ep93xx.c
> > index ca508c7c4f2f..4e3d01fab012 100644
> > --- a/drivers/gpio/gpio-ep93xx.c
> > +++ b/drivers/gpio/gpio-ep93xx.c
> > @@ -363,9 +363,15 @@ static int ep93xx_gpio_probe(struct
> > platform_device *pdev)
> >         return devm_gpiochip_add_data(&pdev->dev, gc, egc);
> >  }
> > 
> > +static const struct of_device_id ep93xx_gpio_match[] = {
> > +       { .compatible = "cirrus,ep9301-gpio" },
> > +       { /* end of table */ },
> > +};
> > +
> >  static struct platform_driver ep93xx_gpio_driver = {
> >         .driver         = {
> >                 .name   = "gpio-ep93xx",
> > +               .of_match_table = ep93xx_gpio_match,
> >         },
> >         .probe          = ep93xx_gpio_probe,
> >  };
> > --
> > 2.39.2
> > 
> 
> I guess this depends on patch 1/43 from this series? Are you going to
> send a v2?

Yes it depends, the splitting was done to adapt driver to splitted
platform data one for each port i.e. probe is called for each port
instance with 1/43.

Definitely there will be a v2 (actually b4 considers it a v3 version -
so be it), and may be some next series also.


> 
> Bart
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index ca508c7c4f2f..4e3d01fab012 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -363,9 +363,15 @@  static int ep93xx_gpio_probe(struct platform_device *pdev)
 	return devm_gpiochip_add_data(&pdev->dev, gc, egc);
 }
 
+static const struct of_device_id ep93xx_gpio_match[] = {
+	{ .compatible = "cirrus,ep9301-gpio" },
+	{ /* end of table */ },
+};
+
 static struct platform_driver ep93xx_gpio_driver = {
 	.driver		= {
 		.name	= "gpio-ep93xx",
+		.of_match_table = ep93xx_gpio_match,
 	},
 	.probe		= ep93xx_gpio_probe,
 };