On Fri, May 25, 2018 at 11:24:58AM +0100, Mark Brown wrote: > On Fri, May 25, 2018 at 08:54:30AM +0300, Matti Vaittinen wrote: > > On Thu, May 24, 2018 at 06:57:21PM +0100, Mark Brown wrote: > > > > You can look at the regulators node within the parent device, you know > > > that in Linux the parent device will be the MFD. > > > So I should parse the device-tree in MFD my driver in order to locate > > the regulators node? Isn't that somewhat like code dublication? If we > > rely on compatibles we can avoid device-tree parsing in MFD driver, > > No, there's no need to do this - the child can just look at the of_node > of the parent since it can never be instantiated otherwise. > > > right? An in-tree example of this is: > > There are some bad examples (and some where the same regulators can get > used with multiple different parents) but that's no reason not to follow > good practice. Fair enough. I guess you may still know regulator subsystem better than I do with my one month of experience ;) I'll follow your suggestion and cook-up new patches. Br, Matti Vaittinen -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html