diff options
author | Mark Brown <broonie@kernel.org> | 2018-01-18 14:55:32 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-01-18 14:55:32 +0300 |
commit | b68cbc1d1d5c153dffa877fa612f70b2338a1d5a (patch) | |
tree | fd13e0196d6e6f7558e6dddf2a707425e392b0f1 /drivers/gpio | |
parent | 49fdfe365513684a4b2d8a421e1383084eef5273 (diff) | |
parent | e29a22a86a20ea7651ff8c731ab034c31bd9764e (diff) | |
download | linux-b68cbc1d1d5c153dffa877fa612f70b2338a1d5a.tar.xz |
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-merrifield.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-merrifield.c b/drivers/gpio/gpio-merrifield.c index dd67a31ac337..c38624ea0251 100644 --- a/drivers/gpio/gpio-merrifield.c +++ b/drivers/gpio/gpio-merrifield.c @@ -9,6 +9,7 @@ * published by the Free Software Foundation. */ +#include <linux/acpi.h> #include <linux/bitops.h> #include <linux/gpio/driver.h> #include <linux/init.h> @@ -380,9 +381,16 @@ static void mrfld_irq_init_hw(struct mrfld_gpio *priv) } } +static const char *mrfld_gpio_get_pinctrl_dev_name(void) +{ + const char *dev_name = acpi_dev_get_first_match_name("INTC1002", NULL, -1); + return dev_name ? dev_name : "pinctrl-merrifield"; +} + static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id) { const struct mrfld_gpio_pinrange *range; + const char *pinctrl_dev_name; struct mrfld_gpio *priv; u32 gpio_base, irq_base; void __iomem *base; @@ -439,10 +447,11 @@ static int mrfld_gpio_probe(struct pci_dev *pdev, const struct pci_device_id *id return retval; } + pinctrl_dev_name = mrfld_gpio_get_pinctrl_dev_name(); for (i = 0; i < ARRAY_SIZE(mrfld_gpio_ranges); i++) { range = &mrfld_gpio_ranges[i]; retval = gpiochip_add_pin_range(&priv->chip, - "pinctrl-merrifield", + pinctrl_dev_name, range->gpio_base, range->pin_base, range->npins); |