gpio: xgene-sb: Drop redundant OF_GPIO dependency
PATCH 1/3 gpio: xgene-sb: Drop redundant OF_GPIO dependency
There is nothing in the driver requires OF_GPIO. Moreover, driver supports ACPI and OF_GPIO may be a quite overhead on such configurations.
Drop dependency for good and replace of_gpio.h to of.h since we have one function to be defined from there.
--- drivers/gpio/Kconfig | 2 +- drivers/gpio/gpio-xgene-sb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/Kconfig +1 -1
@@ -638,7 +638,7 @@ config GPIO_XGENE config GPIO_XGENE_SB tristate "APM X-Gene GPIO standby controller support" - depends on ARCH_XGENE && OF_GPIO + depends on ARCH_XGENE select GPIO_GENERIC select GPIOLIB_IRQCHIP select IRQ_DOMAIN_HIERARCHY
drivers/gpio/gpio-xgene-sb.c +1 -1
@@ -10,8 +10,8 @@#include <linux/module.h> #include <linux/io.h> +#include <linux/of.h> #include <linux/platform_device.h> -#include <linux/of_gpio.h> #include <linux/gpio/driver.h> #include <linux/acpi.h>
Signature · 1 line
2.26.2
PATCH 2/3 gpio: xgene-sb: Allow driver to be built with COMPILE_TEST
Allow driver to be built with COMPILE_TEST for better test coverage.
--- drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/Kconfig +1 -1
@@ -638,7 +638,7 @@ config GPIO_XGENE config GPIO_XGENE_SB tristate "APM X-Gene GPIO standby controller support" - depends on ARCH_XGENE + depends on (ARCH_XGENE || COMPILE_TEST) select GPIO_GENERIC select GPIOLIB_IRQCHIP select IRQ_DOMAIN_HIERARCHY
Signature · 1 line
2.26.2
Re: [PATCH v1 2/3] gpio: xgene-sb: Allow driver to be built with COMPILE_TEST
Quoted 3 lines · Andy Shevchenko
Allow driver to be built with
COMPILE_TESTfor better test coverage.Signed-off-by Andy Shevchenko <[email protected]>
Patch applied.
Yours,
Linus Walleij
PATCH 3/3 gpio: xgene-sb: Drop extra check to call acpi_gpiochip_request_interrupts()
In reply to Andy ShevchenkoThere is no need to have an additional check to call acpi_gpiochip_request_interrupts(). Even without any interrupts available the registered ACPI Event handlers can be useful for debugging purposes.
--- drivers/gpio/gpio-xgene-sb.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/gpio/gpio-xgene-sb.c +3 -7
@@ -290,10 +290,8 @@ static int xgene_gpio_sb_probe(struct platform_device *pdev)dev_info (&pdev->dev,"X-Gene GPIO Standby driver registered\n" ); -if (priv->nirq >0 ) { -/* Register interrupt handlers for gpio signaled acpi events */ -acpi_gpiochip_request_interrupts (&priv->gc); - } +/* Register interrupt handlers for GPIO signaled ACPI Events */ +acpi_gpiochip_request_interrupts (&priv->gc);return ret; }
@@ -302,9 +300,7 @@ static int xgene_gpio_sb_remove(struct platform_device *pdev) {struct xgene_gpio_sb *priv =platform_get_drvdata (pdev); -if (priv->nirq >0 ) { -acpi_gpiochip_free_interrupts (&priv->gc); - } +acpi_gpiochip_free_interrupts (&priv->gc);irq_domain_remove (priv->irq_domain);
Signature · 1 line
2.26.2
Re: [PATCH v1 3/3] gpio: xgene-sb: Drop extra check to call acpi_gpiochip_request_interrupts()
Quoted 5 lines · Andy Shevchenko
There is no need to have an additional check to call
acpi_gpiochip_request_interrupts(). Even without any interrupts available the registered ACPI Event handlers can be useful for debugging purposes.Signed-off-by Andy Shevchenko <[email protected]>
Patch applied.
Yours,
Linus Walleij
Quoted 7 lines · Andy Shevchenko
There is nothing in the driver requires
OF_GPIO. Moreover, driver supports ACPI andOF_GPIOmay be a quite overhead on such configurations.Drop dependency for good and replace
of_gpio.htoof.hsince we have one function to be defined from there.Signed-off-by Andy Shevchenko <[email protected]>
Patch applied.
Yours,
Linus Walleij