summaryrefslogtreecommitdiff
path: root/drivers/power/supply/power_supply.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-06 18:21:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-06 18:21:15 -0700
commit021723e6c5a5e7b50eb68f9812418406de9860b2 (patch)
treefe22465563a9056925f0e4edd236d9a6c456e6cc /drivers/power/supply/power_supply.h
parentc6594fc6af1924b7fdce600088b10e3b3b159fb7 (diff)
parent1d72706f0485b58e151b5a7584c4c65d66670587 (diff)
Merge tag 'for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply and reset updates from Sebastian Reichel: - move power supply drivers to drivers/power/supply - unify location of power supply DT documentation - tps65217-charger: IRQ support - act8945a-charger: misc. cleanups & improvements - sbs-battery cleanup - fix users of deprecated create_singlethread_workqueue() - misc fixes. * tag 'for-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (46 commits) power: supply: bq27xxx_battery: allow kernel poll_interval parameter runtime update power: supply: sbs-battery: Cleanup removal of chip->pdata power: reset: st: Remove obsolete platforms from dt doc power: reset: st-poweroff: Remove obsolete platforms. power: reset: zx-reboot: Unmap region obtained by of_iomap power: reset: xgene-reboot: Unmap region obtained by of_iomap power: supply: ab8500: cleanup with list_first_entry_or_null() power: reset: add in missing white space in error message text sbs-battery: make writes to ManufacturerAccess optional power: bq24257: Fix use of uninitialized pointer bq->charger power: supply: sbs-battery: simplify DT parsing power: supply: bq24735-charger: Request status GPIO with initial input setup power: supply: sbs-battery: Use gpio_desc and sleeping calls for battery detect power: supply: act8945a_charger: Add max current property power: supply: act8945a_charger: Add capacity level property doc: bindings: power: act8945a-charger: Update properties. power: supply: act8945a_charger: Fix the power supply type power: supply: act8945a_charger: Add status change update support power: supply: act8945a_charger: Improve state handling power: supply: act8945a_charger: Remove "battery_temperature" ...
Diffstat (limited to 'drivers/power/supply/power_supply.h')
-rw-r--r--drivers/power/supply/power_supply.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/power/supply/power_supply.h b/drivers/power/supply/power_supply.h
new file mode 100644
index 000000000000..cc439fd89d8d
--- /dev/null
+++ b/drivers/power/supply/power_supply.h
@@ -0,0 +1,42 @@
+/*
+ * Functions private to power supply class
+ *
+ * Copyright © 2007 Anton Vorontsov <cbou@mail.ru>
+ * Copyright © 2004 Szabolcs Gyurko
+ * Copyright © 2003 Ian Molton <spyro@f2s.com>
+ *
+ * Modified: 2004, Oct Szabolcs Gyurko
+ *
+ * You may use this code as per GPL version 2
+ */
+
+struct device;
+struct device_type;
+struct power_supply;
+
+#ifdef CONFIG_SYSFS
+
+extern void power_supply_init_attrs(struct device_type *dev_type);
+extern int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env);
+
+#else
+
+static inline void power_supply_init_attrs(struct device_type *dev_type) {}
+#define power_supply_uevent NULL
+
+#endif /* CONFIG_SYSFS */
+
+#ifdef CONFIG_LEDS_TRIGGERS
+
+extern void power_supply_update_leds(struct power_supply *psy);
+extern int power_supply_create_triggers(struct power_supply *psy);
+extern void power_supply_remove_triggers(struct power_supply *psy);
+
+#else
+
+static inline void power_supply_update_leds(struct power_supply *psy) {}
+static inline int power_supply_create_triggers(struct power_supply *psy)
+{ return 0; }
+static inline void power_supply_remove_triggers(struct power_supply *psy) {}
+
+#endif /* CONFIG_LEDS_TRIGGERS */