Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd8b327e authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* '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
  ...
parents 0c9af280 63209a71
Loading
Loading
Loading
Loading
+33 −0
Original line number Diff line number Diff line
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.
+2 −2
Original line number Diff line number Diff line
@@ -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]);
+2 −2
Original line number Diff line number Diff line
@@ -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.
@@ -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
+3 −2
Original line number Diff line number Diff line
@@ -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.
+17 −7
Original line number Diff line number Diff line
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,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
@@ -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
@@ -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
Loading