[lkml]   [2015]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] regulator: Support different config and dev of_nodes in regulator_register
On Wed, Feb 11, 2015 at 09:21:32AM -0800, Tim Bird wrote:

> Also, when registering a regulator, you can pass a different
> of_node in config (struct regulator_config) than the one in dev
> (struct device)

> However, this has problems in the current code, as the test in
> regulator_dev_lookup requires that the device_node found by of_get_regulator()
> match the dev.of_node in the regulator in the regulator list.


> It took me a while to figure this out, because a regulator defined
> with dev.of_node != config.of_node worked fine, when accessed
> directly by name (not using a supply-name). I only had problems
> when I accessed the regulator using the "-supply" indirection technique
> in DT.

I'm not quite sure exactly what you've done here but I'm pretty sure
there's some confusion somewhere since the -supply based lookups are of
course what everything in mainline is doing except for CPU supplies.
The fact that you are using of_get_regulator_init_data() is a bit of a
red flag here, you shouldn't have to use that unless your bindings are
in some way unusual.
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2015-02-12 03:41    [W:0.073 / U:1.916 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site