linux/drivers/regulator
Sundar R Iyer 500b4ac90d regulator: return set_mode is same mode is requested
On Mon, 2010-05-17 at 17:34 +0200, Mark Brown wrote:
> This doesn't seem like the right error handling - if the driver has a
> set_mode() you'd *expect* it to have a get_mode() but there's no need
> for it to be a strict requirement.
True. In such a case, even a valid request would be lost! So now
in the updated patch:
 - check if get_mode is present to avoid oops;
 - if get_mode is not present, proceed anyways for the request.

Here is the updated patch:

>From bad0d5eb51ef84be5b100e3dd0f5a590ea0529b6 Mon Sep 17 00:00:00 2001
From: Sundar R Iyer <sundar.iyer@stericsson.com>
Date: Fri, 14 May 2010 15:14:17 +0530
Subject: [PATCH 1/1] regulator: return set_mode when same mode is requested

save I/O costs by returning when the same mode is
requested for the regulator

Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Sundar R Iyer <sundar.iyer@stericsson.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-25 10:16:02 +01:00
..
88pm8607.c regulator: use voltage number array in 88pm860x 2010-05-25 10:16:02 +01:00
ab3100.c Regulators: ab3100/bq24022: add a missing .owner field in regulator_desc 2010-05-25 10:16:02 +01:00
bq24022.c Regulators: ab3100/bq24022: add a missing .owner field in regulator_desc 2010-05-25 10:16:02 +01:00
core.c regulator: return set_mode is same mode is requested 2010-05-25 10:16:02 +01:00
da903x.c regulator: keep index within bounds in da9034_get_ldo12_voltage() 2009-12-17 10:27:25 +00:00
dummy.c regulator: Provide optional dummy regulator for consumers 2010-03-03 14:49:26 +00:00
dummy.h regulator: Provide optional dummy regulator for consumers 2010-03-03 14:49:26 +00:00
fixed.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Kconfig regulator: Add max8925 support 2010-03-07 22:17:08 +01:00
lp3971.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
Makefile regulator: Add max8925 support 2010-03-07 22:17:08 +01:00
max1586.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
max8649.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
max8660.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
max8925-regulator.c regulator: fix enabling regulator issue on max8925 2010-04-28 15:24:34 +01:00
mc13783-regulator.c mc13783-regulator: fix vaild voltage range checking for mc13783_fixed_regulator_set_voltage 2010-05-25 10:16:02 +01:00
pcap-regulator.c Regulators: pcap-regulator - clean up driver data after removal 2010-03-03 14:49:29 +00:00
pcf50633-regulator.c mfd: Fix pcf50633-regulator drvdata usage 2009-12-13 19:21:20 +01:00
tps6507x-regulator.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
tps65023-regulator.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
twl-regulator.c twl6030: regulator: Remove vsel tables and use formula for calculation 2010-05-25 10:16:02 +01:00
userspace-consumer.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
virtual.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wm831x-dcdc.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wm831x-isink.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wm831x-ldo.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wm8350-regulator.c mfd: Add a data argument to the WM8350 IRQ free function 2010-03-07 22:16:56 +01:00
wm8400-regulator.c Regulators: wm8400 - cleanup platform driver data handling 2010-03-03 14:49:30 +00:00
wm8994-regulator.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00