Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1168758 > unrolled thread

[PATCH v4 0/8] Add basic microphone detection bindings

Started byCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
First post2015-06-19 15:00 +0200
Last post2015-06-19 15:00 +0200
Articles 4 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v4 0/8] Add basic microphone detection bindings Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 15:00 +0200
    [PATCH v4 7/8] mfd: arizona: Update DT doc for new mic detection bindings Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 15:00 +0200
    [PATCH v4 2/8] extcon: arizona: Factor out initial GPIO state Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 15:00 +0200
    [PATCH v4 4/8] extcon: arizona: Add basic microphone detection DT/ACPI bindings Charles Keepax <ckeepax@opensource.wolfsonmicro.com> - 2015-06-19 15:00 +0200

#1168758 — [PATCH v4 0/8] Add basic microphone detection bindings

FromCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Date2015-06-19 15:00 +0200
Subject[PATCH v4 0/8] Add basic microphone detection bindings
Message-ID<pD43L-7Q7-3@gated-at.bofh.it>
This series adds basic microphone detection DT/ACPI bindings
using the device properties API.

The MFD parts and the extcon parts can go seperately through
there respective trees, but I sent them together so everyone
can see what is going on. There is no build dependency
although the MFD patch will fix a couple of Sparse warnings
that you get if using -Wsparse-all.

Changes since v1:
 - Removed double include of property.h

Changes since v2:
 - Removed check for CONFIG_OF to call
   arizona_extcon_device_get_pdata.
 - Add some defines for the pdata values of micd-dbtime.
 - Factor out the initial gpio level for the micd-pol-gpio.
 - Don't check if null before calling gpiod_set_value_cansleep.
 - Added a comment to explain why we can't use devm for gpiod.
 - Added patch to make some small corrections to the jack
   detection into this series to keep them all together for
   easy of applying.

Changes since v3:
 - Simplify the symantics of the pdata for micd_dbtime

Thanks,
Charles

Charles Keepax (8):
  extcon: arizona: Simplify pdata symantics for micd_dbtime
  extcon: arizona: Factor out initial GPIO state
  extcon: arizona: Update to use the new device properties API
  extcon: arizona: Add basic microphone detection DT/ACPI bindings
  extcon: arizona: Convert to gpiod
  extcon: arizona: Ensure variables are set for headphone detection
  mfd: arizona: Update DT doc for new mic detection bindings
  mfd: arizona: Update several pdata members to unsigned

 Documentation/devicetree/bindings/mfd/arizona.txt |   16 ++++
 drivers/extcon/extcon-arizona.c                   |   99 +++++++++++++++++----
 include/linux/mfd/arizona/pdata.h                 |   15 ++--
 3 files changed, 105 insertions(+), 25 deletions(-)

-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1168760 — [PATCH v4 7/8] mfd: arizona: Update DT doc for new mic detection bindings

FromCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Date2015-06-19 15:00 +0200
Subject[PATCH v4 7/8] mfd: arizona: Update DT doc for new mic detection bindings
Message-ID<pD43N-7Q7-41@gated-at.bofh.it>
In reply to#1168758
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 Documentation/devicetree/bindings/mfd/arizona.txt |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/arizona.txt b/Documentation/devicetree/bindings/mfd/arizona.txt
index 32a71b7..8d92c92 100644
--- a/Documentation/devicetree/bindings/mfd/arizona.txt
+++ b/Documentation/devicetree/bindings/mfd/arizona.txt
@@ -68,6 +68,22 @@ Optional properties:
     If this node is not mentioned or if the value is unknown, then
     headphone detection mode is set to HPDETL.
 
+  - 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.
+
   - 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
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1168761 — [PATCH v4 2/8] extcon: arizona: Factor out initial GPIO state

FromCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Date2015-06-19 15:00 +0200
Subject[PATCH v4 2/8] extcon: arizona: Factor out initial GPIO state
Message-ID<pD43N-7Q7-43@gated-at.bofh.it>
In reply to#1168758
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/extcon/extcon-arizona.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 1fbe3b4..c4d179b 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -1135,6 +1135,7 @@ static int arizona_extcon_probe(struct platform_device *pdev)
 	struct arizona *arizona = dev_get_drvdata(pdev->dev.parent);
 	struct arizona_pdata *pdata = &arizona->pdata;
 	struct arizona_extcon_info *info;
+	int gpio_initial_level;
 	unsigned int val;
 	unsigned int clamp_mode;
 	int jack_irq_fall, jack_irq_rise;
@@ -1226,8 +1227,9 @@ static int arizona_extcon_probe(struct platform_device *pdev)
 		info->micd_num_modes = ARRAY_SIZE(micd_default_modes);
 	}
 
+	gpio_initial_level = info->micd_modes[0].gpio;
 	if (arizona->pdata.micd_pol_gpio > 0) {
-		if (info->micd_modes[0].gpio)
+		if (gpio_initial_level)
 			mode = GPIOF_OUT_INIT_HIGH;
 		else
 			mode = GPIOF_OUT_INIT_LOW;
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1168762 — [PATCH v4 4/8] extcon: arizona: Add basic microphone detection DT/ACPI bindings

FromCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Date2015-06-19 15:00 +0200
Subject[PATCH v4 4/8] extcon: arizona: Add basic microphone detection DT/ACPI bindings
Message-ID<pD43N-7Q7-45@gated-at.bofh.it>
In reply to#1168758
This patch adds bindings for the basic microphone detection platform
data.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/extcon/extcon-arizona.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 57f5553..0e1d9c6 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -1128,6 +1128,24 @@ static int arizona_extcon_device_get_pdata(struct arizona *arizona)
 		pdata->hpdet_channel = ARIZONA_ACCDET_MODE_HPL;
 	}
 
+	device_property_read_u32(arizona->dev, "wlf,micd-detect-debounce",
+				 &pdata->micd_detect_debounce);
+
+	device_property_read_u32(arizona->dev, "wlf,micd-bias-start-time",
+				 &pdata->micd_bias_start_time);
+
+	device_property_read_u32(arizona->dev, "wlf,micd-rate",
+				 &pdata->micd_rate);
+
+	device_property_read_u32(arizona->dev, "wlf,micd-dbtime",
+				 &pdata->micd_dbtime);
+
+	device_property_read_u32(arizona->dev, "wlf,micd-timeout",
+				 &pdata->micd_timeout);
+
+	pdata->micd_force_micbias = device_property_read_bool(arizona->dev,
+						"wlf,micd-force-micbias");
+
 	return 0;
 }
 
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web