高通pmic voter

Posted 5念since

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了高通pmic voter相关的知识,希望对你有一定的参考价值。

voter

  • create_votable()
    Prototype
    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);
    Parameters

in name Name of the votable
in votable_type Votable type. Possible values:
■ VOTE_MIN
■ VOTE_MAX
■ VOTE_SET_ANY
in callback
Reference to executable code in which the callback is called in one of
the following conditions:
■ Change in election results
■ Voting takes place for the first time
in data
Private data to be passed
Returns
Votable object.

  • destroy_votable()

vote()

pmic voter debugfs

xxxx:/sys/kernel/debug/pmic-votable # cd FCC
xxxx:/sys/kernel/debug/pmic-votable/FCC # ls
force_active  force_val  status
xxxx:/sys/kernel/debug/pmic-votable/FCC # cat status                                                                   
FCC: HW_LIMIT_VOTER:			en=0 v=-22
FCC: BATT_PROFILE_VOTER:			en=1 v=300000
FCC: FCC_STEPPER_VOTER:			en=0 v=0
FCC: QNOVO_VOTER:			en=0 v=0
FCC: THERMAL_DAEMON_VOTER:			en=0 v=0
FCC: JEITA_VOTER:			en=1 v=4500000
FCC: STEP_CHG_VOTER:			en=1 v=4500000
FCC: effective=BATT_PROFILE_VOTER type=Min v=300000

案例

  • 关闭给电池充电,仅提供系统耗电
关闭
rc = vote(chg->chg_disable_votable, DEBUG_BOARD_VOTER, true, 0);
打开
rc = vote(chg->chg_disable_votable, DEBUG_BOARD_VOTER, true, 0);
  • 为什么投票给DEBUG_BOARD_VOTER?

参考文档

80-pf777-77_g_sm8150_linux_android_pmic_charger_software_user_guide.pdf

以上是关于高通pmic voter的主要内容,如果未能解决你的问题,请参考以下文章

高通打开充电debug log

高通LCD的pwm背光驱动

什么是PMU(PMIC)

I.MX6 按键开关机 PMIC 检测

电路pmic芯片设计细节

什么是手机中的 PMIC