lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e56fce0f5e89037cab3889135d150fd4f28b4c31.camel@gmail.com>
Date: Mon, 03 Nov 2025 11:04:57 +0000
From: Nuno Sá <noname.nuno@...il.com>
To: Joan Na <joan.na.devcode@...il.com>
Cc: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>, 
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>, 	linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org, Joan Na	 <joan.na@...log.com>
Subject: Re: [PATCH v5 2/2] regulator: max77675: Add MAX77675 regulator
 driver

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@...log.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@...log.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á

> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ