gpio: Extend TODO to cover code duplication avoidance
PATCH 1/1 gpio: Extend TODO to cover code duplication avoidance
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.
--- drivers/gpio/TODO | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpio/TODO +4 -0
@@ -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
Signature · 1 line
2.25.1
Quoted 3 lines · Andy Shevchenko
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
Quoted 25 lines
extend TODO.
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/gpio/TODO | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpio/TODO +4
-1@@ -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
Quoted 9 lines · Vaibhav Gupta
Quoted 3 lines · Andy Shevchenko
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.
Quoted 28 lines
-- Vaibhav Gupta
To avoid adding more and get rid of existing duplicationQuoted 25 lines
extend TODO.
Signed-off-by Andy Shevchenko <[email protected]>--- drivers/gpio/TODO | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpio/TODO +4
-1@@ -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
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 3 lines
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
Quoted 2 lines
JFYI, I will send couple of clean ups against gpio-pch.
czw., 2 kwi 2020 o 21:21 Andy Shevchenko
<[email protected]> napisał(a):
Quoted 26 lines
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 <[email protected]>--- drivers/gpio/TODO | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpio/TODO +4
-1@@ -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 --
Quoted 2 lines
2.25.1
Patch applied, thanks!
Bartosz