gpio: add Intel WhiskeyCove PMIC GPIO driver
Subsystems (3)
PATCH v7 1/1 gpio: add Intel WhiskeyCove PMIC GPIO driver
This patch introduces a separate GPIO driver for Intel WhiskeyCove PMIC. This driver is based on gpio-crystalcove.c.
---
Changes in v7:
- Fixed various coding style comments from Andy Shevchenko
Changes in v6:
- Removed unnecessary wcove_gpio_remove()
- Used devm_gpiochip_remove() instead of gpiochip_remove()
- Various coding style changes per Mika's comment
Changes in v5:
- Revisited the interrupt handler code to iterate until all pending interrupts are handled. This change is to avoid missing interrupt when we're inside the interrupt handler.
- Used regmap_bulk_read() to read address adjacent registers.
Changes in v4:
- Converted CTLI_INTCNT_XX macros to less verbose ones INT_DETECT_XX.
- Add comments about why there is no .pm for the driver.
- Header files re-ordered.
- Various coding style change to address Andy's comments.
Changes in v3:
- Fixed the year in copyright line(2015-->2016).
- Removed DRV_NAME macro.
- Added kernel-doc for regmap_irq_chip of the wcove_gpio structure.
- Line length fix.
Changes in v2:
- Typo fix (Whsikey --> Whiskey).
- Included linux/gpio/driver.h instead of linux/gpio.h
- Implemented .set_single_ended().
- Added GPIO register description.
- Replaced container_of() with gpiochip_get_data().
- Removed unnecessary "if (gpio > WCOVE_VGPIO_NUM" check.
- Removed the device id table and added MODULE_ALIAS().
drivers/gpio/Kconfig | 13 ++ drivers/gpio/Makefile | 1 + drivers/gpio/gpio-wcove.c | 455 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 469 insertions(+) create mode 100644 drivers/gpio/gpio-wcove.c
drivers/gpio/Kconfig +13 -0
@@ -972,6 +972,19 @@ config GPIO_UCB1400 This enables support for the Philips UCB1400 GPIO pins. The UCB1400 is an AC97 audio codec. +config GPIO_WHISKEY_COVE + tristate "GPIO support for Whiskey Cove PMIC" + depends on INTEL_SOC_PMIC + select GPIOLIB_IRQCHIP + help + Support for GPIO pins on Whiskey Cove PMIC. + + Say Yes if you have a Intel SoC based tablet with Whiskey Cove PMIC + inside. + + This driver can also be built as a module. If so, the module will be + called gpio-wcove. + config GPIO_WM831X tristate "WM831x GPIOs" depends on MFD_WM831X
drivers/gpio/Makefile +1 -0
@@ -118,6 +118,7 @@ obj-$(CONFIG_GPIO_VF610) += gpio-vf610.o obj-$(CONFIG_GPIO_VIPERBOARD) += gpio-viperboard.o obj-$(CONFIG_GPIO_VR41XX) += gpio-vr41xx.o obj-$(CONFIG_GPIO_VX855) += gpio-vx855.o +obj-$(CONFIG_GPIO_WHISKEY_COVE) += gpio-wcove.o obj-$(CONFIG_GPIO_WM831X) += gpio-wm831x.o obj-$(CONFIG_GPIO_WM8350) += gpio-wm8350.o obj-$(CONFIG_GPIO_WM8994) += gpio-wm8994.o
drivers/gpio/gpio-wcove.c new file +455 -0
455 lines not on this page · raw message
Signature · 1 line
1.9.1
Quoted 9 lines · Bin Gao
This patch introduces a separate GPIO driver for Intel WhiskeyCove PMIC. This driver is based on
gpio-crystalcove.c.Signed-off-by Ajay Thomas <[email protected]>Signed-off-by Bin Gao <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Reviewed-by Mika Westerberg <[email protected]>---
Changes in v7:
This v7 patch applied.
Can you please send a separate patch adding .get_direction() to the gpiochip? It's a feature I've been pushing more and more recently.
Yours,
Linus Walleij
Quoted 4 lines · Bin Gao
This patch introduces a separate GPIO driver for Intel WhiskeyCove PMIC. This driver is based on
gpio-crystalcove.c.Signed-off-by Ajay Thomas <[email protected]>
This looks like an invalid address, and ....
Quoted 4 lines
Signed-off-by Bin Gao <[email protected]>Reviewed-by Andy Shevchenko <[email protected]>Reviewed-by Mika Westerberg <[email protected]>---
[....]
drivers/gpio/gpio-wcove.c line 451
Quoted 3 lines
drivers/gpio/gpio-wcove.c new file +3
-0+module_platform_driver (wcove_gpio_driver); + +MODULE_AUTHOR ("Ajay Thomas <[email protected]>" );
...the same here. In fact it sure looks like two names. Anyway I just got a bounce when I tried to use it...
Paul.
--
Quoted 7 lines
drivers/gpio/gpio-wcove.c new file +4
-1+MODULE_AUTHOR ("Bin Gao <[email protected]>" ); +MODULE_DESCRIPTION ("Intel Whiskey Cove GPIO Driver" ); +MODULE_LICENSE ("GPL v2" ); +MODULE_ALIAS ("platform:bxt_wcove_gpio" ); --1.9.1
Quoted 8 lines · Paul Gortmaker
Quoted 1 line
Signed-off-by Ajay Thomas <[email protected]>This looks like an invalid address, and ....
Quoted 1 line
+MODULE_AUTHOR("Ajay Thomas <[email protected]>");
...the same here. In fact it sure looks like two names. Anyway I just got a bounce when I tried to use it...
It might be that person is no longer working for Intel, though I think It would be better log message for that.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 6 lines · [Re: [PATCH v7] gpio: add Intel WhiskeyCove PMIC GPIO driver] On 13/09/2016…
Quoted 3 lines · Paul Gortmaker
Quoted 1 line
Signed-off-by Ajay Thomas <[email protected]>This looks like an invalid address, and ....
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
+MODULE_AUTHOR("Ajay Thomas <[email protected]>");
...the same here. In fact it sure looks like two names. Anyway I just got a bounce when I tried to use it...
It might be that person is no longer working for Intel, though I think It would be better log message for that.
That might make sense if the driver was old, but it hasn't even hit mainline yet -- it is only in linux-next, so it cant be more than a few weeks old.
P.
--
Quoted 4 lines
Signature · 3 lines
-- With Best Regards, Andy Shevchenko
Quoted 7 lines · Paul Gortmaker
Quoted 7 lines
Quoted 6 lines
This looks like an invalid address, and ....
Quoted 1 line
+MODULE_AUTHOR("Ajay Thomas <[email protected]>");
...the same here. In fact it sure looks like two names. Anyway I just got a bounce when I tried to use it...
Quoted 6 lines
Quoted 2 lines
It might be that person is no longer working for Intel, though I think It would be better log message for that.
That might make sense if the driver was old, but it hasn't even hit mainline yet -- it is only in linux-next, so it cant be more than a few weeks old.
It's already quite off topic, so, I would just say that it is still valid point. Starting from some version of the series (which takes couple of months?) Bin Gao did improvements.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 12 lines · [Re: [PATCH v7] gpio: add Intel WhiskeyCove PMIC GPIO driver] On 13/09/2016…
Quoted 10 lines · Paul Gortmaker
Quoted 9 lines
Quoted 6 lines
This looks like an invalid address, and ....
Quoted 1 line
+MODULE_AUTHOR("Ajay Thomas <[email protected]>");
...the same here. In fact it sure looks like two names. Anyway I just got a bounce when I tried to use it...
It might be that person is no longer working for Intel, though I think It would be better log message for that.
Quoted 7 lines
Quoted 3 lines
That might make sense if the driver was old, but it hasn't even hit mainline yet -- it is only in linux-next, so it cant be more than a few weeks old.
It's already quite off topic, so, I would just say that it is still valid point. Starting from some version of the series (which takes couple of months?) Bin Gao did improvements.
Not sure why you would call it off topic -- a new driver appearing in mainline should have a valid author entry, and if it is an accidental merge of two names into one then Bin Gao is the person who can ack that and subsequently fix it.
P.
--
Quoted 4 lines
Signature · 3 lines
-- With Best Regards, Andy Shevchenko
Quoted 17 lines · Paul Gortmaker
Quoted 17 lines
Quoted 14 lines · Paul Gortmaker
Quoted 10 lines
Quoted 7 lines
This looks like an invalid address, and ....
Quoted 2 lines
+MODULE_AUTHOR("Ajay Thomas
+<[email protected]>");...the same here. In fact it sure looks like two names. Anyway I just got a bounce when I tried to use it...
It might be that person is no longer working for Intel, though I think It would be better log message for that.
That might make sense if the driver was old, but it hasn't even hit mainline yet -- it is only in linux-next, so it cant be more than a few weeks old.
Quoted 7 lines
Quoted 3 lines
It's already quite off topic, so, I would just say that it is still valid point. Starting from some version of the series (which takes couple of months?) Bin Gao did improvements.
Not sure why you would call it off topic -- a new driver appearing in mainline should have a valid author entry, and if it is an accidental merge of two names into one then Bin Gao is the person who can ack that and subsequently fix it.
P.
The original email is correct and it's not an accidental merge of two names. The cause is Ajay quitted Intel one month back so his email address is no longer valid.
-Bin