mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-08-26 03:58:27 +00:00
Add snapshot of the QPNP-SMB5 driver, along with its dependencies, as of
msm-4.14 'commit 7e16ff6cdde5 ("defconfig: qcs405: enable WLAN configs
for 32-bit QCS405")'.
Get rid of the use of module parameters in qpnp-smb5.c and battery.c as
they do not scale well for multiple device instances of the same driver.
Instead:
- move debug_mask to debugfs (both files), and
- associate pd_disabled and weak_chg_icl_ua with the device instead,
using sysfs (only qpnp-smb5.c)
The QPNP-SMB5 driver controls battery charging and other related
functionalities of the PM8150B chip and chips similar to PM8150B.
Change-Id: Ic356e58aaadf810aa279ade59ae11bdc743788d5
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
44 lines
1.4 KiB
C
44 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __PMIC_VOTER_H
|
|
#define __PMIC_VOTER_H
|
|
|
|
#include <linux/mutex.h>
|
|
|
|
struct votable;
|
|
|
|
enum votable_type {
|
|
VOTE_MIN,
|
|
VOTE_MAX,
|
|
VOTE_SET_ANY,
|
|
NUM_VOTABLE_TYPES,
|
|
};
|
|
|
|
bool is_client_vote_enabled(struct votable *votable, const char *client_str);
|
|
bool is_client_vote_enabled_locked(struct votable *votable,
|
|
const char *client_str);
|
|
int get_client_vote(struct votable *votable, const char *client_str);
|
|
int get_client_vote_locked(struct votable *votable, const char *client_str);
|
|
int get_effective_result(struct votable *votable);
|
|
int get_effective_result_locked(struct votable *votable);
|
|
const char *get_effective_client(struct votable *votable);
|
|
const char *get_effective_client_locked(struct votable *votable);
|
|
int vote(struct votable *votable, const char *client_str, bool state, int val);
|
|
int rerun_election(struct votable *votable);
|
|
struct votable *find_votable(const char *name);
|
|
struct votable *create_votable(const char *name,
|
|
int votable_type,
|
|
int (*callback)(struct votable *votable,
|
|
void *data,
|
|
int effective_result,
|
|
const char *effective_client),
|
|
void *data);
|
|
void destroy_votable(struct votable *votable);
|
|
void lock_votable(struct votable *votable);
|
|
void unlock_votable(struct votable *votable);
|
|
|
|
#endif /* __PMIC_VOTER_H */
|