2019-05-29 01:10:21 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2007-05-04 04:27:45 +08:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
2012-01-23 00:23:42 +08:00
|
|
|
struct device;
|
|
|
|
struct device_type;
|
|
|
|
struct power_supply;
|
|
|
|
|
2007-05-04 04:27:45 +08:00
|
|
|
#ifdef CONFIG_SYSFS
|
|
|
|
|
2010-05-19 03:49:51 +08:00
|
|
|
extern void power_supply_init_attrs(struct device_type *dev_type);
|
2007-08-14 21:15:12 +08:00
|
|
|
extern int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env);
|
2007-05-04 04:27:45 +08:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
2010-05-19 03:49:51 +08:00
|
|
|
static inline void power_supply_init_attrs(struct device_type *dev_type) {}
|
2007-05-04 04:27:45 +08:00
|
|
|
#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 */
|