bq2597x: bq2597x cp_enable interface does not work

bq2597x cp_enable interface does not work,the interface name is worng;
so change to PSY_IIO_CP_ENABLE

Change-Id: I9851dc7933680f9fcc727c362d16fb7777b1ee31
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2133077
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wutao 2021-12-02 16:29:55 +08:00 • committed by huaqin89
commit cbbded7657

View file

@ -1833,11 +1833,11 @@ static int bq2597x_iio_write_raw(struct iio_dev *indio_dev,
int rc = 0;
switch (chan->channel) {
case PSY_IIO_CHARGING_ENABLED:
case PSY_IIO_CP_ENABLE:
bq2597x_enable_charge(bq, val1);
bq2597x_check_charge_enabled(bq, &bq->charge_enabled);
pr_info("PSY_IIO_CHARGING_ENABLED: %s\n",
pr_info("PSY_IIO_CP_ENABLE: %s\n",
val1 ? "enable" : "disable");
break;