diff options
Diffstat (limited to 'Documentation/power')
-rw-r--r-- | Documentation/power/power_supply_class.txt | 7 | ||||
-rw-r--r-- | Documentation/power/regulator/design.txt | 33 | ||||
-rw-r--r-- | Documentation/power/regulator/machine.txt | 4 | ||||
-rw-r--r-- | Documentation/power/regulator/overview.txt | 4 | ||||
-rw-r--r-- | Documentation/power/regulator/regulator.txt | 5 |
5 files changed, 47 insertions, 6 deletions
diff --git a/Documentation/power/power_supply_class.txt b/Documentation/power/power_supply_class.txt index c6cd4956047c..9f16c5178b66 100644 --- a/Documentation/power/power_supply_class.txt +++ b/Documentation/power/power_supply_class.txt | |||
@@ -76,6 +76,11 @@ STATUS - this attribute represents operating status (charging, full, | |||
76 | discharging (i.e. powering a load), etc.). This corresponds to | 76 | discharging (i.e. powering a load), etc.). This corresponds to |
77 | BATTERY_STATUS_* values, as defined in battery.h. | 77 | BATTERY_STATUS_* values, as defined in battery.h. |
78 | 78 | ||
79 | CHARGE_TYPE - batteries can typically charge at different rates. | ||
80 | This defines trickle and fast charges. For batteries that | ||
81 | are already charged or discharging, 'n/a' can be displayed (or | ||
82 | 'unknown', if the status is not known). | ||
83 | |||
79 | HEALTH - represents health of the battery, values corresponds to | 84 | HEALTH - represents health of the battery, values corresponds to |
80 | POWER_SUPPLY_HEALTH_*, defined in battery.h. | 85 | POWER_SUPPLY_HEALTH_*, defined in battery.h. |
81 | 86 | ||
@@ -108,6 +113,8 @@ relative, time-based measurements. | |||
108 | ENERGY_FULL, ENERGY_EMPTY - same as above but for energy. | 113 | ENERGY_FULL, ENERGY_EMPTY - same as above but for energy. |
109 | 114 | ||
110 | CAPACITY - capacity in percents. | 115 | CAPACITY - capacity in percents. |
116 | CAPACITY_LEVEL - capacity level. This corresponds to | ||
117 | POWER_SUPPLY_CAPACITY_LEVEL_*. | ||
111 | 118 | ||
112 | TEMP - temperature of the power supply. | 119 | TEMP - temperature of the power supply. |
113 | TEMP_AMBIENT - ambient temperature. | 120 | TEMP_AMBIENT - ambient temperature. |
diff --git a/Documentation/power/regulator/design.txt b/Documentation/power/regulator/design.txt new file mode 100644 index 000000000000..f9b56b72b782 --- /dev/null +++ b/Documentation/power/regulator/design.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | Regulator API design notes | ||
2 | ========================== | ||
3 | |||
4 | This document provides a brief, partially structured, overview of some | ||
5 | of the design considerations which impact the regulator API design. | ||
6 | |||
7 | Safety | ||
8 | ------ | ||
9 | |||
10 | - Errors in regulator configuration can have very serious consequences | ||
11 | for the system, potentially including lasting hardware damage. | ||
12 | - It is not possible to automatically determine the power confugration | ||
13 | of the system - software-equivalent variants of the same chip may | ||
14 | have different power requirments, and not all components with power | ||
15 | requirements are visible to software. | ||
16 | |||
17 | => The API should make no changes to the hardware state unless it has | ||
18 | specific knowledge that these changes are safe to do perform on | ||
19 | this particular system. | ||
20 | |||
21 | Consumer use cases | ||
22 | ------------------ | ||
23 | |||
24 | - The overwhelming majority of devices in a system will have no | ||
25 | requirement to do any runtime configuration of their power beyond | ||
26 | being able to turn it on or off. | ||
27 | |||
28 | - Many of the power supplies in the system will be shared between many | ||
29 | different consumers. | ||
30 | |||
31 | => The consumer API should be structured so that these use cases are | ||
32 | very easy to handle and so that consumers will work with shared | ||
33 | supplies without any additional effort. | ||
diff --git a/Documentation/power/regulator/machine.txt b/Documentation/power/regulator/machine.txt index ce3487d99abe..63728fed620b 100644 --- a/Documentation/power/regulator/machine.txt +++ b/Documentation/power/regulator/machine.txt | |||
@@ -87,7 +87,7 @@ static struct platform_device regulator_devices[] = { | |||
87 | }, | 87 | }, |
88 | }; | 88 | }; |
89 | /* register regulator 1 device */ | 89 | /* register regulator 1 device */ |
90 | platform_device_register(&wm8350_regulator_devices[0]); | 90 | platform_device_register(®ulator_devices[0]); |
91 | 91 | ||
92 | /* register regulator 2 device */ | 92 | /* register regulator 2 device */ |
93 | platform_device_register(&wm8350_regulator_devices[1]); | 93 | platform_device_register(®ulator_devices[1]); |
diff --git a/Documentation/power/regulator/overview.txt b/Documentation/power/regulator/overview.txt index 0cded696ca01..ffd185bb6054 100644 --- a/Documentation/power/regulator/overview.txt +++ b/Documentation/power/regulator/overview.txt | |||
@@ -29,7 +29,7 @@ Some terms used in this document:- | |||
29 | 29 | ||
30 | 30 | ||
31 | o PMIC - Power Management IC. An IC that contains numerous regulators | 31 | o PMIC - Power Management IC. An IC that contains numerous regulators |
32 | and often contains other susbsystems. | 32 | and often contains other subsystems. |
33 | 33 | ||
34 | 34 | ||
35 | o Consumer - Electronic device that is supplied power by a regulator. | 35 | 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:- | |||
168 | userspace via sysfs. This could be used to help monitor device power | 168 | userspace via sysfs. This could be used to help monitor device power |
169 | consumption and status. | 169 | consumption and status. |
170 | 170 | ||
171 | See Documentation/ABI/testing/regulator-sysfs.txt | 171 | See Documentation/ABI/testing/sysfs-class-regulator |
diff --git a/Documentation/power/regulator/regulator.txt b/Documentation/power/regulator/regulator.txt index 4200accb9bba..3f8b528f237e 100644 --- a/Documentation/power/regulator/regulator.txt +++ b/Documentation/power/regulator/regulator.txt | |||
@@ -10,8 +10,9 @@ Registration | |||
10 | 10 | ||
11 | Drivers can register a regulator by calling :- | 11 | Drivers can register a regulator by calling :- |
12 | 12 | ||
13 | struct regulator_dev *regulator_register(struct device *dev, | 13 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, |
14 | struct regulator_desc *regulator_desc); | 14 | struct device *dev, struct regulator_init_data *init_data, |
15 | void *driver_data); | ||
15 | 16 | ||
16 | This will register the regulators capabilities and operations to the regulator | 17 | This will register the regulators capabilities and operations to the regulator |
17 | core. | 18 | core. |