
On 09/15/2016 03:30 AM, John Keeping wrote:
On Thu, 15 Sep 2016 09:27:22 +0200, Marcel Ziswiler wrote:
According to the binding documentation the fixed regulator enable GPIO is optional. However so far registration thereof failed if no enable GPIO was specified. Fix this by making it entirely optional whether an enable GPIO is used.
@@ -98,8 +100,9 @@ static int fixed_regulator_set_enable(struct udevice *dev, bool enable) struct fixed_regulator_platdata *dev_pdata = dev_get_platdata(dev); int ret;
- /* Enable GPIO is optional */ if (!dev_pdata->gpio.dev)
return -ENOSYS;
return 0;
I'm not sure about this change, the current behaviour seems correct to me. After this we're pretending that fixed_set_enable(dev, false) has succeeded, when it has not.
That should probably be:
if (!dev_pdata->gpio.dev) { if (!enable) return -ENOSYS return 0; }