提交 37db988c 编写于 作者: B Bartosz Golaszewski

Merge tag 'intel-gpio-v5.18-1' of...

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
...@@ -1390,7 +1390,7 @@ config GPIO_TPS65912 ...@@ -1390,7 +1390,7 @@ config GPIO_TPS65912
This driver supports TPS65912 GPIO chip. This driver supports TPS65912 GPIO chip.
config GPIO_TPS68470 config GPIO_TPS68470
bool "TPS68470 GPIO" tristate "TPS68470 GPIO"
depends on INTEL_SKL_INT3472 depends on INTEL_SKL_INT3472
help help
Select this option to enable GPIO driver for the TPS68470 Select this option to enable GPIO driver for the TPS68470
...@@ -1400,10 +1400,6 @@ config GPIO_TPS68470 ...@@ -1400,10 +1400,6 @@ config GPIO_TPS68470
input or output as appropriate, the sensor related GPIOs input or output as appropriate, the sensor related GPIOs
are "output only" GPIOs. are "output only" GPIOs.
This driver config is bool, as the GPIO functionality
of the TPS68470 must be available before dependent
drivers are loaded.
config GPIO_TQMX86 config GPIO_TQMX86
tristate "TQ-Systems QTMX86 GPIO" tristate "TQ-Systems QTMX86 GPIO"
depends on MFD_TQMX86 || COMPILE_TEST depends on MFD_TQMX86 || COMPILE_TEST
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <linux/gpio/driver.h> #include <linux/gpio/driver.h>
#include <linux/mfd/altera-a10sr.h> #include <linux/mfd/altera-a10sr.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/property.h>
/** /**
* struct altr_a10sr_gpio - Altera Max5 GPIO device private data structure * 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) ...@@ -88,7 +89,7 @@ static int altr_a10sr_gpio_probe(struct platform_device *pdev)
gpio->gp = altr_a10sr_gc; gpio->gp = altr_a10sr_gc;
gpio->gp.parent = pdev->dev.parent; gpio->gp.parent = pdev->dev.parent;
gpio->gp.of_node = pdev->dev.of_node; gpio->gp.fwnode = dev_fwnode(&pdev->dev);
return devm_gpiochip_add_data(&pdev->dev, &gpio->gp, gpio); return devm_gpiochip_add_data(&pdev->dev, &gpio->gp, gpio);
} }
......
...@@ -370,7 +370,14 @@ static int crystalcove_gpio_probe(struct platform_device *pdev) ...@@ -370,7 +370,14 @@ static int crystalcove_gpio_probe(struct platform_device *pdev)
return retval; return retval;
} }
return devm_gpiochip_add_data(&pdev->dev, &cg->chip, cg); retval = devm_gpiochip_add_data(&pdev->dev, &cg->chip, cg);
if (retval)
return retval;
/* Distuingish IRQ domain from others sharing (MFD) the same fwnode */
irq_domain_update_bus_token(cg->chip.irq.domain, DOMAIN_BUS_WIRED);
return 0;
} }
static struct platform_driver crystalcove_gpio_driver = { static struct platform_driver crystalcove_gpio_driver = {
......
...@@ -409,6 +409,9 @@ static int mrfld_gpio_add_pin_ranges(struct gpio_chip *chip) ...@@ -409,6 +409,9 @@ static int mrfld_gpio_add_pin_ranges(struct gpio_chip *chip)
int retval; int retval;
pinctrl_dev_name = mrfld_gpio_get_pinctrl_dev_name(priv); pinctrl_dev_name = mrfld_gpio_get_pinctrl_dev_name(priv);
if (!pinctrl_dev_name)
return -ENOMEM;
for (i = 0; i < ARRAY_SIZE(mrfld_gpio_ranges); i++) { for (i = 0; i < ARRAY_SIZE(mrfld_gpio_ranges); i++) {
range = &mrfld_gpio_ranges[i]; range = &mrfld_gpio_ranges[i];
retval = gpiochip_add_pin_range(&priv->chip, pinctrl_dev_name, retval = gpiochip_add_pin_range(&priv->chip, pinctrl_dev_name,
......
...@@ -691,7 +691,6 @@ static int tegra_gpio_probe(struct platform_device *pdev) ...@@ -691,7 +691,6 @@ static int tegra_gpio_probe(struct platform_device *pdev)
tgi->gc.base = 0; tgi->gc.base = 0;
tgi->gc.ngpio = tgi->bank_count * 32; tgi->gc.ngpio = tgi->bank_count * 32;
tgi->gc.parent = &pdev->dev; tgi->gc.parent = &pdev->dev;
tgi->gc.of_node = pdev->dev.of_node;
tgi->ic.name = "GPIO"; tgi->ic.name = "GPIO";
tgi->ic.irq_ack = tegra_gpio_irq_ack; tgi->ic.irq_ack = tegra_gpio_irq_ack;
......
...@@ -154,5 +154,8 @@ static struct platform_driver tps68470_gpio_driver = { ...@@ -154,5 +154,8 @@ static struct platform_driver tps68470_gpio_driver = {
}, },
.probe = tps68470_gpio_probe, .probe = tps68470_gpio_probe,
}; };
module_platform_driver(tps68470_gpio_driver);
builtin_platform_driver(tps68470_gpio_driver) MODULE_ALIAS("platform:tps68470-gpio");
MODULE_DESCRIPTION("GPIO driver for TPS68470 PMIC");
MODULE_LICENSE("GPL v2");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册