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(-)
--
1.7.2.5
Add a simple boolean binding to turn on and off the use of ADC
microphone detection mode to determine 3/4 pole jack.
Signed-off-by: Charles Keepax <[email protected]>
Acked-by: Chanwoo Choi <[email protected]>
---
drivers/extcon/extcon-arizona.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index e4890dd..af3afee 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -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;
}
--
1.7.2.5
The 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.
Signed-off-by: Charles Keepax <[email protected]>
Acked-by: Chanwoo Choi <[email protected]>
---
drivers/extcon/extcon-arizona.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index af3afee..493da5b 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -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;
}
--
1.7.2.5
By 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.
Signed-off-by: Charles Keepax <[email protected]>
Acked-by: Chanwoo Choi <[email protected]>
---
drivers/extcon/extcon-arizona.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 493da5b..27ddf9c 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -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;
--
1.7.2.5
Some 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.
Signed-off-by: Charles Keepax <[email protected]>
Acked-by: Chanwoo Choi <[email protected]>
---
drivers/extcon/extcon-arizona.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 27ddf9c..7c9598d 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -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;
}
--
1.7.2.5
Add additional bindings to allow configuration of the system specific
microphone detection settings.
Signed-off-by: Charles Keepax <[email protected]>
---
.../devicetree/bindings/extcon/extcon-arizona.txt | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
index e1705fa..d661811 100644
--- a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
+++ b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
@@ -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
--
1.7.2.5
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.
Signed-off-by: Charles Keepax <[email protected]>
Reviewed-by: Chanwoo Choi <[email protected]>
---
.../devicetree/bindings/extcon/extcon-arizona.txt | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
index d661811..7640a35 100644
--- a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
+++ b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
@@ -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
--
1.7.2.5
Hi Charles,
On 2015년 11월 20일 00:45, Charles Keepax wrote:
> 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.
>
> Signed-off-by: Charles Keepax <[email protected]>
> Reviewed-by: Chanwoo Choi <[email protected]>
> ---
> .../devicetree/bindings/extcon/extcon-arizona.txt | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> index d661811..7640a35 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> +++ b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> @@ -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
Hi,
On 2015년 11월 20일 00:45, Charles Keepax wrote:
> 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(-)
>
Applied them.
Thanks,
Chanwoo Choi
On Thu, Nov 19, 2015 at 03:45:39PM +0000, Charles Keepax wrote:
> Add additional bindings to allow configuration of the system specific
> microphone detection settings.
>
> Signed-off-by: Charles Keepax <[email protected]>
> ---
> .../devicetree/bindings/extcon/extcon-arizona.txt | 20 ++++++++++++++++++++
> 1 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> index e1705fa..d661811 100644
> --- a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> +++ b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> @@ -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.
Please add unit suffix (-ms).
> + - wlf,micd-force-micbias : Force MICBIAS continuously on during microphone
> + detection.
> +
> + - wlf,gpsw : Settings for the general purpose switch
> --
> 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
On Fri, Nov 20, 2015 at 09:58:33AM -0600, Rob Herring wrote:
> On Thu, Nov 19, 2015 at 03:45:39PM +0000, Charles Keepax wrote:
> > Add additional bindings to allow configuration of the system specific
> > microphone detection settings.
> >
> > Signed-off-by: Charles Keepax <[email protected]>
> > ---
> > .../devicetree/bindings/extcon/extcon-arizona.txt | 20 ++++++++++++++++++++
> > 1 files changed, 20 insertions(+), 0 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> > index e1705fa..d661811 100644
> > --- a/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> > +++ b/Documentation/devicetree/bindings/extcon/extcon-arizona.txt
> > @@ -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.
>
> Please add unit suffix (-ms).
Yeah can do will ping out a small patch to update this as well.
Thanks,
Charles