All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] gpio: ixp4xx: Detect special machines by compatible
@ 2022-04-06 20:51 Linus Walleij
  2022-04-18 19:43 ` Bartosz Golaszewski
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2022-04-06 20:51 UTC (permalink / raw)
  To: linux-gpio, Bartosz Golaszewski; +Cc: Linus Walleij

There are some special clock amendments for two machines
formerly detected by their machine_is() boardfile macro.

They are now migrated to device tree so use
of_machine_is_compatible() instead.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Rebase on v5.18-rc1
---
 drivers/gpio/Kconfig       | 1 -
 drivers/gpio/gpio-ixp4xx.c | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 45764ec3b2eb..075a5d0feef7 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -353,7 +353,6 @@ config GPIO_IOP
 
 config GPIO_IXP4XX
 	bool "Intel IXP4xx GPIO"
-	depends on ARM # For <asm/mach-types.h>
 	depends on ARCH_IXP4XX
 	select GPIO_GENERIC
 	select GPIOLIB_IRQCHIP
diff --git a/drivers/gpio/gpio-ixp4xx.c b/drivers/gpio/gpio-ixp4xx.c
index b3b050604e0b..1acda980d119 100644
--- a/drivers/gpio/gpio-ixp4xx.c
+++ b/drivers/gpio/gpio-ixp4xx.c
@@ -17,8 +17,6 @@
 /* Include that go away with DT transition */
 #include <linux/irqchip/irq-ixp4xx.h>
 
-#include <asm/mach-types.h>
-
 #define IXP4XX_REG_GPOUT	0x00
 #define IXP4XX_REG_GPOE		0x04
 #define IXP4XX_REG_GPIN		0x08
@@ -240,7 +238,8 @@ static int ixp4xx_gpio_probe(struct platform_device *pdev)
 	 * Make sure GPIO 14 and 15 are NOT used as clocks but GPIO on
 	 * specific machines.
 	 */
-	if (machine_is_dsmg600() || machine_is_nas100d())
+	if (of_machine_is_compatible("dlink,dsm-g600-a") ||
+	    of_machine_is_compatible("iom,nas-100d"))
 		__raw_writel(0x0, g->base + IXP4XX_REG_GPCLK);
 
 	/*
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] gpio: ixp4xx: Detect special machines by compatible
  2022-04-06 20:51 [PATCH v2] gpio: ixp4xx: Detect special machines by compatible Linus Walleij
@ 2022-04-18 19:43 ` Bartosz Golaszewski
  0 siblings, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2022-04-18 19:43 UTC (permalink / raw)
  To: Linus Walleij; +Cc: open list:GPIO SUBSYSTEM

On Wed, Apr 6, 2022 at 10:54 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> There are some special clock amendments for two machines
> formerly detected by their machine_is() boardfile macro.
>
> They are now migrated to device tree so use
> of_machine_is_compatible() instead.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---

Applied, thanks!

Bart

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH v2] gpio: ixp4xx: Detect special machines by compatible
@ 2022-04-06 20:46 Linus Walleij
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2022-04-06 20:46 UTC (permalink / raw)
  To: linux-gpio, Bartosz Golaszewski; +Cc: Linus Walleij

There are some special clock amendments for two machines
formerly detected by their machine_is() boardfile macro.

They are now migrated to device tree so use
of_machine_is_compatible() instead.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Rebase on v5.18-rc1
---
 drivers/gpio/Kconfig       | 1 -
 drivers/gpio/gpio-ixp4xx.c | 5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 45764ec3b2eb..075a5d0feef7 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -353,7 +353,6 @@ config GPIO_IOP
 
 config GPIO_IXP4XX
 	bool "Intel IXP4xx GPIO"
-	depends on ARM # For <asm/mach-types.h>
 	depends on ARCH_IXP4XX
 	select GPIO_GENERIC
 	select GPIOLIB_IRQCHIP
diff --git a/drivers/gpio/gpio-ixp4xx.c b/drivers/gpio/gpio-ixp4xx.c
index b3b050604e0b..1acda980d119 100644
--- a/drivers/gpio/gpio-ixp4xx.c
+++ b/drivers/gpio/gpio-ixp4xx.c
@@ -17,8 +17,6 @@
 /* Include that go away with DT transition */
 #include <linux/irqchip/irq-ixp4xx.h>
 
-#include <asm/mach-types.h>
-
 #define IXP4XX_REG_GPOUT	0x00
 #define IXP4XX_REG_GPOE		0x04
 #define IXP4XX_REG_GPIN		0x08
@@ -240,7 +238,8 @@ static int ixp4xx_gpio_probe(struct platform_device *pdev)
 	 * Make sure GPIO 14 and 15 are NOT used as clocks but GPIO on
 	 * specific machines.
 	 */
-	if (machine_is_dsmg600() || machine_is_nas100d())
+	if (of_machine_is_compatible("dlink,dsm-g600-a") ||
+	    of_machine_is_compatible("iom,nas-100d"))
 		__raw_writel(0x0, g->base + IXP4XX_REG_GPCLK);
 
 	/*
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-18 19:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 20:51 [PATCH v2] gpio: ixp4xx: Detect special machines by compatible Linus Walleij
2022-04-18 19:43 ` Bartosz Golaszewski
  -- strict thread matches above, loose matches on Subject: below --
2022-04-06 20:46 Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.