linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vincent Pelletier <plr.vincent@gmail.com>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: Support Opensource <Support.Opensource@diasemi.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5] regulator: da9063: Add support for full-current mode.
Date: Mon, 12 Jul 2021 13:56:49 +0000	[thread overview]
Message-ID: <20210712135649.45983c5f@gmail.com> (raw)
In-Reply-To: <DB9PR10MB46522678869990E32D9F00EB80159@DB9PR10MB4652.EURPRD10.PROD.OUTLOOK.COM>

Hello,

Thanks for the review.

On Mon, 12 Jul 2021 10:42:26 +0000, Adam Thomson <Adam.Thomson.Opensource@diasemi.com> wrote:
> On 08 July 2021 11:33, Vincent Pelletier wrote:
> > +	if (ret < 0)
> > +		/* attempt to restore original overdrive state, ignore failure-
> > +		 * on-failure
> > +		 */
> > +		regmap_update_bits(regl->hw->regmap,
> > DA9063_REG_CONFIG_H,
> > +				   overdrive_mask, orig_overdrive);  
> 
> If I2C is failing here I'm not sure this is going to go through and you have
> bigger problems. Not sure if it's really worth trying to roll-back at this point
> but maybe Mark has another view. Personally I'd be tempted to just ditch this
> and just always set the OD bit in this function, rather than trying an roll-back.
> Will be much simpler code.

What I have in mind here is regulator_set_current_limit_regmap
rejecting the change not because of a bus issue, but rather because of
an unusable min_uA..max_uA range.
I add this to the error handling path comment to make the intent
clearer.

But your remark indeed fully applies in the case of
da9063_buck_set_limit_clear_overdrive. I will keep the roll-back
codepath for the next patch iteration, but I will drop it if the
consensus is against its presence.

Regards,
-- 
Vincent Pelletier
GPG fingerprint 983A E8B7 3B91 1598 7A92 3845 CAC9 3691 4257 B0C1

      reply	other threads:[~2021-07-12 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 10:32 [PATCH v5] regulator: da9063: Add support for full-current mode Vincent Pelletier
2021-07-12 10:42 ` Adam Thomson
2021-07-12 13:56   ` Vincent Pelletier [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=20210712135649.45983c5f@gmail.com \
    --to=plr.vincent@gmail.com \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=Support.Opensource@diasemi.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).