* [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells
@ 2023-01-13 14:36 Andy Shevchenko
2023-01-13 14:36 ` [PATCH v2 2/2] pinctrl: digicolor: Use proper headers and drop OF dependency Andy Shevchenko
2023-01-16 14:14 ` [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells Linus Walleij
0 siblings, 2 replies; 4+ messages in thread
From: Andy Shevchenko @ 2023-01-13 14:36 UTC (permalink / raw)
To: Linus Walleij, Andy Shevchenko, linux-gpio, linux-kernel,
linux-arm-kernel
Cc: Baruch Siach
The of_gpio_n_cells default is 2 when ->of_xlate() callback is
not defined. No need to assign it explicitly in the driver.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
---
v2: added tag (Baruch), avoid confusion with previously sent patch
drivers/pinctrl/pinctrl-digicolor.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-digicolor.c b/drivers/pinctrl/pinctrl-digicolor.c
index cc3546fc4610..05213261b8a4 100644
--- a/drivers/pinctrl/pinctrl-digicolor.c
+++ b/drivers/pinctrl/pinctrl-digicolor.c
@@ -248,7 +248,6 @@ static int dc_gpiochip_add(struct dc_pinmap *pmap)
chip->set = dc_gpio_set;
chip->base = -1;
chip->ngpio = PINS_COUNT;
- chip->of_gpio_n_cells = 2;
spin_lock_init(&pmap->lock);
--
2.39.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] pinctrl: digicolor: Use proper headers and drop OF dependency
2023-01-13 14:36 [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells Andy Shevchenko
@ 2023-01-13 14:36 ` Andy Shevchenko
2023-01-16 14:14 ` [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells Linus Walleij
1 sibling, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2023-01-13 14:36 UTC (permalink / raw)
To: Linus Walleij, Andy Shevchenko, linux-gpio, linux-kernel,
linux-arm-kernel
Cc: Baruch Siach
The driver doesn't depend on the OF to be complied. Hence
the proper header to use is mod_devicetable.h. Replace of*.h with
the above mentioned and drop redundant dependency.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Baruch Siach <baruch@tkos.co.il>
---
v2: added tag (Baruch)
drivers/pinctrl/Kconfig | 2 +-
drivers/pinctrl/pinctrl-digicolor.c | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 476f3cbbdce0..1e44708201ad 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -170,7 +170,7 @@ config PINCTRL_DA9062
config PINCTRL_DIGICOLOR
bool
- depends on OF && (ARCH_DIGICOLOR || COMPILE_TEST)
+ depends on ARCH_DIGICOLOR || COMPILE_TEST
select PINMUX
select GENERIC_PINCONF
diff --git a/drivers/pinctrl/pinctrl-digicolor.c b/drivers/pinctrl/pinctrl-digicolor.c
index 05213261b8a4..a0423172bdd6 100644
--- a/drivers/pinctrl/pinctrl-digicolor.c
+++ b/drivers/pinctrl/pinctrl-digicolor.c
@@ -11,18 +11,19 @@
* - Pin pad configuration (pull up/down, strength)
*/
+#include <linux/gpio/driver.h>
#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/io.h>
-#include <linux/gpio/driver.h>
+#include <linux/mod_devicetable.h>
+#include <linux/platform_device.h>
#include <linux/spinlock.h>
+
#include <linux/pinctrl/machine.h>
#include <linux/pinctrl/pinconf.h>
#include <linux/pinctrl/pinconf-generic.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h>
+
#include "pinctrl-utils.h"
#define DRIVER_NAME "pinctrl-digicolor"
--
2.39.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells
2023-01-13 14:36 [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells Andy Shevchenko
2023-01-13 14:36 ` [PATCH v2 2/2] pinctrl: digicolor: Use proper headers and drop OF dependency Andy Shevchenko
@ 2023-01-16 14:14 ` Linus Walleij
2023-01-16 14:40 ` Andy Shevchenko
1 sibling, 1 reply; 4+ messages in thread
From: Linus Walleij @ 2023-01-16 14:14 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-gpio, linux-kernel, linux-arm-kernel, Baruch Siach
On Fri, Jan 13, 2023 at 3:36 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> The of_gpio_n_cells default is 2 when ->of_xlate() callback is
> not defined. No need to assign it explicitly in the driver.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Acked-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v2: added tag (Baruch), avoid confusion with previously sent patch
Took out v1 and applied the v2 version instead!
(Hoping there is no v3 version I have missed too...)
Yours,
Linus Walleij
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells
2023-01-16 14:14 ` [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells Linus Walleij
@ 2023-01-16 14:40 ` Andy Shevchenko
0 siblings, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2023-01-16 14:40 UTC (permalink / raw)
To: Linus Walleij; +Cc: linux-gpio, linux-kernel, linux-arm-kernel, Baruch Siach
On Mon, Jan 16, 2023 at 03:14:38PM +0100, Linus Walleij wrote:
> On Fri, Jan 13, 2023 at 3:36 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>
> > The of_gpio_n_cells default is 2 when ->of_xlate() callback is
> > not defined. No need to assign it explicitly in the driver.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Acked-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> > v2: added tag (Baruch), avoid confusion with previously sent patch
>
> Took out v1 and applied the v2 version instead!
>
> (Hoping there is no v3 version I have missed too...)
Nope, thanks!
--
With Best Regards,
Andy Shevchenko
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-16 14:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13 14:36 [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells Andy Shevchenko
2023-01-13 14:36 ` [PATCH v2 2/2] pinctrl: digicolor: Use proper headers and drop OF dependency Andy Shevchenko
2023-01-16 14:14 ` [PATCH v2 1/2] pinctrl: digicolor: Remove duplicate assignment of of_gpio_n_cells Linus Walleij
2023-01-16 14:40 ` Andy Shevchenko
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).