aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/virtual.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-09-22regulator: Improve virtual consumer probe error handlingMark Brown1-4/+8
Report errors to the user and try harder to clean up if we're not able to probe. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-09-22regulator: Make virtual consumer a bit more chattyMark Brown1-0/+8
This makes it easier to read the logs when doing testing. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-09-22regulator: Make virtual consumer use dev_printkMark Brown1-16/+18
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-09-22regulator: Report regulator_get() failure in virtual consumerMark Brown1-0/+2
The core will no longer complain so we should log an error here. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-06-15regulator: Set MODULE_ALIAS for regulator driversMark Brown1-0/+1
Several of the regulator drivers didn't have MODULE_ALIAS so couldn't be auto loaded. Add the MODULE_ALIAS in case they do get built as modules. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-04-28regulator/virtual: fix strings compare predicatesMike Rapoport1-4/+4
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-03-31regulator: Mark attributes table for virtual regulator staticMark Brown1-1/+1
It's not exported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-03-31regulator: minor cleanup of virtual consumerAndrew Morton1-0/+4
On Thu, 15 Jan 2009 16:10:22 -0800 Andrew Morton <akpm@linux-foundation.org> wrote: > On Wed, 14 Jan 2009 13:16:27 -0800 > David Brownell <david-b@pacbell.net> wrote: > > > From: David Brownell <dbrownell@users.sourceforge.net> > > > > Minor cleanup to the regulator set_mode sysfs support: > > switch to sysfs_streq() in set_mode(), which is also > > a code shrink. Use the same strings that get_mode() > > uses, shrinking data too. > > > > Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> > > --- > > drivers/regulator/virtual.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > --- a/drivers/regulator/virtual.c > > +++ b/drivers/regulator/virtual.c > > @@ -226,13 +226,13 @@ static ssize_t set_mode(struct device *d > > unsigned int mode; > > int ret; > > > > - if (strncmp(buf, "fast", strlen("fast")) == 0) > > + if (sysfs_streq(buf, "fast\n") == 0) > > mode = REGULATOR_MODE_FAST; > > - else if (strncmp(buf, "normal", strlen("normal")) == 0) > > + else if (sysfs_streq(buf, "normal\n") == 0) > > mode = REGULATOR_MODE_NORMAL; > > - else if (strncmp(buf, "idle", strlen("idle")) == 0) > > + else if (sysfs_streq(buf, "idle\n") == 0) > > mode = REGULATOR_MODE_IDLE; > > - else if (strncmp(buf, "standby", strlen("standby")) == 0) > > + else if (sysfs_streq(buf, "standby\n") == 0) > > mode = REGULATOR_MODE_STANDBY; > > we don't need the \n's, do we? oh, it's for the string sharing. Sneaky. I wonder how many people will try to fix that up for us? Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-03-31regulator: minor cleanup of virtual consumerDavid Brownell1-4/+4
Minor cleanup to the regulator set_mode sysfs support: switch to sysfs_streq() in set_mode(), which is also a code shrink. Use the same strings that get_mode() uses, shrinking data too. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2008-07-30regulator: regulator test harnessMark Brown1-0/+345
This provides a virtual regulator test harness which exposes a sysfs interface for setting power requirements, intended for test purposes only. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com>