devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Joan Na <joan.na.devcode@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,  Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
		linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Joan Na	 <joan.na@analog.com>
Subject: Re: [PATCH v5 2/2] regulator: max77675: Add MAX77675 regulator driver
Date: Mon, 03 Nov 2025 11:04:57 +0000	[thread overview]
Message-ID: <e56fce0f5e89037cab3889135d150fd4f28b4c31.camel@gmail.com> (raw)
In-Reply-To: <aQgXWGzUW720mH+P@HYB-iPCgmhaB8Cy.ad.analog.com>

On Mon, 2025-11-03 at 11:45 +0900, Joan Na wrote:
> On Wed, Oct 29, 2025 at 09:55:53AM +0000, Nuno Sá wrote:
> > On Wed, 2025-10-29 at 11:32 +0900, Joan-Na-adi wrote:
> > > From: Joan Na <joan.na@analog.com>
> > > 
> > > Add support for the Maxim Integrated MAX77675 PMIC regulator.
> > > 
> > > The MAX77675 is a compact, highly efficient SIMO (Single Inductor Multiple Output)
> > > power management IC that provides four programmable buck-boost switching regulators
> > > with only one inductor. It supports up to 700mA total output current and operates
> > > from a single-cell Li-ion battery.
> > > 
> > > An integrated power-up sequencer and I2C interface allow flexible startup
> > > configuration and runtime control.
> > > 
> > > Signed-off-by: Joan Na <joan.na@analog.com>
> > > ---
> > 
> > Hi Joan,
> > 
> > Some comments from me... 
> > 
> 
> Hello Nuno,
> 
> Thank you for taking the time to review.
> Please refer to my response below.
> 

...

> > 
> 
> > > +
> > > +static int max77675_apply_config(struct max77675_regulator *maxreg)
> > > +{
> > > +	const struct max77675_config *config = &maxreg->config;
> > > +	int ret;
> > > +
> > > +	ret = max77675_set_en_mode(maxreg, config->en_mode);
> > > +	if (ret) {
> > > +		dev_err(maxreg->dev, "Failed to set EN mode: %d\n", ret);
> > > +		return ret;
> > > +	}
> > > +
> > > +	ret = max77675_set_latency_mode(maxreg, config->voltage_change_latency);
> > > +	if (ret) {
> > > +		dev_err(maxreg->dev, "Failed to set latency mode: %d\n", ret);
> > > +		return ret;
> > > +	}
> > > +
> > > +	ret = max77675_set_drv_sbb_strength(maxreg, config->drv_sbb_strength);
> > > +	if (ret) {
> > > +		dev_err(maxreg->dev, "Failed to set drive strength: %d\n", ret);
> > > +		return ret;
> > > +	}
> > > +
> > > +	ret = max77675_set_dvs_slew_rate(maxreg, config->dvs_slew_rate);
> > > +	if (ret) {
> > > +		dev_err(maxreg->dev, "Failed to set DVS slew rate: %d\n", ret);
> > > +		return ret;
> > > +	}
> > > +
> > > +	ret = max77675_set_debounce_time(maxreg, config->debounce_time);
> > > +	if (ret) {
> > > +		dev_err(maxreg->dev, "Failed to set EN debounce time: %d\n", ret);
> > > +		return ret;
> > > +	}
> > > +
> > > +	ret = max77675_set_manual_reset_time(maxreg, config->manual_reset_time);
> > > +	if (ret) {
> > > +		dev_err(maxreg->dev, "Failed to set manual reset time: %d\n", ret);
> > > +		return ret;
> > > +	}
> > > +
> > > +	ret = max77675_set_en_pullup_disable(maxreg, config->en_pullup_disable);
> > > +	if (ret) {
> > > +		dev_err(maxreg->dev, "Failed to set EN pull-up disable: %d\n", ret);
> > > +		return ret;
> > > +	}
> > > +
> > > +	ret = max77675_set_bias_low_power_request(maxreg, config->bias_low_power_request);
> > > +	if (ret) {
> > > +		dev_err(maxreg->dev, "Failed to set bias low-power request: %d\n", ret);
> > > +		return ret;
> > > +	}
> > > +
> > > +	ret = max77675_set_simo_int_ldo_always_on(maxreg, config->simo_int_ldo_always_on);
> > > +	if (ret) {
> > > +		dev_err(maxreg->dev, "Failed to set SIMO internal LDO always-on: %d\n", ret);
> > > +		return ret;
> > > +	}
> > 
> > This seems to called during probe. All the above can be return dev_err_probe()...
> > 
> 
> I’m thinking of handling it directly where the return value is checked. What are your thoughts?
> 
> ret = max77675_apply_config(maxreg);
>     if (ret)
>     	return dev_err_probe(maxreg->dev, ret, "Failed to apply config\n");

Up to you. You'll have less details if you encounter some issue though...

- Nuno Sá

> 

      reply	other threads:[~2025-11-03 11:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-29  2:32 [PATCH v5 0/2] Add support for MAX77675 device Joan-Na-adi
2025-10-29  2:32 ` [PATCH v5 1/2] regulator: dt-bindings: Add MAX77675 regulator binding Joan-Na-adi
2025-10-29  5:52   ` Krzysztof Kozlowski
2025-10-31 11:24     ` Joan Na
2025-10-29  2:32 ` [PATCH v5 2/2] regulator: max77675: Add MAX77675 regulator driver Joan-Na-adi
2025-10-29  9:55   ` Nuno Sá
2025-11-03  2:45     ` Joan Na
2025-11-03 11:04       ` Nuno Sá [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=e56fce0f5e89037cab3889135d150fd4f28b4c31.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=joan.na.devcode@gmail.com \
    --cc=joan.na@analog.com \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@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).