Thread (25 messages) 25 messages, 8 authors, 2018-10-26

Re: [PATCH v4 4/8] regulator: stpmic1: add stpmic1 regulator driver

From: Pascal PAILLET-LME <hidden>
Date: 2018-10-25 13:23:38
Also in: linux-devicetree, linux-watchdog, lkml

Hello Mark,

Le 10/24/2018 03:17 PM, Mark Brown a écrit :
On Wed, Oct 24, 2018 at 12:54:46PM +0000, Pascal PAILLET-LME wrote:
quoted
I'm sorry, I'm not sure to understand. Would you prefer to not register
regulators that
are not described in the device-tree ?
No, I'm saying register all regulators regardless of if they are in the
device tree - you shouldn't be looking at the init data at all here,
just let the framework match them using of_match.
I have reworked the code so that we don't touch any more to the init_data.
the new loop to register the regulators is below:

     for (i = 0; i < ARRAY_SIZE(stpmic1_regulator_cfgs); i++) {
         ret = stpmic1_regulator_register(pdev, i, &stpmic1_matches[i],
                          regul);
         if (ret < 0)
             return ret;
         regul++;
     }

Each regulator is registered, even is it is not described in the 
device-tree.

stpmic1_regulator_parse_dt() and stpmic1_regulator_init() are now merged 
inside
stpmic1_regulator_register() function.

Thank You,
pascal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help