Skip to contentSkip to conversation

pinctrl: baytrail: Add back Baytrail-T ACPI ID

PATCH In review Mika Westerberg 3 participants 7 messages May 15, 2014 – May 23, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pinctrl: baytrail: Add back Baytrail-T ACPI ID

From: Jin Yao <[email protected]>

Now that the x86 dynamic IRQ allocation problem has been resolved with commmit 62a08ae2a576 (genirq: x86: Ensure that dynamic irq allocation does not conflict), we can add back Baytrail-T ACPI ID to the pinctrl driver.

This makes the driver to work on Asus T100 where it is needed for several things like ACPI GPIO events and SD card detection.

References: https://bugzilla.kernel.org/show_bug.cgi?id=68291

---
 drivers/acpi/acpi_lpss.c           | 1 +
 drivers/pinctrl/pinctrl-baytrail.c | 1 +
 2 files changed, 2 insertions(+)
drivers/acpi/acpi_lpss.c +1 -0
index 24e49a52cefb..c314d709e5a6 100644
@@ -189,6 +189,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
 	{ "80860F14", (unsigned long)&byt_sdio_dev_desc },
 	{ "80860F41", (unsigned long)&byt_i2c_dev_desc },
 	{ "INT33B2", },
+	{ "INT33FC", },
 
 	{ "INT3430", (unsigned long)&lpt_dev_desc },
 	{ "INT3431", (unsigned long)&lpt_dev_desc },
drivers/pinctrl/pinctrl-baytrail.c +1 -0
index 6e8301f77187..447f1dc25ea6 100644
@@ -572,6 +572,7 @@ static const struct dev_pm_ops byt_gpio_pm_ops = {
 
 static const struct acpi_device_id byt_gpio_acpi_match[] = {
 	{ "INT33B2", 0 },
+	{ "INT33FC", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, byt_gpio_acpi_match);
Signature · 1 line
2.0.0.rc2
#1 lore raw

PATCH 2/2 pinctrl: baytrail: Register GPIO chip after chip->to_irq is set

From: Jin Yao <[email protected]>

If chip->to_irq is NULL ACPI GPIO helpers don't register GPIO event handlers thus preventing any ACPI GPIO triggered events. Solve this by calling gpiochip_add() after we have set up drivers chip->to_irq hook.

---
 drivers/pinctrl/pinctrl-baytrail.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/pinctrl/pinctrl-baytrail.c +6 -6
index 447f1dc25ea6..7c65c9dab215 100644
@@ -527,12 +527,6 @@ static int byt_gpio_probe(struct platform_device *pdev)
 	gc->can_sleep = false;
 	gc->dev = dev;
 
-	ret = gpiochip_add(gc);
-	if (ret) {
-		dev_err(&pdev->dev, "failed adding byt-gpio chip\n");
-		return ret;
-	}
-
 	/* set up interrupts  */
 	irq_rc = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 	if (irq_rc && irq_rc->start) {
@@ -550,6 +544,12 @@ static int byt_gpio_probe(struct platform_device *pdev)
 		irq_set_chained_handler(hwirq, byt_gpio_irq_handler);
 	}
 
+	ret = gpiochip_add(gc);
+	if (ret) {
+		dev_err(&pdev->dev, "failed adding byt-gpio chip\n");
+		return ret;
+	}
+
 	pm_runtime_enable(dev);
 
 	return 0;
Signature · 1 line
2.0.0.rc2
#2 lore raw

Re: [PATCH 2/2] pinctrl: baytrail: Register GPIO chip after chip->to_irq is set

Quoted 8 lines · Mika Westerberg

From: Jin Yao <[email protected]>

If chip->to_irq is NULL ACPI GPIO helpers don't register GPIO event handlers thus preventing any ACPI GPIO triggered events. Solve this by calling gpiochip_add() after we have set up drivers chip->to_irq hook.

Patch applied for fixes, sorry for running a bit late, we are late.

Yours,
Linus Walleij

Acked-by on v1 1/2
#3 lore raw
In reply to Mika Westerberg
Quoted 6 lines · Mika Westerberg

From: Jin Yao <[email protected]>

Now that the x86 dynamic IRQ allocation problem has been resolved with commmit 62a08ae2a576 (genirq: x86: Ensure that dynamic irq allocation does not conflict), we can add back Baytrail-T ACPI ID to the pinctrl driver.

Quoted 6 lines

This makes the driver to work on Asus T100 where it is needed for several things like ACPI GPIO events and SD card detection.

References: https://bugzilla.kernel.org/show_bug.cgi?id=68291

And I think this is pinctrl material really.

Quoted 30 lines
---
 drivers/acpi/acpi_lpss.c           | 1 +
 drivers/pinctrl/pinctrl-baytrail.c | 1 +
 2 files changed, 2 insertions(+)
drivers/acpi/acpi_lpss.c +1 -0
index 24e49a52cefb..c314d709e5a6 100644
@@ -189,6 +189,7 @@ static const struct acpi_device_id acpi_lpss_device_ids[] = {
 	{ "80860F14", (unsigned long)&byt_sdio_dev_desc },
 	{ "80860F41", (unsigned long)&byt_i2c_dev_desc },
 	{ "INT33B2", },
+	{ "INT33FC", },
 
 	{ "INT3430", (unsigned long)&lpt_dev_desc },
 	{ "INT3431", (unsigned long)&lpt_dev_desc },
drivers/pinctrl/pinctrl-baytrail.c +1 -0
index 6e8301f77187..447f1dc25ea6 100644
@@ -572,6 +572,7 @@ static const struct dev_pm_ops byt_gpio_pm_ops = {
 
 static const struct acpi_device_id byt_gpio_acpi_match[] = {
 	{ "INT33B2", 0 },
+	{ "INT33FC", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, byt_gpio_acpi_match);
Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
#4 lore raw
Quoted 7 lines · Rafael J. Wysocki
Quoted 6 lines · Mika Westerberg

From: Jin Yao <[email protected]>

Now that the x86 dynamic IRQ allocation problem has been resolved with commmit 62a08ae2a576 (genirq: x86: Ensure that dynamic irq allocation does not conflict), we can add back Baytrail-T ACPI ID to the pinctrl driver.

Quoted 8 lines
Quoted 6 lines

This makes the driver to work on Asus T100 where it is needed for several things like ACPI GPIO events and SD card detection.

References: https://bugzilla.kernel.org/show_bug.cgi?id=68291

Thanks!

Quoted 1 line

And I think this is pinctrl material really.

Indeed, only one change touches drivers/acpi/ but wanted to keep you in the loop. I'm hoping that Linus W. takes these.

#5 lore raw
In reply to Mika Westerberg
Quoted 6 lines · Mika Westerberg

From: Jin Yao <[email protected]>

Now that the x86 dynamic IRQ allocation problem has been resolved with commmit 62a08ae2a576 (genirq: x86: Ensure that dynamic irq allocation does not conflict), we can add back Baytrail-T ACPI ID to the pinctrl driver.

Quoted 6 lines

This makes the driver to work on Asus T100 where it is needed for several things like ACPI GPIO events and SD card detection.

References: https://bugzilla.kernel.org/show_bug.cgi?id=68291

Patch applied with Rafael's ACK.

Applying this and 2/2 to v3.16 though, protest if there is a problem with this.

Yours,
Linus Walleij

#6 lore raw
Quoted 12 lines · Linus Walleij
Quoted 9 lines · Mika Westerberg

From: Jin Yao <[email protected]>

Now that the x86 dynamic IRQ allocation problem has been resolved with commmit 62a08ae2a576 (genirq: x86: Ensure that dynamic irq allocation does not conflict), we can add back Baytrail-T ACPI ID to the pinctrl driver.

This makes the driver to work on Asus T100 where it is needed for several things like ACPI GPIO events and SD card detection.

Quoted 7 lines
Quoted 3 lines

References: https://bugzilla.kernel.org/show_bug.cgi?id=68291

Patch applied with Rafael's ACK.

Applying this and 2/2 to v3.16 though, protest if there is a problem with this.

v3.16 is fine. Thanks!