All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: lee.jones@linaro.org, cw00.choi@samsung.com
Cc: patches@opensource.wolfsonmicro.com, devicetree@vger.kernel.org,
	myungjoo.ham@samsung.com, sameo@linux.intel.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH RESEND 4/5] extcon: arizona: Add support for general purpose switch
Date: Tue, 11 Aug 2015 09:14:03 +0100	[thread overview]
Message-ID: <1439280844-9808-4-git-send-email-ckeepax@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1439280844-9808-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>

The switch is typically used in conjunction with the MICDET clamp in
order to suppress pops and clicks associated with jack insertion.

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

diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index f372156..b48fb29 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -1216,6 +1216,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;
 }
 
@@ -1313,6 +1315,10 @@ static int arizona_extcon_probe(struct platform_device *pdev)
 		info->micd_num_modes = ARRAY_SIZE(micd_default_modes);
 	}
 
+	if (arizona->pdata.gpsw > 0)
+		regmap_update_bits(arizona->regmap, ARIZONA_GP_SWITCH_1,
+				ARIZONA_SW1_MODE_MASK, arizona->pdata.gpsw);
+
 	if (arizona->pdata.micd_pol_gpio > 0) {
 		if (info->micd_modes[0].gpio)
 			mode = GPIOF_OUT_INIT_HIGH;
-- 
1.7.2.5

  parent reply	other threads:[~2015-08-11  8:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-11  8:14 [PATCH RESEND 1/5] mfd: arizona: Add registers for ADC microphone detection Charles Keepax
2015-08-11  8:14 ` [PATCH RESEND 2/5] extcon: arizona: Add support for new ADC value headphone detect Charles Keepax
2015-08-11  8:14 ` Charles Keepax [this message]
     [not found] ` <1439280844-9808-1-git-send-email-ckeepax-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2015-08-11  8:14   ` [PATCH RESEND 3/5] mfd: arizona: Add register bits for general purpose switch Charles Keepax
2015-08-11  8:14     ` Charles Keepax
2015-08-12  8:23     ` Lee Jones
2015-08-11  8:14   ` [PATCH RESEND 5/5] mfd: arizona: Update DT doc for new mic detection bindings Charles Keepax
2015-08-11  8:14     ` Charles Keepax
2015-08-12  8:22     ` Lee Jones
2015-08-12  8:23 ` [PATCH RESEND 1/5] mfd: arizona: Add registers for ADC microphone detection Lee Jones
  -- strict thread matches above, loose matches on Subject: below --
2015-09-09  8:34 Charles Keepax
2015-09-09  8:34 ` [PATCH RESEND 4/5] extcon: arizona: Add support for general purpose switch Charles Keepax
2015-09-09  8:34   ` Charles Keepax
2015-09-11  7:50   ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439280844-9808-4-git-send-email-ckeepax@opensource.wolfsonmicro.com \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=cw00.choi@samsung.com \
    --cc=devicetree@vger.kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=sameo@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.