1a63a5fa9SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 28c0984e5SSebastian Reichel /* 38c0984e5SSebastian Reichel * Functions private to power supply class 48c0984e5SSebastian Reichel * 58c0984e5SSebastian Reichel * Copyright © 2007 Anton Vorontsov <cbou@mail.ru> 68c0984e5SSebastian Reichel * Copyright © 2004 Szabolcs Gyurko 78c0984e5SSebastian Reichel * Copyright © 2003 Ian Molton <spyro@f2s.com> 88c0984e5SSebastian Reichel * 98c0984e5SSebastian Reichel * Modified: 2004, Oct Szabolcs Gyurko 108c0984e5SSebastian Reichel */ 118c0984e5SSebastian Reichel 128c0984e5SSebastian Reichel struct device; 138c0984e5SSebastian Reichel struct device_type; 148c0984e5SSebastian Reichel struct power_supply; 158c0984e5SSebastian Reichel 168c0984e5SSebastian Reichel #ifdef CONFIG_SYSFS 178c0984e5SSebastian Reichel 188c0984e5SSebastian Reichel extern void power_supply_init_attrs(struct device_type *dev_type); 19*23680f0bSGreg Kroah-Hartman extern int power_supply_uevent(const struct device *dev, struct kobj_uevent_env *env); 208c0984e5SSebastian Reichel 218c0984e5SSebastian Reichel #else 228c0984e5SSebastian Reichel power_supply_init_attrs(struct device_type * dev_type)238c0984e5SSebastian Reichelstatic inline void power_supply_init_attrs(struct device_type *dev_type) {} 248c0984e5SSebastian Reichel #define power_supply_uevent NULL 258c0984e5SSebastian Reichel 268c0984e5SSebastian Reichel #endif /* CONFIG_SYSFS */ 278c0984e5SSebastian Reichel 288c0984e5SSebastian Reichel #ifdef CONFIG_LEDS_TRIGGERS 298c0984e5SSebastian Reichel 308c0984e5SSebastian Reichel extern void power_supply_update_leds(struct power_supply *psy); 318c0984e5SSebastian Reichel extern int power_supply_create_triggers(struct power_supply *psy); 328c0984e5SSebastian Reichel extern void power_supply_remove_triggers(struct power_supply *psy); 338c0984e5SSebastian Reichel 348c0984e5SSebastian Reichel #else 358c0984e5SSebastian Reichel power_supply_update_leds(struct power_supply * psy)368c0984e5SSebastian Reichelstatic inline void power_supply_update_leds(struct power_supply *psy) {} power_supply_create_triggers(struct power_supply * psy)378c0984e5SSebastian Reichelstatic inline int power_supply_create_triggers(struct power_supply *psy) 388c0984e5SSebastian Reichel { return 0; } power_supply_remove_triggers(struct power_supply * psy)398c0984e5SSebastian Reichelstatic inline void power_supply_remove_triggers(struct power_supply *psy) {} 408c0984e5SSebastian Reichel 418c0984e5SSebastian Reichel #endif /* CONFIG_LEDS_TRIGGERS */ 42