lkml.org 
[lkml]   [2018]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 4/8] regulator: stpmic1: add stpmic1 regulator driver
On Thu, Oct 18, 2018 at 09:02:12AM +0000, Pascal PAILLET-LME wrote:

> + for (i = 0; i < ARRAY_SIZE(stpmic1_regulator_cfgs); i++) {
> + /* Parse DT & find regulators to register */
> + init_data = stpmic1_regulators_matches[i].init_data;
> + if (init_data)
> + init_data->regulator_init = &stpmic1_regulator_parse_dt;
> +
> + rdev = stpmic1_regulator_register(pdev, i, init_data, regul);
> + if (IS_ERR(rdev))
> + return PTR_ERR(rdev);

This looks mostly good, the only big thing is this - the default is to
just unconditionally register all the regulators that exist rather than
only those that are configured on that particular platform. This is a
bit simpler and means that all the readback of the configuration for the
unconfigured regulators is available for diagnostics. Is there a reason
not to do that?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-10-19 13:50    [W:1.650 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site