Re: [PATCH 2/4] regulator: Introduce Maxim MAX20411 Step-Down converter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 19, 2023 at 01:47:47PM -0800, Bjorn Andersson wrote:

> +	desc->ops = &max20411_ops;
> +	desc->owner = THIS_MODULE;
> +	desc->type = REGULATOR_VOLTAGE;
> +	desc->supply_name = "vin";
> +	desc->name = "max20411";
> +
> +	/*
> +	 * voltage = 0.24375V + selector * 6.25mV
> +	 * with valid selector between 41 to 165 (0.5V to 1.275V)
> +	 */
> +	desc->min_uV = MAX20411_BASE_UV;
> +	desc->uV_step = MAX20411_UV_STEP;
> +	desc->linear_min_sel = MAX20411_MIN_SEL;
> +	desc->n_voltages = MAX20411_MAX_SEL;

Doesn't really matter either way but the more normal way to write
this is to have a static struct with all the fixed values in it
rather than dynamically initialising one at runtime.  Otherwise
this looks good.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux