On Thu, Dec 03, 2015 at 08:14:33AM +0000, Simon Arlott wrote: > On 03/12/15 00:06, Mark Brown wrote: > > this it should know at least something about how to control the device > > from the compatible string. If you're making a generic driver it should > > not make reference to specific devices. > Will you accept a generic driver for a simple enable regulator device on > a regmap? What should its compatible string be? Perhaps. I really don't like putting the entire driver into DT, it's not a pattern I want to encourage. > > There could be one if it would help, but we do normally manage to do > > this without - look at how other regulator drivers work. > Several of them have a fixed list of supported regulator names in the Yes, that's the way this is handled. > driver. The regulator names for this device are meaningless to the > driver because all of the regulators look the same. They don't have a > known or controllable voltage and can only be turned on or off. Nonsense. The names are useful to identify which supply is being referred to. Having voltage control is irrelevant to identifying regulators. > Any table mapping regulator names to bits in the register would be > different for each SoC making the list of regulator names in the device > tree redundant. If they're not listed in the device tree then I can't > use them as a phandle for other devices. The list of regulator nodes in device tree is not redundant, it is as you say used to connect things together. The question is where to put the control data for those regulators (in this case the enable time and the switch).
Attachment:
signature.asc
Description: PGP signature