Skip to content

Commit 37db988

Browse files
committed
Merge tag 'intel-gpio-v5.18-1' of gitolite.kernel.org:pub/scm/linux/kernel/git/andy/linux-gpio-intel into gpio/for-next
intel-gpio for v5.18-1 * Set IRQ bus token in gpio-crystalcove to avoid debugfs error * Check return value of kstrdup() in gpio-merrifield to error out earlier * Clean up couple of drivers from unneeded of_node usage * Allow gpio-tps68470 to be built as module to reduce memory foot print
2 parents 667630e + a1ce76e commit 37db988

6 files changed

Lines changed: 18 additions & 9 deletions

File tree

drivers/gpio/Kconfig

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ config GPIO_TPS65912
13901390
This driver supports TPS65912 GPIO chip.
13911391

13921392
config GPIO_TPS68470
1393-
bool "TPS68470 GPIO"
1393+
tristate "TPS68470 GPIO"
13941394
depends on INTEL_SKL_INT3472
13951395
help
13961396
Select this option to enable GPIO driver for the TPS68470
@@ -1400,10 +1400,6 @@ config GPIO_TPS68470
14001400
input or output as appropriate, the sensor related GPIOs
14011401
are "output only" GPIOs.
14021402

1403-
This driver config is bool, as the GPIO functionality
1404-
of the TPS68470 must be available before dependent
1405-
drivers are loaded.
1406-
14071403
config GPIO_TQMX86
14081404
tristate "TQ-Systems QTMX86 GPIO"
14091405
depends on MFD_TQMX86 || COMPILE_TEST

drivers/gpio/gpio-altera-a10sr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/gpio/driver.h>
1111
#include <linux/mfd/altera-a10sr.h>
1212
#include <linux/module.h>
13+
#include <linux/property.h>
1314

1415
/**
1516
* struct altr_a10sr_gpio - Altera Max5 GPIO device private data structure
@@ -88,7 +89,7 @@ static int altr_a10sr_gpio_probe(struct platform_device *pdev)
8889

8990
gpio->gp = altr_a10sr_gc;
9091
gpio->gp.parent = pdev->dev.parent;
91-
gpio->gp.of_node = pdev->dev.of_node;
92+
gpio->gp.fwnode = dev_fwnode(&pdev->dev);
9293

9394
return devm_gpiochip_add_data(&pdev->dev, &gpio->gp, gpio);
9495
}

drivers/gpio/gpio-crystalcove.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,14 @@ static int crystalcove_gpio_probe(struct platform_device *pdev)
370370
return retval;
371371
}
372372

373-
return devm_gpiochip_add_data(&pdev->dev, &cg->chip, cg);
373+
retval = devm_gpiochip_add_data(&pdev->dev, &cg->chip, cg);
374+
if (retval)
375+
return retval;
376+
377+
/* Distuingish IRQ domain from others sharing (MFD) the same fwnode */
378+
irq_domain_update_bus_token(cg->chip.irq.domain, DOMAIN_BUS_WIRED);
379+
380+
return 0;
374381
}
375382

376383
static struct platform_driver crystalcove_gpio_driver = {

drivers/gpio/gpio-merrifield.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,9 @@ static int mrfld_gpio_add_pin_ranges(struct gpio_chip *chip)
409409
int retval;
410410

411411
pinctrl_dev_name = mrfld_gpio_get_pinctrl_dev_name(priv);
412+
if (!pinctrl_dev_name)
413+
return -ENOMEM;
414+
412415
for (i = 0; i < ARRAY_SIZE(mrfld_gpio_ranges); i++) {
413416
range = &mrfld_gpio_ranges[i];
414417
retval = gpiochip_add_pin_range(&priv->chip, pinctrl_dev_name,

drivers/gpio/gpio-tegra.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,6 @@ static int tegra_gpio_probe(struct platform_device *pdev)
691691
tgi->gc.base = 0;
692692
tgi->gc.ngpio = tgi->bank_count * 32;
693693
tgi->gc.parent = &pdev->dev;
694-
tgi->gc.of_node = pdev->dev.of_node;
695694

696695
tgi->ic.name = "GPIO";
697696
tgi->ic.irq_ack = tegra_gpio_irq_ack;

drivers/gpio/gpio-tps68470.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,8 @@ static struct platform_driver tps68470_gpio_driver = {
154154
},
155155
.probe = tps68470_gpio_probe,
156156
};
157+
module_platform_driver(tps68470_gpio_driver);
157158

158-
builtin_platform_driver(tps68470_gpio_driver)
159+
MODULE_ALIAS("platform:tps68470-gpio");
160+
MODULE_DESCRIPTION("GPIO driver for TPS68470 PMIC");
161+
MODULE_LICENSE("GPL v2");

0 commit comments

Comments
 (0)