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