diff options
author | Patrick McHardy <kaber@trash.net> | 2011-04-13 07:32:28 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-04-13 07:32:28 -0400 |
commit | b32e3dc7860d00124fa432dba09667e647cb9bcc (patch) | |
tree | 2fa6e56f389431dfb84609d3d7572cad76e88e71 /include/linux/power_supply.h | |
parent | 6604271c5bc658a6067ed0c3deba4d89e0e50382 (diff) | |
parent | 96120d86fe302c006259baee9061eea9e1b9e486 (diff) |
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/kaber/nf-2.6
Diffstat (limited to 'include/linux/power_supply.h')
-rw-r--r-- | include/linux/power_supply.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 7d7325685c42..204c18dfdc9e 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -173,6 +173,8 @@ struct power_supply { | |||
173 | char *full_trig_name; | 173 | char *full_trig_name; |
174 | struct led_trigger *online_trig; | 174 | struct led_trigger *online_trig; |
175 | char *online_trig_name; | 175 | char *online_trig_name; |
176 | struct led_trigger *charging_blink_full_solid_trig; | ||
177 | char *charging_blink_full_solid_trig_name; | ||
176 | #endif | 178 | #endif |
177 | }; | 179 | }; |
178 | 180 | ||
@@ -213,4 +215,49 @@ extern void power_supply_unregister(struct power_supply *psy); | |||
213 | /* For APM emulation, think legacy userspace. */ | 215 | /* For APM emulation, think legacy userspace. */ |
214 | extern struct class *power_supply_class; | 216 | extern struct class *power_supply_class; |
215 | 217 | ||
218 | static inline bool power_supply_is_amp_property(enum power_supply_property psp) | ||
219 | { | ||
220 | switch (psp) { | ||
221 | case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: | ||
222 | case POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN: | ||
223 | case POWER_SUPPLY_PROP_CHARGE_FULL: | ||
224 | case POWER_SUPPLY_PROP_CHARGE_EMPTY: | ||
225 | case POWER_SUPPLY_PROP_CHARGE_NOW: | ||
226 | case POWER_SUPPLY_PROP_CHARGE_AVG: | ||
227 | case POWER_SUPPLY_PROP_CHARGE_COUNTER: | ||
228 | case POWER_SUPPLY_PROP_CURRENT_MAX: | ||
229 | case POWER_SUPPLY_PROP_CURRENT_NOW: | ||
230 | case POWER_SUPPLY_PROP_CURRENT_AVG: | ||
231 | return 1; | ||
232 | default: | ||
233 | break; | ||
234 | } | ||
235 | |||
236 | return 0; | ||
237 | } | ||
238 | |||
239 | static inline bool power_supply_is_watt_property(enum power_supply_property psp) | ||
240 | { | ||
241 | switch (psp) { | ||
242 | case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN: | ||
243 | case POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN: | ||
244 | case POWER_SUPPLY_PROP_ENERGY_FULL: | ||
245 | case POWER_SUPPLY_PROP_ENERGY_EMPTY: | ||
246 | case POWER_SUPPLY_PROP_ENERGY_NOW: | ||
247 | case POWER_SUPPLY_PROP_ENERGY_AVG: | ||
248 | case POWER_SUPPLY_PROP_VOLTAGE_MAX: | ||
249 | case POWER_SUPPLY_PROP_VOLTAGE_MIN: | ||
250 | case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: | ||
251 | case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: | ||
252 | case POWER_SUPPLY_PROP_VOLTAGE_NOW: | ||
253 | case POWER_SUPPLY_PROP_VOLTAGE_AVG: | ||
254 | case POWER_SUPPLY_PROP_POWER_NOW: | ||
255 | return 1; | ||
256 | default: | ||
257 | break; | ||
258 | } | ||
259 | |||
260 | return 0; | ||
261 | } | ||
262 | |||
216 | #endif /* __LINUX_POWER_SUPPLY_H__ */ | 263 | #endif /* __LINUX_POWER_SUPPLY_H__ */ |