* [alsa-devel] [PATCH v2 0/2] Add support for select accessory detect mode to HPDETL or HPDETR @ 2015-04-21 4:11 Inha Song [not found] ` <1429589505-11954-1-git-send-email-ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2015-04-21 4:11 ` [alsa-devel] [PATCH v2 2/2] mfd: arizona: Update DT binding to support hpdet channel Inha Song 0 siblings, 2 replies; 7+ messages in thread From: Inha Song @ 2015-04-21 4:11 UTC (permalink / raw) To: lee.jones Cc: devicetree, alsa-devel, linux-kernel, patches, cw00.choi, broonie, ckeepax, rf, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, Inha Song This set of patches adds support for select accessory detect mode to HPDETL or HPDETR. Changes in v2: - Use the value in pdata instead of hpdet_channel in extcon_info. - Wrap arizona_extcon_of_get in IS_ENABLED(CONFIG_OF). - Change hpdet_channel type to unsigned from signed in pdata. - Move ARIZONA_ACCDET_MODE_* define to dt-binding header and directly set it to pdata. Inha Song (2): extcon: arizona: Add support for select accessory detect mode when headphone detection mfd: arizona: Update DT binding to support hpdet channel Documentation/devicetree/bindings/mfd/arizona.txt | 6 +++++ drivers/extcon/extcon-arizona.c | 28 ++++++++++++++++------- include/dt-bindings/mfd/arizona.h | 8 +++++++ include/linux/mfd/arizona/pdata.h | 3 +++ 4 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 include/dt-bindings/mfd/arizona.h -- 2.0.0.390.gcb682f8 ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <1429589505-11954-1-git-send-email-ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>]
* [alsa-devel] [PATCH v2 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection [not found] ` <1429589505-11954-1-git-send-email-ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> @ 2015-04-21 4:11 ` Inha Song [not found] ` <1429589505-11954-2-git-send-email-ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Inha Song @ 2015-04-21 4:11 UTC (permalink / raw) To: lee.jones-QSEj5FYQhm4dnm+yROfE0A Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux-kernel-u79uwXL29TY76Z2rM5mHXA, patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, cw00.choi-Sze3O3UU22JBDgjK7y7TUQ, broonie-DgEjT+Ai2ygdnm+yROfE0A, ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, rf-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg, Inha Song This patch add support for select accessory detect mode to HPDETL or HPDETR. Arizona provides a headphone detection circuit on the HPDETL and HPDETR pins to measure the impedance of an external load connected to the headphone. Depending on board design, headphone detect pins can change to HPDETR or HPDETL. Signed-off-by: Inha Song <ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> --- drivers/extcon/extcon-arizona.c | 28 ++++++++++++++++++++-------- include/dt-bindings/mfd/arizona.h | 8 ++++++++ include/linux/mfd/arizona/pdata.h | 3 +++ 3 files changed, 31 insertions(+), 8 deletions(-) create mode 100644 include/dt-bindings/mfd/arizona.h diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index 63f01c4..c827342 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c @@ -32,13 +32,10 @@ #include <linux/mfd/arizona/core.h> #include <linux/mfd/arizona/pdata.h> #include <linux/mfd/arizona/registers.h> +#include <dt-bindings/mfd/arizona.h> #define ARIZONA_MAX_MICD_RANGE 8 -#define ARIZONA_ACCDET_MODE_MIC 0 -#define ARIZONA_ACCDET_MODE_HPL 1 -#define ARIZONA_ACCDET_MODE_HPR 2 - #define ARIZONA_MICD_CLAMP_MODE_JDL 0x4 #define ARIZONA_MICD_CLAMP_MODE_JDH 0x5 #define ARIZONA_MICD_CLAMP_MODE_JDL_GP5H 0x9 @@ -653,9 +650,9 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info) ret = regmap_update_bits(arizona->regmap, ARIZONA_ACCESSORY_DETECT_MODE_1, ARIZONA_ACCDET_MODE_MASK, - ARIZONA_ACCDET_MODE_HPL); + arizona->pdata.hpdet_channel); if (ret != 0) { - dev_err(arizona->dev, "Failed to set HPDETL mode: %d\n", ret); + dev_err(arizona->dev, "Failed to set HPDET mode: %d\n", ret); goto err; } @@ -705,9 +702,9 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info) ARIZONA_ACCESSORY_DETECT_MODE_1, ARIZONA_ACCDET_SRC | ARIZONA_ACCDET_MODE_MASK, info->micd_modes[0].src | - ARIZONA_ACCDET_MODE_HPL); + arizona->pdata.hpdet_channel); if (ret != 0) { - dev_err(arizona->dev, "Failed to set HPDETL mode: %d\n", ret); + dev_err(arizona->dev, "Failed to set HPDET mode: %d\n", ret); goto err; } @@ -1103,6 +1100,16 @@ static void arizona_micd_set_level(struct arizona *arizona, int index, regmap_update_bits(arizona->regmap, reg, mask, level); } +static int arizona_extcon_of_get_pdata(struct arizona *arizona) +{ + struct arizona_pdata *pdata = &arizona->pdata; + + of_property_read_u32(arizona->dev->of_node, "wlf,hpdet-channel", + &pdata->hpdet_channel); + + return 0; +} + static int arizona_extcon_probe(struct platform_device *pdev) { struct arizona *arizona = dev_get_drvdata(pdev->dev.parent); @@ -1120,6 +1127,11 @@ static int arizona_extcon_probe(struct platform_device *pdev) if (!info) return -ENOMEM; + if (IS_ENABLED(CONFIG_OF)) { + if (!dev_get_platdata(arizona->dev)) + arizona_extcon_of_get_pdata(arizona); + } + info->micvdd = devm_regulator_get(&pdev->dev, "MICVDD"); if (IS_ERR(info->micvdd)) { ret = PTR_ERR(info->micvdd); diff --git a/include/dt-bindings/mfd/arizona.h b/include/dt-bindings/mfd/arizona.h new file mode 100644 index 0000000..9ecff78 --- /dev/null +++ b/include/dt-bindings/mfd/arizona.h @@ -0,0 +1,8 @@ +#ifndef __DT_BINDINGS_ARIZONA_H__ +#define __DT_BINDINGS_ARIZONA_H__ + +#define ARIZONA_ACCDET_MODE_MIC 0 +#define ARIZONA_ACCDET_MODE_HPL 1 +#define ARIZONA_ACCDET_MODE_HPR 2 + +#endif /* __DT_BINDINGS_ARIZONA_H__ */ diff --git a/include/linux/mfd/arizona/pdata.h b/include/linux/mfd/arizona/pdata.h index 4578c72..2473a67 100644 --- a/include/linux/mfd/arizona/pdata.h +++ b/include/linux/mfd/arizona/pdata.h @@ -139,6 +139,9 @@ struct arizona_pdata { /** GPIO used for mic isolation with HPDET */ int hpdet_id_gpio; + /** Channel to use for headphone detection */ + unsigned int hpdet_channel; + /** Extra debounce timeout used during initial mic detection (ms) */ int micd_detect_debounce; -- 2.0.0.390.gcb682f8 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 7+ messages in thread
[parent not found: <1429589505-11954-2-git-send-email-ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>]
* Re: [alsa-devel] [PATCH v2 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection [not found] ` <1429589505-11954-2-git-send-email-ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> @ 2015-04-21 9:28 ` Charles Keepax 2015-04-21 9:38 ` Inha Song 0 siblings, 1 reply; 7+ messages in thread From: Charles Keepax @ 2015-04-21 9:28 UTC (permalink / raw) To: Inha Song Cc: lee.jones-QSEj5FYQhm4dnm+yROfE0A, devicetree-u79uwXL29TY76Z2rM5mHXA, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux-kernel-u79uwXL29TY76Z2rM5mHXA, patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, cw00.choi-Sze3O3UU22JBDgjK7y7TUQ, broonie-DgEjT+Ai2ygdnm+yROfE0A, rf-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg On Tue, Apr 21, 2015 at 01:11:44PM +0900, Inha Song wrote: > This patch add support for select accessory detect mode to HPDETL or HPDETR. > Arizona provides a headphone detection circuit on the HPDETL and HPDETR pins > to measure the impedance of an external load connected to the headphone. > > Depending on board design, headphone detect pins can change to HPDETR or HPDETL. > > Signed-off-by: Inha Song <ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> > --- > drivers/extcon/extcon-arizona.c | 28 ++++++++++++++++++++-------- > include/dt-bindings/mfd/arizona.h | 8 ++++++++ > include/linux/mfd/arizona/pdata.h | 3 +++ > 3 files changed, 31 insertions(+), 8 deletions(-) > create mode 100644 include/dt-bindings/mfd/arizona.h > > diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c > index 63f01c4..c827342 100644 > --- a/drivers/extcon/extcon-arizona.c > +++ b/drivers/extcon/extcon-arizona.c > @@ -32,13 +32,10 @@ > #include <linux/mfd/arizona/core.h> > #include <linux/mfd/arizona/pdata.h> > #include <linux/mfd/arizona/registers.h> > +#include <dt-bindings/mfd/arizona.h> > > #define ARIZONA_MAX_MICD_RANGE 8 > > -#define ARIZONA_ACCDET_MODE_MIC 0 > -#define ARIZONA_ACCDET_MODE_HPL 1 > -#define ARIZONA_ACCDET_MODE_HPR 2 > - > #define ARIZONA_MICD_CLAMP_MODE_JDL 0x4 > #define ARIZONA_MICD_CLAMP_MODE_JDH 0x5 > #define ARIZONA_MICD_CLAMP_MODE_JDL_GP5H 0x9 > @@ -653,9 +650,9 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info) > ret = regmap_update_bits(arizona->regmap, > ARIZONA_ACCESSORY_DETECT_MODE_1, > ARIZONA_ACCDET_MODE_MASK, > - ARIZONA_ACCDET_MODE_HPL); > + arizona->pdata.hpdet_channel); > if (ret != 0) { > - dev_err(arizona->dev, "Failed to set HPDETL mode: %d\n", ret); > + dev_err(arizona->dev, "Failed to set HPDET mode: %d\n", ret); > goto err; > } > > @@ -705,9 +702,9 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info) > ARIZONA_ACCESSORY_DETECT_MODE_1, > ARIZONA_ACCDET_SRC | ARIZONA_ACCDET_MODE_MASK, > info->micd_modes[0].src | > - ARIZONA_ACCDET_MODE_HPL); > + arizona->pdata.hpdet_channel); > if (ret != 0) { > - dev_err(arizona->dev, "Failed to set HPDETL mode: %d\n", ret); > + dev_err(arizona->dev, "Failed to set HPDET mode: %d\n", ret); > goto err; > } > > @@ -1103,6 +1100,16 @@ static void arizona_micd_set_level(struct arizona *arizona, int index, > regmap_update_bits(arizona->regmap, reg, mask, level); > } > > +static int arizona_extcon_of_get_pdata(struct arizona *arizona) > +{ > + struct arizona_pdata *pdata = &arizona->pdata; > + > + of_property_read_u32(arizona->dev->of_node, "wlf,hpdet-channel", > + &pdata->hpdet_channel); I think we need to verify this is either HPL or HPR and default it to HPL if isn't one of those. Otherwise this looks fine. Thanks, Charles -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [alsa-devel] [PATCH v2 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection 2015-04-21 9:28 ` Charles Keepax @ 2015-04-21 9:38 ` Inha Song 0 siblings, 0 replies; 7+ messages in thread From: Inha Song @ 2015-04-21 9:38 UTC (permalink / raw) To: Charles Keepax Cc: lee.jones, devicetree, alsa-devel, linux-kernel, patches, cw00.choi, broonie, rf, robh+dt, pawel.moll, mark.rutland, ijc+devicetree Hi, Thanks for your review :) On Tue, 21 Apr 2015 10:28:26 +0100 Charles Keepax <ckeepax@opensource.wolfsonmicro.com> wrote: > On Tue, Apr 21, 2015 at 01:11:44PM +0900, Inha Song wrote: > > This patch add support for select accessory detect mode to HPDETL or HPDETR. > > Arizona provides a headphone detection circuit on the HPDETL and HPDETR pins > > to measure the impedance of an external load connected to the headphone. > > > > Depending on board design, headphone detect pins can change to HPDETR or HPDETL. > > > > Signed-off-by: Inha Song <ideal.song@samsung.com> > > --- > > drivers/extcon/extcon-arizona.c | 28 ++++++++++++++++++++-------- > > include/dt-bindings/mfd/arizona.h | 8 ++++++++ > > include/linux/mfd/arizona/pdata.h | 3 +++ > > 3 files changed, 31 insertions(+), 8 deletions(-) > > create mode 100644 include/dt-bindings/mfd/arizona.h > > > > diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c > > index 63f01c4..c827342 100644 > > --- a/drivers/extcon/extcon-arizona.c > > +++ b/drivers/extcon/extcon-arizona.c > > @@ -32,13 +32,10 @@ > > #include <linux/mfd/arizona/core.h> > > #include <linux/mfd/arizona/pdata.h> > > #include <linux/mfd/arizona/registers.h> > > +#include <dt-bindings/mfd/arizona.h> > > > > #define ARIZONA_MAX_MICD_RANGE 8 > > > > -#define ARIZONA_ACCDET_MODE_MIC 0 > > -#define ARIZONA_ACCDET_MODE_HPL 1 > > -#define ARIZONA_ACCDET_MODE_HPR 2 > > - > > #define ARIZONA_MICD_CLAMP_MODE_JDL 0x4 > > #define ARIZONA_MICD_CLAMP_MODE_JDH 0x5 > > #define ARIZONA_MICD_CLAMP_MODE_JDL_GP5H 0x9 > > @@ -653,9 +650,9 @@ static void arizona_identify_headphone(struct arizona_extcon_info *info) > > ret = regmap_update_bits(arizona->regmap, > > ARIZONA_ACCESSORY_DETECT_MODE_1, > > ARIZONA_ACCDET_MODE_MASK, > > - ARIZONA_ACCDET_MODE_HPL); > > + arizona->pdata.hpdet_channel); > > if (ret != 0) { > > - dev_err(arizona->dev, "Failed to set HPDETL mode: %d\n", ret); > > + dev_err(arizona->dev, "Failed to set HPDET mode: %d\n", ret); > > goto err; > > } > > > > @@ -705,9 +702,9 @@ static void arizona_start_hpdet_acc_id(struct arizona_extcon_info *info) > > ARIZONA_ACCESSORY_DETECT_MODE_1, > > ARIZONA_ACCDET_SRC | ARIZONA_ACCDET_MODE_MASK, > > info->micd_modes[0].src | > > - ARIZONA_ACCDET_MODE_HPL); > > + arizona->pdata.hpdet_channel); > > if (ret != 0) { > > - dev_err(arizona->dev, "Failed to set HPDETL mode: %d\n", ret); > > + dev_err(arizona->dev, "Failed to set HPDET mode: %d\n", ret); > > goto err; > > } > > > > @@ -1103,6 +1100,16 @@ static void arizona_micd_set_level(struct arizona *arizona, int index, > > regmap_update_bits(arizona->regmap, reg, mask, level); > > } > > > > +static int arizona_extcon_of_get_pdata(struct arizona *arizona) > > +{ > > + struct arizona_pdata *pdata = &arizona->pdata; > > + > > + of_property_read_u32(arizona->dev->of_node, "wlf,hpdet-channel", > > + &pdata->hpdet_channel); > > I think we need to verify this is either HPL or HPR and default > it to HPL if isn't one of those. Otherwise this looks fine. > Ok, We can check hpdet_channel value to use switch-case in arizona_extcon_of_get_pdata() function. I will fix. Best Regards, Inha Song. > Thanks, > Charles ^ permalink raw reply [flat|nested] 7+ messages in thread
* [alsa-devel] [PATCH v2 2/2] mfd: arizona: Update DT binding to support hpdet channel 2015-04-21 4:11 [alsa-devel] [PATCH v2 0/2] Add support for select accessory detect mode to HPDETL or HPDETR Inha Song [not found] ` <1429589505-11954-1-git-send-email-ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> @ 2015-04-21 4:11 ` Inha Song 2015-04-29 10:57 ` Lee Jones 1 sibling, 1 reply; 7+ messages in thread From: Inha Song @ 2015-04-21 4:11 UTC (permalink / raw) To: lee.jones Cc: devicetree, alsa-devel, linux-kernel, patches, cw00.choi, broonie, ckeepax, rf, robh+dt, pawel.moll, mark.rutland, ijc+devicetree, Inha Song This patch add device tree bindings for the pdata needed to configure the Accessory Detect Mode select when Headphone detection. Signed-off-by: Inha Song <ideal.song@samsung.com> --- Documentation/devicetree/bindings/mfd/arizona.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt index 7bd1273..3529592 100644 --- a/Documentation/devicetree/bindings/mfd/arizona.txt +++ b/Documentation/devicetree/bindings/mfd/arizona.txt @@ -49,6 +49,12 @@ Optional properties: input singals. If values less than the number of input signals, elements that has not been specifed are set to 0 by default. + - wlf,hpdet-channel : Headphone detection channel. + 1 or ARIZONA_ACCDET_MODE_HPL - Headphone detect mode is set to HPDETL + 2 or ARIZONA_ACCDET_MODE_HPR - 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 MICDET. + - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if they are being externally supplied. As covered in Documentation/devicetree/bindings/regulator/regulator.txt -- 2.0.0.390.gcb682f8 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [alsa-devel] [PATCH v2 2/2] mfd: arizona: Update DT binding to support hpdet channel 2015-04-21 4:11 ` [alsa-devel] [PATCH v2 2/2] mfd: arizona: Update DT binding to support hpdet channel Inha Song @ 2015-04-29 10:57 ` Lee Jones 2015-04-29 13:12 ` Charles Keepax 0 siblings, 1 reply; 7+ messages in thread From: Lee Jones @ 2015-04-29 10:57 UTC (permalink / raw) To: Inha Song Cc: devicetree, alsa-devel, linux-kernel, patches, cw00.choi, broonie, ckeepax, rf, robh+dt, pawel.moll, mark.rutland, ijc+devicetree Does this looks okay to you Charles? > This patch add device tree bindings for the pdata needed to configure > the Accessory Detect Mode select when Headphone detection. Isn't the idea of headphone detection that it headphones are detected i.e. automatically? > Signed-off-by: Inha Song <ideal.song@samsung.com> > --- > Documentation/devicetree/bindings/mfd/arizona.txt | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt > index 7bd1273..3529592 100644 > --- a/Documentation/devicetree/bindings/mfd/arizona.txt > +++ b/Documentation/devicetree/bindings/mfd/arizona.txt > @@ -49,6 +49,12 @@ Optional properties: > input singals. If values less than the number of input signals, elements > that has not been specifed are set to 0 by default. > > + - wlf,hpdet-channel : Headphone detection channel. > + 1 or ARIZONA_ACCDET_MODE_HPL - Headphone detect mode is set to HPDETL > + 2 or ARIZONA_ACCDET_MODE_HPR - 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 MICDET. > + > - DCVDD-supply, MICVDD-supply : Power supplies, only need to be specified if > they are being externally supplied. As covered in > Documentation/devicetree/bindings/regulator/regulator.txt -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [alsa-devel] [PATCH v2 2/2] mfd: arizona: Update DT binding to support hpdet channel 2015-04-29 10:57 ` Lee Jones @ 2015-04-29 13:12 ` Charles Keepax 0 siblings, 0 replies; 7+ messages in thread From: Charles Keepax @ 2015-04-29 13:12 UTC (permalink / raw) To: Lee Jones Cc: Inha Song, devicetree-u79uwXL29TY76Z2rM5mHXA, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, linux-kernel-u79uwXL29TY76Z2rM5mHXA, patches-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, cw00.choi-Sze3O3UU22JBDgjK7y7TUQ, broonie-DgEjT+Ai2ygdnm+yROfE0A, rf-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E, robh+dt-DgEjT+Ai2ygdnm+yROfE0A, pawel.moll-5wv7dgnIgG8, mark.rutland-5wv7dgnIgG8, ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg On Wed, Apr 29, 2015 at 11:57:37AM +0100, Lee Jones wrote: > Does this looks okay to you Charles? > > > This patch add device tree bindings for the pdata needed to configure > > the Accessory Detect Mode select when Headphone detection. > > Isn't the idea of headphone detection that it headphones are detected > i.e. automatically? > Yeah, pretty much the chip can run an impedance measurement on either the left or the right headphone pin and to complicate things a little further you don't necessarily have to wire that to the actual headphones in hardware. So people tend to wire up all sorts of odd things that they thought sounded awesome. So you do really need a way to inform the driver which pin is actually going to be useful for measuring the headphone impedance on a specific system. In an ideal world we would just measure both and take the average, but in practice it is very dependent on how the hardware is wired up. Thanks, Charles -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-04-29 13:12 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-04-21 4:11 [alsa-devel] [PATCH v2 0/2] Add support for select accessory detect mode to HPDETL or HPDETR Inha Song [not found] ` <1429589505-11954-1-git-send-email-ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2015-04-21 4:11 ` [alsa-devel] [PATCH v2 1/2] extcon: arizona: Add support for select accessory detect mode when headphone detection Inha Song [not found] ` <1429589505-11954-2-git-send-email-ideal.song-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> 2015-04-21 9:28 ` Charles Keepax 2015-04-21 9:38 ` Inha Song 2015-04-21 4:11 ` [alsa-devel] [PATCH v2 2/2] mfd: arizona: Update DT binding to support hpdet channel Inha Song 2015-04-29 10:57 ` Lee Jones 2015-04-29 13:12 ` Charles Keepax
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).