On Tue, Aug 23, 2011 at 10:15:07PM +0200, Heiko Stübner wrote: > Am Dienstag 23 August 2011, 13:50:24 schrieb Mark Brown: > > On Sat, Aug 20, 2011 at 10:24:51PM +0200, Heiko Stübner wrote: > > > + } else if (max_uA >= 100000) { > > > + dev_dbg(rdev_get_dev(rdev), > > > + "setting current limit to 100 mA\n"); > > > + gpio_set_value(pdata->gpio_en2, 0); > > > + gpio_set_value(pdata->gpio_en1, 0); > > > + } else { > > > + dev_dbg(rdev_get_dev(rdev), > > > + "setting current limit to 0 mA\n"); > > > + gpio_set_value(pdata->gpio_en2, 1); > > > + gpio_set_value(pdata->gpio_en1, 1); > > > + } > > I'd rather expect this to return an error sometimes. > gpio_set_value is a void function, so I'm not sure what could cause an error > here. For example if you're asked for a limit below 100mA - disabling the charger probably isn't a useful implementation. The disable should be done with enable/disable. _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm