mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
Rhode 5GP: add wt6670 get firmware num node
charging qc3+ wt6670 add wt6670 get firmware num node for factory test Change-Id: I8289e6a139384e382833d28744c520d2ad5453c5 Signed-off-by: huaqin87 <huaqin87@motorola.com> Reviewed-on: https://gerrit.mot.com/2143688 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
63106fe288
commit
8e5cd3b904
2 changed files with 11 additions and 0 deletions
|
|
@ -69,6 +69,7 @@ static const struct wt6670_iio_channels wt6670_iio_psy_channels[] = {
|
|||
wt6670_CHAN_INDEX("wt6670_battery_dp_dm", PSY_IIO_BATTERY_DP_DM)
|
||||
wt6670_CHAN_INDEX("wt6670_start_detection", PSY_IIO_START_DETECTION)
|
||||
wt6670_CHAN_INDEX("wt6670_detection_ready", PSY_IIO_DETECTION_READY)
|
||||
wt6670_CHAN_INDEX("wt6670_firmware_num", PSY_IIO_QC3P_FIRMWARE_NUM)
|
||||
};
|
||||
|
||||
int wt6670f_isp_flow(struct wt6670f *chip);
|
||||
|
|
|
|||
|
|
@ -497,6 +497,16 @@ static int wt6670_iio_read_raw(struct iio_dev *indio_dev,
|
|||
pr_info("wt6670 get wt6670f_is_charger_ready status:%d\n", result);
|
||||
*val1 = result;
|
||||
break;
|
||||
case PSY_IIO_QC3P_FIRMWARE_NUM:
|
||||
gpio_direction_output(_wt->intb_pin,0);
|
||||
usleep_range(5000,6000);
|
||||
gpio_direction_output(_wt->intb_pin,1);
|
||||
usleep_range(5000,6000);
|
||||
result = wt6670f_get_firmware_version();
|
||||
pr_info("wt6670 get wt6670f_firmware_num:%d\n", result);
|
||||
*val1 = result;
|
||||
gpio_direction_input(wt6670f_int_pin);
|
||||
break;
|
||||
default:
|
||||
pr_err("Unsupported wt6670 IIO chan %d\n", chan->channel);
|
||||
rc = -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue