* [PATCH v1] gpio: Extend TODO to cover code duplication avoidance
@ 2020-04-02 19:21 Andy Shevchenko
2020-04-02 19:35 ` Vaibhav Gupta
2020-04-06 7:17 ` Bartosz Golaszewski
0 siblings, 2 replies; 5+ messages in thread
From: Andy Shevchenko @ 2020-04-02 19:21 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, linux-gpio, Vaibhav Gupta
Cc: Andy Shevchenko
It appears at least two drivers has a lot of duplication code in
GPIO subsystem. To avoid adding more and get rid of existing duplication
extend TODO.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/TODO | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpio/TODO b/drivers/gpio/TODO
index 3a44e6ae52bd..b989c9352da2 100644
--- a/drivers/gpio/TODO
+++ b/drivers/gpio/TODO
@@ -99,6 +99,10 @@ similar and probe a proper driver in the gpiolib subsystem.
In some cases it makes sense to create a GPIO chip from the local driver
for a few GPIOs. Those should stay where they are.
+At the same time it makes sense to get rid of code duplication in existing or
+new coming drivers. For example, gpio-ml-ioh should be incorporated into
+gpio-pch. In similar way gpio-intel-mid into gpio-pxa.
+
Generic MMIO GPIO
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] gpio: Extend TODO to cover code duplication avoidance
2020-04-02 19:21 [PATCH v1] gpio: Extend TODO to cover code duplication avoidance Andy Shevchenko
@ 2020-04-02 19:35 ` Vaibhav Gupta
2020-04-02 20:09 ` Andy Shevchenko
2020-04-06 7:17 ` Bartosz Golaszewski
1 sibling, 1 reply; 5+ messages in thread
From: Vaibhav Gupta @ 2020-04-02 19:35 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Linus Walleij, Bartosz Golaszewski, linux-gpio
On Fri, Apr 3, 2020 at 12:51 AM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> It appears at least two drivers has a lot of duplication code in
> GPIO subsystem.
Yes, I was surprised too. I studied the gpio-pch to understand how
conversions are going to take place. But when I started working
on gpio-ml-ioh, It was exactly same and I could do it in no other
way, except like that of gpio-pch.
-- Vaibhav Gupta
To avoid adding more and get rid of existing duplication
> extend TODO.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/gpio/TODO | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpio/TODO b/drivers/gpio/TODO
> index 3a44e6ae52bd..b989c9352da2 100644
> --- a/drivers/gpio/TODO
> +++ b/drivers/gpio/TODO
> @@ -99,6 +99,10 @@ similar and probe a proper driver in the gpiolib subsystem.
> In some cases it makes sense to create a GPIO chip from the local driver
> for a few GPIOs. Those should stay where they are.
>
> +At the same time it makes sense to get rid of code duplication in existing or
> +new coming drivers. For example, gpio-ml-ioh should be incorporated into
> +gpio-pch. In similar way gpio-intel-mid into gpio-pxa.
> +
>
> Generic MMIO GPIO
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] gpio: Extend TODO to cover code duplication avoidance
2020-04-02 19:35 ` Vaibhav Gupta
@ 2020-04-02 20:09 ` Andy Shevchenko
2020-04-02 20:17 ` Vaibhav Gupta
0 siblings, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2020-04-02 20:09 UTC (permalink / raw)
To: Vaibhav Gupta; +Cc: Linus Walleij, Bartosz Golaszewski, linux-gpio
On Fri, Apr 03, 2020 at 01:05:51AM +0530, Vaibhav Gupta wrote:
> On Fri, Apr 3, 2020 at 12:51 AM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> >
> > It appears at least two drivers has a lot of duplication code in
> > GPIO subsystem.
> Yes, I was surprised too. I studied the gpio-pch to understand how
> conversions are going to take place. But when I started working
> on gpio-ml-ioh, It was exactly same and I could do it in no other
> way, except like that of gpio-pch.
I guess this answers the question in the previous thread.
To be clear, scrap your patch and don't touch just gpio-ml-ioh alone.
Basically it should be one patch to get rid the driver.
JFYI, I will send couple of clean ups against gpio-pch.
>
> -- Vaibhav Gupta
> To avoid adding more and get rid of existing duplication
> > extend TODO.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> > drivers/gpio/TODO | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpio/TODO b/drivers/gpio/TODO
> > index 3a44e6ae52bd..b989c9352da2 100644
> > --- a/drivers/gpio/TODO
> > +++ b/drivers/gpio/TODO
> > @@ -99,6 +99,10 @@ similar and probe a proper driver in the gpiolib subsystem.
> > In some cases it makes sense to create a GPIO chip from the local driver
> > for a few GPIOs. Those should stay where they are.
> >
> > +At the same time it makes sense to get rid of code duplication in existing or
> > +new coming drivers. For example, gpio-ml-ioh should be incorporated into
> > +gpio-pch. In similar way gpio-intel-mid into gpio-pxa.
> > +
> >
> > Generic MMIO GPIO
> >
> > --
> > 2.25.1
> >
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] gpio: Extend TODO to cover code duplication avoidance
2020-04-02 20:09 ` Andy Shevchenko
@ 2020-04-02 20:17 ` Vaibhav Gupta
0 siblings, 0 replies; 5+ messages in thread
From: Vaibhav Gupta @ 2020-04-02 20:17 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Linus Walleij, Bartosz Golaszewski, linux-gpio
> I guess this answers the question in the previous thread.
> To be clear, scrap your patch and don't touch just gpio-ml-ioh alone.
> Basically it should be one patch to get rid the driver.
Sure! Will work on it.
-- Vaibhav Gupta
>
> JFYI, I will send couple of clean ups against gpio-pch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] gpio: Extend TODO to cover code duplication avoidance
2020-04-02 19:21 [PATCH v1] gpio: Extend TODO to cover code duplication avoidance Andy Shevchenko
2020-04-02 19:35 ` Vaibhav Gupta
@ 2020-04-06 7:17 ` Bartosz Golaszewski
1 sibling, 0 replies; 5+ messages in thread
From: Bartosz Golaszewski @ 2020-04-06 7:17 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: Linus Walleij, linux-gpio, Vaibhav Gupta
czw., 2 kwi 2020 o 21:21 Andy Shevchenko
<andriy.shevchenko@linux.intel.com> napisał(a):
>
> It appears at least two drivers has a lot of duplication code in
> GPIO subsystem. To avoid adding more and get rid of existing duplication
> extend TODO.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/gpio/TODO | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpio/TODO b/drivers/gpio/TODO
> index 3a44e6ae52bd..b989c9352da2 100644
> --- a/drivers/gpio/TODO
> +++ b/drivers/gpio/TODO
> @@ -99,6 +99,10 @@ similar and probe a proper driver in the gpiolib subsystem.
> In some cases it makes sense to create a GPIO chip from the local driver
> for a few GPIOs. Those should stay where they are.
>
> +At the same time it makes sense to get rid of code duplication in existing or
> +new coming drivers. For example, gpio-ml-ioh should be incorporated into
> +gpio-pch. In similar way gpio-intel-mid into gpio-pxa.
> +
>
> Generic MMIO GPIO
>
> --
> 2.25.1
>
Patch applied, thanks!
Bartosz
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-06 7:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-02 19:21 [PATCH v1] gpio: Extend TODO to cover code duplication avoidance Andy Shevchenko
2020-04-02 19:35 ` Vaibhav Gupta
2020-04-02 20:09 ` Andy Shevchenko
2020-04-02 20:17 ` Vaibhav Gupta
2020-04-06 7:17 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).