123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- /* SPDX-License-Identifier: GPL-2.0-only */
- /*
- * Copyright (c) 2020, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
- */
- #ifndef _BATTERY_CHARGER_H
- #define _BATTERY_CHARGER_H
- #include <linux/notifier.h>
- enum battery_charger_prop {
- BATTERY_RESISTANCE,
- BATTERY_CHARGER_PROP_MAX,
- };
- enum bc_hboost_event {
- VMAX_CLAMP,
- };
- #if IS_ENABLED(CONFIG_QTI_BATTERY_CHARGER)
- int qti_battery_charger_get_prop(const char *name,
- enum battery_charger_prop prop_id, int *val);
- int register_hboost_event_notifier(struct notifier_block *nb);
- int unregister_hboost_event_notifier(struct notifier_block *nb);
- #else
- static inline int
- qti_battery_charger_get_prop(const char *name,
- enum battery_charger_prop prop_id, int *val)
- {
- return -EINVAL;
- }
- static inline int register_hboost_event_notifier(struct notifier_block *nb)
- {
- return -EOPNOTSUPP;
- }
- static inline int unregister_hboost_event_notifier(struct notifier_block *nb)
- {
- return -EOPNOTSUPP;
- }
- #endif
- #endif
|