extcon: gpio: Add the support for Device tree bindings
Quoted 5 lines
This patch adds the support for Device tree bindings of extcon-gpio driver.
The extcon-gpio device tree node must include the both 'extcon-id' and 'extcon-gpio' property.
[]
Quoted 2 lines
Signed-off-by Chanwoo Choi <[email protected]>
Except for some beautification issues described below,
Documentation/devicetree/bindings/extcon/extcon-gpio.txt
Quoted 22 lines
---
This patch is based on following patch[1].
[1] https://lkml.org/lkml/2015/10/3/304Changes from v1:
- Create theinclude/dt-bindings/extcon/extcon.hincluding the identification of external connector. These definitions are used in dts file.
- Fix error ifCONFIG_OFis disabled..../devicetree/bindings/extcon/extcon-gpio.txt | 38 +++++++ drivers/extcon/extcon-gpio.c | 110 ++++++++++++++++----- include/dt-bindings/extcon/extcon.h | 44 +++++++++ include/linux/extcon/extcon-gpio.h | 6 +- 4 files changed, 173 insertions(+), 25 deletions(-) create mode 100644 Documentation/devicetree/bindings/extcon/extcon-gpio.txt create mode 100644 include/dt-bindings/extcon/extcon.hDocumentation/devicetree/bindings/extcon/extcon-gpio.txt new file +0
-0
[]
Quoted 5 lines
drivers/extcon/extcon-gpio.c +0
-0
drivers/extcon/extcon-gpio.c line 8
Quoted 10 lines
drivers/extcon/extcon-gpio.c +2
-2@@ -1,8 +1,8 @@/* * extcon_gpio.c - Single-state GPIO extcon driver based on extcon class * -* Copyright (C) 2008 Google, Inc. -* Author: Mike Lockwood <[email protected]> +* Copyright (C) 2015 Chanwoo Choi <[email protected]>, Samsung Electronics +* Copyright (C) 2008 Mike Lockwood <[email protected]>, Google, Inc. * * Modified by MyungJoo Ham <[email protected]> to support extcon * (originally switch class is supported)
Let's make it in chronological order.
(may need to "beautify the last two lines as well)
I.e., 2008-->2012-->2015 or 2015-->2012-->2008.
Not 2015-->2008-->2012
drivers/extcon/extcon-gpio.c
Quoted 1 line
drivers/extcon/extcon-gpio.c +0
-0@@ -26,12 +26,14 @@
[]
include/dt-bindings/extcon/extcon.h
Quoted 5 lines
include/dt-bindings/extcon/extcon.h new file +0
-0
[]
include/linux/extcon/extcon-gpio.h
Quoted 4 lines
include/linux/extcon/extcon-gpio.h +0
-0
[]
include/linux/extcon/extcon-gpio.h struct gpio_extcon_pdata { · line 41
Quoted 6 lines
include/linux/extcon/extcon-gpio.h +1
-1@@ -38,7 +38,7 @@ struct gpio_extcon_pdata {unsigned int extcon_id;unsigned gpio;bool gpio_active_low; -unsigned long debounce; +unsigned int debounce;
What about u32, making it more clear?
( > + device_property_read_u32(dev, "debounce-ms", &pdata->debounce); )
Quoted 5 lines
include/linux/extcon/extcon-gpio.h +0
-0unsigned long irq_flags;bool check_on_resume;Signature · 1 line
1.8.0
Quoted 56 lines · MyungJoo Ham
Quoted 5 lines
This patch adds the support for Device tree bindings of extcon-gpio driver.
The extcon-gpio device tree node must include the both 'extcon-id' and 'extcon-gpio' property.[]
Quoted 2 lines
Signed-off-by Chanwoo Choi <[email protected]>Except for some beautification issues described below,
Signed-off-by MyungJoo Ham <[email protected]>Documentation/devicetree/bindings/extcon/extcon-gpio.txt
Quoted 22 lines
---
This patch is based on following patch[1].
[1] https://lkml.org/lkml/2015/10/3/304Changes from v1:
- Create theinclude/dt-bindings/extcon/extcon.hincluding the identification of external connector. These definitions are used in dts file.
- Fix error ifCONFIG_OFis disabled..../devicetree/bindings/extcon/extcon-gpio.txt | 38 +++++++ drivers/extcon/extcon-gpio.c | 110 ++++++++++++++++----- include/dt-bindings/extcon/extcon.h | 44 +++++++++ include/linux/extcon/extcon-gpio.h | 6 +- 4 files changed, 173 insertions(+), 25 deletions(-) create mode 100644 Documentation/devicetree/bindings/extcon/extcon-gpio.txt create mode 100644 include/dt-bindings/extcon/extcon.hDocumentation/devicetree/bindings/extcon/extcon-gpio.txt new file +0
-0[]
Quoted 5 lines
drivers/extcon/extcon-gpio.c +0
-0drivers/extcon/extcon-gpio.c line 8
Quoted 10 lines
drivers/extcon/extcon-gpio.c +2
-2@@ -1,8 +1,8 @@/* * extcon_gpio.c - Single-state GPIO extcon driver based on extcon class * -* Copyright (C) 2008 Google, Inc. -* Author: Mike Lockwood <[email protected]> +* Copyright (C) 2015 Chanwoo Choi <[email protected]>, Samsung Electronics +* Copyright (C) 2008 Mike Lockwood <[email protected]>, Google, Inc. * * Modified by MyungJoo Ham <[email protected]> to support extcon * (originally switch class is supported) Let's make it in chronological order.
(may need to "beautify the last two lines as well)
Quoted 2 lines
I.e., 2008-->2012-->2015 or 2015-->2012-->2008.
Not 2015-->2008-->2012
OK. I'll modify it.
Quoted 15 lines
drivers/extcon/extcon-gpio.c
Quoted 3 lines
drivers/extcon/extcon-gpio.c +0
-0@@ -26,12 +26,14 @@[]
include/dt-bindings/extcon/extcon.h
Quoted 5 lines
include/dt-bindings/extcon/extcon.h new file +0
-0[]
include/linux/extcon/extcon-gpio.h
Quoted 4 lines
include/linux/extcon/extcon-gpio.h +0
-0[]
Quoted 9 lines
include/linux/extcon/extcon-gpio.h struct gpio_extcon_pdata { · line 41
Quoted 6 lines
include/linux/extcon/extcon-gpio.h +1
-1@@ -38,7 +38,7 @@ struct gpio_extcon_pdata {unsigned int extcon_id;unsigned gpio;bool gpio_active_low; -unsigned long debounce; +unsigned int debounce;What about u32, making it more clear?
( > +device_property_read_u32(dev, "debounce-ms", &pdata->debounce); )
OK.
Thanks,
Chanwoo Choi