From: Chanwoo Choi <cw00.choi@samsung.com>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: myungjoo.ham@samsung.com, patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal
Date: Mon, 04 Nov 2013 09:32:50 +0900 [thread overview]
Message-ID: <5276EB32.9060803@samsung.com> (raw)
In-Reply-To: <1382890752-30970-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>
Hi Charles,
On 10/28/2013 01:19 AM, Charles Keepax wrote:
> We need to make sure we reset back to our starting state, especially
> making sure that we have disabled poll in the register cache.
>
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
> drivers/extcon/extcon-arizona.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
> index ec9a14e..dac8ba0 100644
> --- a/drivers/extcon/extcon-arizona.c
> +++ b/drivers/extcon/extcon-arizona.c
> @@ -596,9 +596,15 @@ static irqreturn_t arizona_hpdet_irq(int irq, void *data)
> dev_err(arizona->dev, "Failed to report HP/line: %d\n",
> ret);
>
> +done:
> + /* Reset back to starting range */
> + regmap_update_bits(arizona->regmap,
> + ARIZONA_HEADPHONE_DETECT_1,
> + ARIZONA_HP_IMPEDANCE_RANGE_MASK | ARIZONA_HP_POLL,
> + 0);
> +
> arizona_extcon_do_magic(info, 0);
>
> -done:
> if (id_gpio)
> gpio_set_value_cansleep(id_gpio, 0);
>
>
The arizona_hpdet_do_id() return only either -EAGIN or 0(zero).
extcon-arizona driver could never execute 'goto done;' statement.
ret = arizona_hpdet_do_id(info, &reading, &mic);
if (ret == -EAGAIN) {
goto out;
} else if (ret < 0) {
goto done;
}
Thanks,
Chanwoo Choi
next prev parent reply other threads:[~2013-11-04 0:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-27 16:19 Charles Keepax
2013-10-27 16:19 ` [PATCH 2/2] extcon: arizona: Fix race with microphone detection and removal Charles Keepax
2013-11-04 0:38 ` Chanwoo Choi
2013-11-04 9:11 ` Charles Keepax
2013-11-04 0:32 ` Chanwoo Choi [this message]
2013-11-04 9:21 ` [PATCH v2 1/2] extcon: arizona: Fix reset of HPDET after race with removal Charles Keepax
2013-11-04 9:41 ` 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=5276EB32.9060803@samsung.com \
--to=cw00.choi@samsung.com \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=patches@opensource.wolfsonmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome