diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-02-28 11:22:08 -0500 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2018-03-21 00:58:07 -0400 |
commit | eca0f13c836a0d29fc2a713330698f08b743e86a (patch) | |
tree | c0edda6c95d699d365ca8587e6b12cf39496df7a /drivers/extcon | |
parent | ad49aee401dd1997ec71360df6e51a91ad3cf516 (diff) |
extcon: int3496: Ignore incorrect IoRestriction for ID pin
The commit
70216fd937fe ("extcon: int3496: Set the id pin to direction-input if necessary")
introduced a workaround for incorrect IoRestriction mode in ACPI table.
Now, when GPIO ACPI library does it in generic way, see the commit
1b2ca32ab0b8 ("gpiolib: acpi: Introduce NO_RESTRICTION quirk")
for the details, just set an appropriate quirk flag instead.
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-intel-int3496.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c index 191e99f06a9a..acaccb128fc4 100644 --- a/drivers/extcon/extcon-intel-int3496.c +++ b/drivers/extcon/extcon-intel-int3496.c | |||
@@ -50,7 +50,11 @@ static const struct acpi_gpio_params vbus_gpios = { INT3496_GPIO_VBUS_EN, 0, fal | |||
50 | static const struct acpi_gpio_params mux_gpios = { INT3496_GPIO_USB_MUX, 0, false }; | 50 | static const struct acpi_gpio_params mux_gpios = { INT3496_GPIO_USB_MUX, 0, false }; |
51 | 51 | ||
52 | static const struct acpi_gpio_mapping acpi_int3496_default_gpios[] = { | 52 | static const struct acpi_gpio_mapping acpi_int3496_default_gpios[] = { |
53 | { "id-gpios", &id_gpios, 1 }, | 53 | /* |
54 | * Some platforms have a bug in ACPI GPIO description making IRQ | ||
55 | * GPIO to be output only. Ask the GPIO core to ignore this limit. | ||
56 | */ | ||
57 | { "id-gpios", &id_gpios, 1, ACPI_GPIO_QUIRK_NO_IO_RESTRICTION }, | ||
54 | { "vbus-gpios", &vbus_gpios, 1 }, | 58 | { "vbus-gpios", &vbus_gpios, 1 }, |
55 | { "mux-gpios", &mux_gpios, 1 }, | 59 | { "mux-gpios", &mux_gpios, 1 }, |
56 | { }, | 60 | { }, |
@@ -112,9 +116,6 @@ static int int3496_probe(struct platform_device *pdev) | |||
112 | ret = PTR_ERR(data->gpio_usb_id); | 116 | ret = PTR_ERR(data->gpio_usb_id); |
113 | dev_err(dev, "can't request USB ID GPIO: %d\n", ret); | 117 | dev_err(dev, "can't request USB ID GPIO: %d\n", ret); |
114 | return ret; | 118 | return ret; |
115 | } else if (gpiod_get_direction(data->gpio_usb_id) != GPIOF_DIR_IN) { | ||
116 | dev_warn(dev, FW_BUG "USB ID GPIO not in input mode, fixing\n"); | ||
117 | gpiod_direction_input(data->gpio_usb_id); | ||
118 | } | 119 | } |
119 | 120 | ||
120 | data->usb_id_irq = gpiod_to_irq(data->gpio_usb_id); | 121 | data->usb_id_irq = gpiod_to_irq(data->gpio_usb_id); |