From: Chanwoo Choi <cw00.choi@samsung.com>
To: Jonghwa Lee <jonghwa3.lee@samsung.com>
Cc: linux-kernel@vger.kernel.org, myungjoo.ham@samsung.com,
r.baldyga@samsung.com
Subject: Re: [PATCH v3] extcon: max77693: Fix a bug occured at changing ADC debounce time.
Date: Mon, 22 Sep 2014 16:22:03 +0900 [thread overview]
Message-ID: <541FCE1B.7010101@samsung.com> (raw)
In-Reply-To: <1410926323-8234-1-git-send-email-jonghwa3.lee@samsung.com>
On 09/17/2014 12:58 PM, Jonghwa Lee wrote:
> When it writes some value other than 0 to BTLDset and JIGset, muic device
> will be reset automatically. And it happens during updating ADC debounce time,
> because it shares same register. To update ADC debounce time without reset,
> set value only to ADCDbset and 0 to BTLDset and JIGset.
>
> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com>
> ---
> Changes:
> v3: - Fix typo (regmap_write_bits -> regmap_write)
> v2: - Fix comments.
>
> drivers/extcon/extcon-max77693.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
> index 77460f2..132540e 100644
> --- a/drivers/extcon/extcon-max77693.c
> +++ b/drivers/extcon/extcon-max77693.c
> @@ -255,10 +255,15 @@ static int max77693_muic_set_debounce_time(struct max77693_muic_info *info,
> case ADC_DEBOUNCE_TIME_10MS:
> case ADC_DEBOUNCE_TIME_25MS:
> case ADC_DEBOUNCE_TIME_38_62MS:
> - ret = regmap_update_bits(info->max77693->regmap_muic,
> - MAX77693_MUIC_REG_CTRL3,
> - CONTROL3_ADCDBSET_MASK,
> - time << CONTROL3_ADCDBSET_SHIFT);
> + /*
> + * Don't touch BTLDset, JIGset when you want to change adc
> + * debounce time. If it writes other than 0 to BTLDset, JIGset
> + * muic device will be reset and loose current state.
> + */
> + ret = regmap_write(info->max77693->regmap_muic,
> + MAX77693_MUIC_REG_CTRL3,
> + (CONTROL3_ADCDBSET_MASK &
> + time << CONTROL3_ADCDBSET_SHIFT));
I think that masking operation is not necessary. I drop this operation and apply it.
> if (ret) {
> dev_err(info->dev, "failed to set ADC debounce time\n");
> return ret;
>
Applied.
Thanks,
Chanwoo Choi
prev parent reply other threads:[~2014-09-22 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 3:58 Jonghwa Lee
2014-09-22 7:22 ` Chanwoo Choi [this message]
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=541FCE1B.7010101@samsung.com \
--to=cw00.choi@samsung.com \
--cc=jonghwa3.lee@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=r.baldyga@samsung.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