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] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a74816b-4a0b-4862-85e5-a10aa2eca586@gmail.com>
Date: Wed, 2 Apr 2025 12:32:15 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc: Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Liam Girdwood <lgirdwood@...il.com>,
 Mark Brown <broonie@...nel.org>, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 13/14] regulator: bd96801: Support ROHM BD96806 PMIC

On 24/03/2025 10:57, Matti Vaittinen wrote:
> The ROHM BD96806 is from the software perspective almost identical to
> the ROHM BD96802. The main difference is different voltage tuning
> ranges.
> 
> Add support differentiating these PMICs and provide correct voltages
> for both models.
> 
> Signed-off-by: Matti Vaittinen <mazziesaccount@...il.com>
> 
> ---
> Revision history:
> v1 => :
>   - No changes
> ---
>   drivers/regulator/bd96801-regulator.c | 65 +++++++++++++++++++++++++++
>   1 file changed, 65 insertions(+)
> 
> diff --git a/drivers/regulator/bd96801-regulator.c b/drivers/regulator/bd96801-regulator.c
> index d829289942f9..fb9e7c3314a3 100644
> --- a/drivers/regulator/bd96801-regulator.c
> +++ b/drivers/regulator/bd96801-regulator.c
> @@ -962,6 +962,70 @@ static const struct bd96801_pmic_data bd96805_data = {
>   	.num_regulators = 7,
>   };
>   
> +static const struct bd96801_pmic_data bd96806_data = {
> +	.regulator_data = {
> +	{
> +		.desc = {
> +			.name = "buck1",
> +			.of_match = of_match_ptr("buck1"),
> +			.regulators_node = of_match_ptr("regulators"),
> +			.id = BD96801_BUCK1,
> +			.ops = &bd96801_buck_ops,
> +			.type = REGULATOR_VOLTAGE,
> +			.linear_ranges = bd96805_tune_volts,
> +			.n_linear_ranges = ARRAY_SIZE(bd96805_tune_volts),
> +			.n_voltages = BD96805_BUCK_VOLTS,
> +			.enable_reg = BD96801_REG_ENABLE,
> +			.enable_mask = BD96801_BUCK1_EN_MASK,
> +			.enable_is_inverted = true,
> +			.vsel_reg = BD96801_BUCK1_VSEL_REG,
> +			.vsel_mask = BD96805_BUCK_VSEL_MASK,
> +			.ramp_reg = BD96801_BUCK1_VSEL_REG,
> +			.ramp_mask = BD96801_MASK_RAMP_DELAY,
> +			.ramp_delay_table = &buck_ramp_table[0],
> +			.n_ramp_values = ARRAY_SIZE(buck_ramp_table),
> +			.owner = THIS_MODULE,
> +		},
> +		.init_ranges = bd96801_buck_init_volts,
> +		.num_ranges = ARRAY_SIZE(bd96801_buck_init_volts),

This is wrong. The BD96806 has similar voltage ranges as the BD96805, so 
we should use the

		.init_ranges = bd96805_buck_init_volts,
		.num_ranges = ARRAY_SIZE(bd96805_buck_init_volts),

Also for buck2.

I'll fix this in v3 but wait for a couple of days to see if the rest of 
the regulator patches gain comments :)

Yours,
   -- Matti

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ