2009-09-18 20:45:00

by Wolfram Sang

[permalink] [raw]
Subject: Lightweight patchset for regulator-framework

Hi,

here is a small patch series fixing a few issues I found while working on a
regulator driver. Might be nice to have in 2.6.32 already.

Regards,

Wolfram


2009-09-18 20:45:08

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 1/4] regulator: fix typos

Fix a couple of typos I found while working with this subsystem.

Signed-off-by: Wolfram Sang <[email protected]>
---
Documentation/power/regulator/machine.txt | 4 ++--
include/linux/regulator/machine.h | 6 +++---
include/linux/regulator/max1586.h | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Documentation/power/regulator/machine.txt b/Documentation/power/regulator/machine.txt
index ce3487d..63728fe 100644
--- a/Documentation/power/regulator/machine.txt
+++ b/Documentation/power/regulator/machine.txt
@@ -87,7 +87,7 @@ static struct platform_device regulator_devices[] = {
},
};
/* register regulator 1 device */
-platform_device_register(&wm8350_regulator_devices[0]);
+platform_device_register(&regulator_devices[0]);

/* register regulator 2 device */
-platform_device_register(&wm8350_regulator_devices[1]);
+platform_device_register(&regulator_devices[1]);
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h
index bac64fa..91aceae 100644
--- a/include/linux/regulator/machine.h
+++ b/include/linux/regulator/machine.h
@@ -41,7 +41,7 @@ struct regulator;
#define REGULATOR_CHANGE_DRMS 0x10

/**
- * struct regulator_state - regulator state during low power syatem states
+ * struct regulator_state - regulator state during low power system states
*
* This describes a regulators state during a system wide low power state.
*
@@ -117,10 +117,10 @@ struct regulation_constraints {
/* mode to set on startup */
unsigned int initial_mode;

- /* constriant flags */
+ /* constraint flags */
unsigned always_on:1; /* regulator never off when system is on */
unsigned boot_on:1; /* bootloader/firmware enabled regulator */
- unsigned apply_uV:1; /* apply uV constraint iff min == max */
+ unsigned apply_uV:1; /* apply uV constraint if min == max */
};

/**
diff --git a/include/linux/regulator/max1586.h b/include/linux/regulator/max1586.h
index 4456319..de9a7fa 100644
--- a/include/linux/regulator/max1586.h
+++ b/include/linux/regulator/max1586.h
@@ -36,7 +36,7 @@
* max1586_subdev_data - regulator data
* @id: regulator Id (either MAX1586_V3 or MAX1586_V6)
* @name: regulator cute name (example for V3: "vcc_core")
- * @platform_data: regulator init data (contraints, supplies, ...)
+ * @platform_data: regulator init data (constraints, supplies, ...)
*/
struct max1586_subdev_data {
int id;
@@ -46,7 +46,7 @@ struct max1586_subdev_data {

/**
* max1586_platform_data - platform data for max1586
- * @num_subdevs: number of regultors used (may be 1 or 2)
+ * @num_subdevs: number of regulators used (may be 1 or 2)
* @subdevs: regulator used
* At most, there will be a regulator for V3 and one for V6 voltages.
* @v3_gain: gain on the V3 voltage output multiplied by 1e6.
--
1.6.3.3

2009-09-18 20:45:13

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 2/4] regulator: drop 'default n'

Specifying 'default n' is superfluous.

Signed-off-by: Wolfram Sang <[email protected]>
---
drivers/regulator/Kconfig | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index f431779..19663fe 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -1,6 +1,5 @@
menuconfig REGULATOR
bool "Voltage and Current Regulator Support"
- default n
help
Generic Voltage and Current Regulator support.

@@ -30,7 +29,6 @@ config REGULATOR_DEBUG

config REGULATOR_FIXED_VOLTAGE
tristate "Fixed voltage regulator support"
- default n
help
This driver provides support for fixed voltage regulators,
useful for systems which use a combination of software
@@ -38,7 +36,6 @@ config REGULATOR_FIXED_VOLTAGE

config REGULATOR_VIRTUAL_CONSUMER
tristate "Virtual regulator consumer support"
- default n
help
This driver provides a virtual consumer for the voltage and
current regulator API which provides sysfs controls for
@@ -49,7 +46,6 @@ config REGULATOR_VIRTUAL_CONSUMER

config REGULATOR_USERSPACE_CONSUMER
tristate "Userspace regulator consumer support"
- default n
help
There are some classes of devices that are controlled entirely
from user space. Usersapce consumer driver provides ability to
@@ -59,7 +55,6 @@ config REGULATOR_USERSPACE_CONSUMER

config REGULATOR_BQ24022
tristate "TI bq24022 Dual Input 1-Cell Li-Ion Charger IC"
- default n
help
This driver controls a TI bq24022 Charger attached via
GPIOs. The provided current regulator can enable/disable
@@ -69,7 +64,6 @@ config REGULATOR_BQ24022
config REGULATOR_MAX1586
tristate "Maxim 1586/1587 voltage regulator"
depends on I2C
- default n
help
This driver controls a Maxim 1586 or 1587 voltage output
regulator via I2C bus. The provided regulator is suitable
--
1.6.3.3

2009-09-18 20:45:20

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 3/4] regulator/lp3971: drop unnecessary initialization

Signed-off-by: Wolfram Sang <[email protected]>
---
drivers/regulator/lp3971.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index a61018a..7803a32 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -541,7 +541,7 @@ static struct i2c_driver lp3971_i2c_driver = {

static int __init lp3971_module_init(void)
{
- int ret = -ENODEV;
+ int ret;

ret = i2c_add_driver(&lp3971_i2c_driver);
if (ret != 0)
--
1.6.3.3

2009-09-18 20:45:43

by Wolfram Sang

[permalink] [raw]
Subject: [PATCH 4/4] regulator/driver: be more specific in nanodoc for is_enabled

Document the possibility that is_enabled may also return with negative
errorcodes.

Signed-off-by: Wolfram Sang <[email protected]>
---
include/linux/regulator/driver.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 225f733..2b69b47 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -37,7 +37,8 @@ enum regulator_status {
*
* @enable: Configure the regulator as enabled.
* @disable: Configure the regulator as disabled.
- * @is_enabled: Return 1 if the regulator is enabled, 0 otherwise.
+ * @is_enabled: Return 1 if the regulator is enabled, 0 if not.
+ * May also return negative errno.
*
* @set_voltage: Set the voltage for the regulator within the range specified.
* The driver should select the voltage closest to min_uV.
--
1.6.3.3

2009-09-18 21:14:04

by Mark Brown

[permalink] [raw]
Subject: Re: Lightweight patchset for regulator-framework

On 18 Sep 2009, at 21:44, Wolfram Sang <[email protected]> wrote:

> Hi,
>
> here is a small patch series fixing a few issues I found while
> working on a
> regulator driver. Might be nice to have in 2.6.32 already.

All


Acked-by: Mark Brown <[email protected]>

>
> Regards,
>
> Wolfram
>

2009-09-19 10:33:30

by Liam Girdwood

[permalink] [raw]
Subject: Re: Lightweight patchset for regulator-framework

On Fri, 2009-09-18 at 22:44 +0200, Wolfram Sang wrote:
> Hi,
>
> here is a small patch series fixing a few issues I found while working on a
> regulator driver. Might be nice to have in 2.6.32 already.
>
> Regards,
>
> Wolfram
>

Applied all.

Thanks

Liam