mbox series

[0/8] GPIO extcon modernization

Message ID 20170924145622.4031-1-linus.walleij@linaro.org
Headers show
Series GPIO extcon modernization | expand

Message

Linus Walleij Sept. 24, 2017, 2:56 p.m. UTC
Like with the GPIO mouse input, I found that this driver has no in-tree
users at all.

I *could* just propose to delete it. But the driver seems generally useful,
so I made a patch series shaping it up to get configuration from device
tree or ACPI DSDT using device properties instead.

We start off the series by defining a set of device tree bindings for it.

It would be great to have some input from the initial authors on this
rewrite. I think we would not merge any board file using the platform
data anymore, so making it an all-in device property (device tree || ACPI)
driver seems reasonable.

Linus Walleij (8):
  extcon: gpio: Add DT bindings
  extcon: gpio: Localize platform data
  extcon: gpio: Move platform data into state container
  extcon: gpio: Convert to fully use GPIO descriptor
  extcon: gpio: Request reasonable interrupts
  extcon: gpio: Get debounce setting from device property
  extcon: gpio: Get connector type from device property
  extcon: gpio: Always check state on resume

 .../devicetree/bindings/extcon/extcon-gpio.txt     |  24 ++++
 drivers/extcon/extcon-gpio.c                       | 132 ++++++++++++---------
 include/dt-bindings/extcon/connectors.h            |  38 ++++++
 include/linux/extcon/extcon-gpio.h                 |  47 --------
 4 files changed, 135 insertions(+), 106 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/extcon/extcon-gpio.txt
 create mode 100644 include/dt-bindings/extcon/connectors.h
 delete mode 100644 include/linux/extcon/extcon-gpio.h

-- 
2.13.5

Comments

Chanwoo Choi Sept. 26, 2017, 2:04 a.m. UTC | #1
Hi Linus,

On 2017년 09월 24일 23:56, Linus Walleij wrote:
> Nothing in the entire kernel #includes <linux/extcon/extcon-gpio.h>

> so move the platform data declaration inside of the driver.

> 

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  drivers/extcon/extcon-gpio.c       | 22 +++++++++++++++++-

>  include/linux/extcon/extcon-gpio.h | 47 --------------------------------------

>  2 files changed, 21 insertions(+), 48 deletions(-)

>  delete mode 100644 include/linux/extcon/extcon-gpio.h

> 

> diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c

> index ebed22f22d75..6abf5f70fdbf 100644

> --- a/drivers/extcon/extcon-gpio.c

> +++ b/drivers/extcon/extcon-gpio.c

> @@ -18,7 +18,6 @@


Actually, extcon-gpio.h defines the 'struct gpio_extcon_pdata'
in order to get the gpio and interrupt data from platform_data
before device-tree binding method. But, as you mentioned,
it is not used on kernel with platform_data method.

Looks good to me.
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>


[snip]

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics