Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  *  Functions private to power supply class
0004  *
0005  *  Copyright © 2007  Anton Vorontsov <cbou@mail.ru>
0006  *  Copyright © 2004  Szabolcs Gyurko
0007  *  Copyright © 2003  Ian Molton <spyro@f2s.com>
0008  *
0009  *  Modified: 2004, Oct     Szabolcs Gyurko
0010  */
0011 
0012 struct device;
0013 struct device_type;
0014 struct power_supply;
0015 
0016 #ifdef CONFIG_SYSFS
0017 
0018 extern void power_supply_init_attrs(struct device_type *dev_type);
0019 extern int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env);
0020 
0021 #else
0022 
0023 static inline void power_supply_init_attrs(struct device_type *dev_type) {}
0024 #define power_supply_uevent NULL
0025 
0026 #endif /* CONFIG_SYSFS */
0027 
0028 #ifdef CONFIG_LEDS_TRIGGERS
0029 
0030 extern void power_supply_update_leds(struct power_supply *psy);
0031 extern int power_supply_create_triggers(struct power_supply *psy);
0032 extern void power_supply_remove_triggers(struct power_supply *psy);
0033 
0034 #else
0035 
0036 static inline void power_supply_update_leds(struct power_supply *psy) {}
0037 static inline int power_supply_create_triggers(struct power_supply *psy)
0038 { return 0; }
0039 static inline void power_supply_remove_triggers(struct power_supply *psy) {}
0040 
0041 #endif /* CONFIG_LEDS_TRIGGERS */