power: pmic-voter: Export Interfaces
Export some pmic-voter interfaces for dlkm usage as well as create access functions that are exported for dlkm to manipulate the struct. ported from https://gerrit.mot.com/1200744 Change-Id: I073a4e976f8cd184fa20b262eba9bc962a4a1bb2 Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com> Reviewed-on: https://gerrit.mot.com/1499583 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Wang Wang <wangwang1@lenovo.com> Submit-Approved: Jira Key
This commit is contained in:
1 parent
30cf805663
commit
510a378881
2 files changed
+34
No files matched your search
@@ -340,6 +340,7 @@ int get_effective_result(struct votable *votable)
|
||||
unlock_votable(votable);
|
||||
return value;
|
||||
}
|
||||
EXPORT_SYMBOL(get_effective_result);
|
||||
|
||||
/**
|
||||
* get_effective_client() -
|
||||
@@ -498,6 +499,7 @@ out:
|
||||
unlock_votable(votable);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL(vote);
|
||||
|
||||
/**
|
||||
* vote_override() -
|
||||
@@ -571,6 +573,7 @@ int rerun_election(struct votable *votable)
|
||||
unlock_votable(votable);
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL(rerun_election);
|
||||
|
||||
struct votable *find_votable(const char *name)
|
||||
{
|
||||
@@ -599,6 +602,7 @@ out:
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(find_votable);
|
||||
|
||||
static int force_active_get(void *data, u64 *val)
|
||||
{
|
||||
@@ -645,6 +649,32 @@ out:
|
||||
DEFINE_DEBUGFS_ATTRIBUTE(votable_force_ops, force_active_get, force_active_set,
|
||||
"%lld\n");
|
||||
|
||||
int pmic_vote_force_val_set(struct votable *votable, u32 val) {
|
||||
if(votable) {
|
||||
votable->force_val = val;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
EXPORT_SYMBOL(pmic_vote_force_val_set);
|
||||
|
||||
int pmic_vote_force_active_get(struct votable *votable, u64 *val) {
|
||||
if(votable)
|
||||
return force_active_get(votable, val);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
EXPORT_SYMBOL(pmic_vote_force_active_get);
|
||||
|
||||
int pmic_vote_force_active_set(struct votable *votable, u64 val) {
|
||||
if(votable)
|
||||
return force_active_set(votable, val);
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
EXPORT_SYMBOL(pmic_vote_force_active_set);
|
||||
|
||||
static int show_votable_clients(struct seq_file *m, void *data)
|
||||
{
|
||||
struct votable *votable = m->private;
|
||||
|
||||
@@ -45,4 +45,8 @@ void destroy_votable(struct votable *votable);
|
||||
void lock_votable(struct votable *votable);
|
||||
void unlock_votable(struct votable *votable);
|
||||
|
||||
int pmic_vote_force_val_set(struct votable *votable, u32 val);
|
||||
int pmic_vote_force_active_get(struct votable *votable, u64 *val);
|
||||
int pmic_vote_force_active_set(struct votable *votable, u64 val);
|
||||
|
||||
#endif /* __PMIC_VOTER_H */
|
||||
Reference in new issue
Block a user