1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Functions private to power supply class
5 * Copyright © 2007 Anton Vorontsov <cbou@mail.ru>
6 * Copyright © 2004 Szabolcs Gyurko
7 * Copyright © 2003 Ian Molton <spyro@f2s.com>
9 * Modified: 2004, Oct Szabolcs Gyurko
16 extern int power_supply_property_is_writeable(struct power_supply
*psy
,
17 enum power_supply_property psp
);
21 extern void __init
power_supply_init_attrs(void);
22 extern int power_supply_uevent(const struct device
*dev
, struct kobj_uevent_env
*env
);
23 extern const struct attribute_group
*power_supply_attr_groups
[];
27 static inline void power_supply_init_attrs(void) {}
28 #define power_supply_attr_groups NULL
29 #define power_supply_uevent NULL
31 #endif /* CONFIG_SYSFS */
33 #ifdef CONFIG_LEDS_TRIGGERS
35 extern void power_supply_update_leds(struct power_supply
*psy
);
36 extern int power_supply_create_triggers(struct power_supply
*psy
);
37 extern void power_supply_remove_triggers(struct power_supply
*psy
);
41 static inline void power_supply_update_leds(struct power_supply
*psy
) {}
42 static inline int power_supply_create_triggers(struct power_supply
*psy
)
44 static inline void power_supply_remove_triggers(struct power_supply
*psy
) {}
46 #endif /* CONFIG_LEDS_TRIGGERS */
48 #ifdef CONFIG_POWER_SUPPLY_HWMON
50 int power_supply_add_hwmon_sysfs(struct power_supply
*psy
);
51 void power_supply_remove_hwmon_sysfs(struct power_supply
*psy
);
55 static inline int power_supply_add_hwmon_sysfs(struct power_supply
*psy
)
61 void power_supply_remove_hwmon_sysfs(struct power_supply
*psy
) {}
63 #endif /* CONFIG_POWER_SUPPLY_HWMON */