Mark Brown wrote: > Yes, that's exactly the intention. Okay. I guess what makes me feel uncomfortable about it is that a failed name lookup can both be an error condition (typo, something went wrong with the setup, etc.) and a legitimate way of telling that no regulator is to be used in this case.
> Note that when you add consumers you're specifying a per-consumer name > that the consumer will use to request the regulator - it's just a key > used for lookup. So perhaps something like MMC_REG would be a good "local" name then ? Is there a common style for these per-driver names ? > I suggest dealing with this by providing a standard regulator API > set_power() in the s3cmci driver that platforms which use regulators can > assign in their platform data. This avoids people rewriting the > standard regulator API implementation. That sounds good to me. It would also remove the above discomfort, because you'd only call it if you're sure there is a regulator. Thanks a lot for explaining ! - Werner
