Arizona Extcon Update Device Bindings
Subsystems (2)
v3 cover Arizona Extcon Update Device Bindings
This patch chain adds device bindings for the jack and microphone detection system specific settings.
Changes since v2:
- Now moved things over to the new extcon binding document
Thanks,
Charles
Charles Keepax (6):
extcon: arizona: Add device binding to enable ADC mode micdet
extcon: arizona: Add device binding for the general purpose switch
extcon: arizona: Add device binding for jack detect polarity
inversion
extcon: arizona: Add device binding for second jack detect pin on
GPIO5
extcon: arizona: Update DT binding documentation for mic detection
extcon: arizona: Update DT binding documentation for jack detection
.../devicetree/bindings/extcon/extcon-arizona.txt | 26 ++++++++++++++++++++ drivers/extcon/extcon-arizona.c | 13 ++++++++++ 2 files changed, 39 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.2.5
PATCH v3 1/6 extcon: arizona: Add device binding to enable ADC mode micdet
Add a simple boolean binding to turn on and off the use of ADC microphone detection mode to determine 3/4 pole jack.
--- drivers/extcon/extcon-arizona.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/extcon/extcon-arizona.c +3 -0
@@ -1236,6 +1236,9 @@ static int arizona_extcon_device_get_pdata(struct arizona *arizona) pdata->micd_force_micbias =device_property_read_bool (arizona->dev,"wlf,micd-force-micbias" ); + pdata->micd_software_compare =device_property_read_bool (arizona->dev, +"wlf,micd-software-compare" ); +return 0 ; }
Signature · 6 lines
1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 2/6 extcon: arizona: Add device binding for the general purpose switch
In reply to Charles KeepaxThe switch is generally used in conjunction with the MICDET clamp to suppress pops and clicks associated with jack insertion. This patch adds a binding that allows the user to select the mode of operation for this switch.
--- drivers/extcon/extcon-arizona.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/extcon/extcon-arizona.c +2 -0
@@ -1239,6 +1239,8 @@ static int arizona_extcon_device_get_pdata(struct arizona *arizona) pdata->micd_software_compare =device_property_read_bool (arizona->dev,"wlf,micd-software-compare" ); +device_property_read_u32 (arizona->dev,"wlf,gpsw" , &pdata->gpsw); +return 0 ; }
Signature · 1 line
1.7.2.5
PATCH v3 3/6 extcon: arizona: Add device binding for jack detect polarity inversion
In reply to Charles KeepaxBy default the driver expects the jackdet pin to be pulled low when a jack is inserted. This patch adds a device binding that allows the user to specify that the jackdet pin will be pulled high when a jack is inserted.
--- drivers/extcon/extcon-arizona.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/extcon/extcon-arizona.c +3 -0
@@ -1239,6 +1239,9 @@ static int arizona_extcon_device_get_pdata(struct arizona *arizona) pdata->micd_software_compare =device_property_read_bool (arizona->dev,"wlf,micd-software-compare" ); + pdata->jd_invert =device_property_read_bool (arizona->dev, +"wlf,jd-invert" ); +device_property_read_u32 (arizona->dev,"wlf,gpsw" , &pdata->gpsw);return 0 ;
Signature · 1 line
1.7.2.5
PATCH v3 4/6 extcon: arizona: Add device binding for second jack detect pin on GPIO5
In reply to Charles KeepaxSome Arizona devices have the option to use the GPIO5 pin as a second jack detection pin. This patch adds device bindings to specify to the driver that it should use this pin. Note that the second jack detection pin is hard wired in the chip so can only be enabled through the binding, rather than a pin being specified.
--- drivers/extcon/extcon-arizona.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/extcon/extcon-arizona.c +5 -0
@@ -1244,6 +1244,11 @@ static int arizona_extcon_device_get_pdata(struct arizona *arizona)device_property_read_u32 (arizona->dev,"wlf,gpsw" , &pdata->gpsw); + pdata->jd_gpio5 =device_property_read_bool (arizona->dev, +"wlf,use-jd-gpio" ); + pdata->jd_gpio5_nopull =device_property_read_bool (arizona->dev, +"wlf,use-jd-gpio-nopull" ); +return 0 ; }
Signature · 1 line
1.7.2.5
PATCH v3 5/6 extcon: arizona: Update DT binding documentation for mic detection
In reply to Charles KeepaxAdd additional bindings to allow configuration of the system specific microphone detection settings.
--- .../devicetree/bindings/extcon/extcon-arizona.txt | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)
Documentation/devicetree/bindings/extcon/extcon-arizona.txt +20 -0
@@ -13,3 +13,23 @@ Optional properties: ARIZONA_ACCDET_MODE_HPR or 2 - Headphone detect mode is set to HPDETR If this node is not mentioned or if the value is unknown, then headphone detection mode is set to HPDETL. + + - wlf,micd-software-compare : Use a software comparison to determine mic + presence + - wlf,micd-detect-debounce : Additional software microphone detection + debounce specified in milliseconds. + - wlf,micd-pol-gpio : GPIO specifier for the GPIO controlling the headset + polarity if one exists. + - wlf,micd-bias-start-time : Time allowed for MICBIAS to startup prior to + performing microphone detection, specified as per the ARIZONA_MICD_TIME_XXX + defines. + - wlf,micd-rate : Delay between successive microphone detection measurements, + specified as per the ARIZONA_MICD_TIME_XXX defines. + - wlf,micd-dbtime : Microphone detection hardware debounces specified as the + number of measurements to take, valid values being 2 and 4. + - wlf,micd-timeout : Timeout for microphone detection, specified in + milliseconds. + - wlf,micd-force-micbias : Force MICBIAS continuously on during microphone + detection. + + - wlf,gpsw : Settings for the general purpose switch
Signature · 1 line
1.7.2.5
Rob Herring
maintainerRe: [PATCH v3 5/6] extcon: arizona: Update DT binding documentation for mic detection
Quoted 22 lines · Charles Keepax
Add additional bindings to allow configuration of the system specific microphone detection settings.
--- .../devicetree/bindings/extcon/extcon-arizona.txt | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)Documentation/devicetree/bindings/extcon/extcon-arizona.txt +6
-0@@ -13,3 +13,23 @@ Optional properties: ARIZONA_ACCDET_MODE_HPR or 2 - Headphone detect mode is set to HPDETR If this node is not mentioned or if the value is unknown, then headphone detection mode is set to HPDETL. + + - wlf,micd-software-compare : Use a software comparison to determine mic + presence + - wlf,micd-detect-debounce : Additional software microphone detection + debounce specified in milliseconds. + - wlf,micd-pol-gpio : GPIO specifier for the GPIO controlling the headset
Documentation/devicetree/bindings/extcon/extcon-arizona.txt Optional properties: · line 31
Quoted 10 lines
Documentation/devicetree/bindings/extcon/extcon-arizona.txt +10
-0+ polarity if one exists. + - wlf,micd-bias-start-time : Time allowed for MICBIAS to startup prior to + performing microphone detection, specified as per the ARIZONA_MICD_TIME_XXX + defines. + - wlf,micd-rate : Delay between successive microphone detection measurements, + specified as per the ARIZONA_MICD_TIME_XXX defines. + - wlf,micd-dbtime : Microphone detection hardware debounces specified as the + number of measurements to take, valid values being 2 and 4. + - wlf,micd-timeout : Timeout for microphone detection, specified in + milliseconds.
Please add unit suffix (-ms).
Quoted 11 lines
Documentation/devicetree/bindings/extcon/extcon-arizona.txt +4
-0+ - wlf,micd-force-micbias : Force MICBIAS continuously on during microphone + detection. + + - wlf,gpsw : Settings for the general purpose switchSignature · 6 lines
1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 5/6] extcon: arizona: Update DT binding documentation for mic detection
Quoted 27 lines · Rob Herring
Quoted 26 lines · Charles Keepax
Add additional bindings to allow configuration of the system specific microphone detection settings.
--- .../devicetree/bindings/extcon/extcon-arizona.txt | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)Documentation/devicetree/bindings/extcon/extcon-arizona.txt +10
-0@@ -13,3 +13,23 @@ Optional properties: ARIZONA_ACCDET_MODE_HPR or 2 - Headphone detect mode is set to HPDETR If this node is not mentioned or if the value is unknown, then headphone detection mode is set to HPDETL. + + - wlf,micd-software-compare : Use a software comparison to determine mic + presence + - wlf,micd-detect-debounce : Additional software microphone detection + debounce specified in milliseconds. + - wlf,micd-pol-gpio : GPIO specifier for the GPIO controlling the headset + polarity if one exists. + - wlf,micd-bias-start-time : Time allowed for MICBIAS to startup prior to + performing microphone detection, specified as per the ARIZONA_MICD_TIME_XXX + defines.
Quoted 8 lines
Documentation/devicetree/bindings/extcon/extcon-arizona.txt Optional properties: · line 31
Quoted 6 lines
Documentation/devicetree/bindings/extcon/extcon-arizona.txt +6
-0+ - wlf,micd-rate : Delay between successive microphone detection measurements, + specified as per the ARIZONA_MICD_TIME_XXX defines. + - wlf,micd-dbtime : Microphone detection hardware debounces specified as the + number of measurements to take, valid values being 2 and 4. + - wlf,micd-timeout : Timeout for microphone detection, specified in + milliseconds.Please add unit suffix (-ms).
Yeah can do will ping out a small patch to update this as well.
Thanks,
Charles
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 6/6 extcon: arizona: Update DT binding documentation for jack detection
In reply to Charles KeepaxAdd additional bindings for both inverting the polarity of the jack detection pins and allowing the use of a second jack detection pin. Note that the second jack detection pin is hard wired in the chip so can only be enabled through the binding, rather than a pin being specified.
--- .../devicetree/bindings/extcon/extcon-arizona.txt | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
Documentation/devicetree/bindings/extcon/extcon-arizona.txt +6 -0
@@ -14,6 +14,12 @@ Optional properties: If this node is not mentioned or if the value is unknown, then headphone detection mode is set to HPDETL. + - wlf,use-jd-gpio : Use GPIO input along with JD1 for dual pin jack + detection. + - wlf,use-jd-gpio-nopull : Internal pull on GPIO is disabled when used for + jack detection. + - wlf,jd-invert : Invert the polarity of the jack detection switch + - wlf,micd-software-compare : Use a software comparison to determine mic presence - wlf,micd-detect-debounce : Additional software microphone detection
Signature · 1 line
1.7.2.5
Chanwoo Choi
maintainerRe: [PATCH v3 6/6] extcon: arizona: Update DT binding documentation for jack detection
Hi Charles,
Quoted 16 lines · Charles Keepax
Add additional bindings for both inverting the polarity of the jack detection pins and allowing the use of a second jack detection pin. Note that the second jack detection pin is hard wired in the chip so can only be enabled through the binding, rather than a pin being specified.
Reviewed-by Chanwoo Choi <[email protected]>--- .../devicetree/bindings/extcon/extcon-arizona.txt | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)Documentation/devicetree/bindings/extcon/extcon-arizona.txt +0
-0
Documentation/devicetree/bindings/extcon/extcon-arizona.txt Optional properties: · line 18
Quoted 5 lines
Documentation/devicetree/bindings/extcon/extcon-arizona.txt +2
-0@@ -14,6 +14,12 @@ Optional properties: If this node is not mentioned or if the value is unknown, then headphone detection mode is set to HPDETL. + - wlf,use-jd-gpio : Use GPIO input along with JD1 for dual pin jack + detection.
This property naming might cause the confusion. If some don't know the knowledge of extcon-arizona, it seems like the specific GPIO pin.
But I'll apply the all patches of this patchset because these patchest take the too long time for review.
I'd like you to modify the this property name on later patch.
Thanks,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Chanwoo Choi
maintainerHi,
Quoted 19 lines · Charles Keepax
This patch chain adds device bindings for the jack and microphone detection system specific settings.
Changes since v2:
- Now moved things over to the new extcon binding documentThanks,
CharlesCharles Keepax (6):
extcon: arizona: Add device binding to enable ADC mode micdet
extcon: arizona: Add device binding for the general purpose switch
extcon: arizona: Add device binding for jack detect polarity
inversion
extcon: arizona: Add device binding for second jack detect pin on
GPIO5
extcon: arizona: Update DT binding documentation for mic detection
extcon: arizona: Update DT binding documentation for jack detection
Quoted 4 lines
.../devicetree/bindings/extcon/extcon-arizona.txt | 26 ++++++++++++++++++++ drivers/extcon/extcon-arizona.c | 13 ++++++++++ 2 files changed, 39 insertions(+), 0 deletions(-)
Applied them.
Thanks,
Chanwoo Choi