Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6: (41 commits)
  regulator: Add some brief design documentation
  regulator: fix voltage range in da9034 ldo12
  regulator/driver: be more specific in nanodoc for is_enabled
  regulator/lp3971: drop unnecessary initialization
  regulator: drop 'default n'
  regulator: fix typos
  regulator: fix calculation of voltage range in da9034_set_ldo12_voltage()
  regulator: update a filename in documentation
  drivers/regulator/Kconfig: fix typo (s/Usersapce/Userspace/) in REGULATOR_USERSPACE_CONSUMER description
  REGULATOR Handle positive returncode from enable
  regulator: tps650xx - build fixes for x86_64
  Fix some regulator documentation
  Regulator: Adding TPS65023 and TPS6507x in Kconfig and Makefile
  Regulator: Add TPS6507x regulator driver
  Regulator: Add TPS65023 regulator driver
  regulator: userspace: use sysfs_create_group
  regulator: Add GPIO enable control to fixed voltage regulator driver
  Regulator: Implement list_voltage for pcf50633 regulator driver.
  regulator: regulator_enable() permission checking
  regulator: Push locking for regulator_is_enabled() out
  ...
  • Loading branch information
torvalds committed Sep 23, 2009
2 parents 0c9af28 + 63209a7 commit fd8b327
Show file tree
Hide file tree
Showing 22 changed files with 1,966 additions and 176 deletions.
33 changes: 33 additions & 0 deletions Documentation/power/regulator/design.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Regulator API design notes
==========================

This document provides a brief, partially structured, overview of some
of the design considerations which impact the regulator API design.

Safety
------

- Errors in regulator configuration can have very serious consequences
for the system, potentially including lasting hardware damage.
- It is not possible to automatically determine the power confugration
of the system - software-equivalent variants of the same chip may
have different power requirments, and not all components with power
requirements are visible to software.

=> The API should make no changes to the hardware state unless it has
specific knowledge that these changes are safe to do perform on
this particular system.

Consumer use cases
------------------

- The overwhelming majority of devices in a system will have no
requirement to do any runtime configuration of their power beyond
being able to turn it on or off.

- Many of the power supplies in the system will be shared between many
different consumers.

=> The consumer API should be structured so that these use cases are
very easy to handle and so that consumers will work with shared
supplies without any additional effort.
4 changes: 2 additions & 2 deletions Documentation/power/regulator/machine.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
4 changes: 2 additions & 2 deletions Documentation/power/regulator/overview.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Some terms used in this document:-


o PMIC - Power Management IC. An IC that contains numerous regulators
and often contains other susbsystems.
and often contains other subsystems.


o Consumer - Electronic device that is supplied power by a regulator.
Expand Down Expand Up @@ -168,4 +168,4 @@ relevant to non SoC devices and is split into the following four interfaces:-
userspace via sysfs. This could be used to help monitor device power
consumption and status.

See Documentation/ABI/testing/regulator-sysfs.txt
See Documentation/ABI/testing/sysfs-class-regulator
5 changes: 3 additions & 2 deletions Documentation/power/regulator/regulator.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Registration

Drivers can register a regulator by calling :-

struct regulator_dev *regulator_register(struct device *dev,
struct regulator_desc *regulator_desc);
struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
struct device *dev, struct regulator_init_data *init_data,
void *driver_data);

This will register the regulators capabilities and operations to the regulator
core.
Expand Down
24 changes: 17 additions & 7 deletions drivers/regulator/Kconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
menuconfig REGULATOR
bool "Voltage and Current Regulator Support"
default n
help
Generic Voltage and Current Regulator support.

Expand Down Expand Up @@ -30,15 +29,13 @@ 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
managed regulators and simple non-configurable regulators.

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
Expand All @@ -49,17 +46,15 @@ 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
from user space. Userspace consumer driver provides ability to
control power supplies for such devices.

If unsure, say no.

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
Expand All @@ -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
Expand Down Expand Up @@ -147,5 +141,21 @@ config REGULATOR_AB3100
AB3100 analog baseband dealing with power regulators
for the system.

config REGULATOR_TPS65023
tristate "TI TPS65023 Power regulators"
depends on I2C
help
This driver supports TPS65023 voltage regulator chips. TPS65023 provides
three step-down converters and two general-purpose LDO voltage regulators.
It supports TI's software based Class-2 SmartReflex implementation.

config REGULATOR_TPS6507X
tristate "TI TPS6507X Power regulators"
depends on I2C
help
This driver supports TPS6507X voltage regulator chips. TPS6507X provides
three step-down converters and two general-purpose LDO voltage regulators.
It supports TI's software based Class-2 SmartReflex implementation.

endif

3 changes: 3 additions & 0 deletions drivers/regulator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ obj-$(CONFIG_REGULATOR_PCAP) += pcap-regulator.o
obj-$(CONFIG_REGULATOR_MC13783) += mc13783.o
obj-$(CONFIG_REGULATOR_AB3100) += ab3100.o

obj-$(CONFIG_REGULATOR_TPS65023) += tps65023-regulator.o
obj-$(CONFIG_REGULATOR_TPS6507X) += tps6507x-regulator.o

ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG
Loading

0 comments on commit fd8b327

Please sign in to comment.