From 0d96780b08a444820bd83e633541ddded87b89ca Mon Sep 17 00:00:00 2001 From: Ryan Lattrel Date: Thu, 24 Oct 2019 14:03:00 -0500 Subject: [PATCH] p938x_charger: return chip values with 0x Return chip values with an 0x prefix so that the bash init script can compare hex values with > and <. Change-Id: If3c1ef37acf550433d114718a66b248d7b1e5e32 Signed-off-by: Ryan Lattrel Reviewed-on: https://gerrit.mot.com/1442938 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Cesar Augusto Marcelino dos Santos Reviewed-by: Ling Jin Submit-Approved: Jira Key --- drivers/power/p938x_charger/p938x_charger.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/power/p938x_charger/p938x_charger.c b/drivers/power/p938x_charger/p938x_charger.c index e7ebfb300c9f..392c138b66ce 100644 --- a/drivers/power/p938x_charger/p938x_charger.c +++ b/drivers/power/p938x_charger/p938x_charger.c @@ -1169,14 +1169,14 @@ static ssize_t tx_mode_show(struct device *dev, static ssize_t chip_id_max_show(struct device *dev, struct device_attribute *attr, char *buf) { - return scnprintf(buf, WLS_SHOW_MAX_SIZE, "%04x\n", + return scnprintf(buf, WLS_SHOW_MAX_SIZE, "0x%04x\n", MAX_CHIP_VERS); } static ssize_t chip_id_min_show(struct device *dev, struct device_attribute *attr, char *buf) { - return scnprintf(buf, WLS_SHOW_MAX_SIZE, "%04x\n", + return scnprintf(buf, WLS_SHOW_MAX_SIZE, "0x%04x\n", MIN_CHIP_VERS); } @@ -1205,7 +1205,7 @@ static ssize_t chip_id_show(struct device *dev, if(turn_off) p938x_set_boost(chip, 0); - return scnprintf(buf, WLS_SHOW_MAX_SIZE, "%02x%02x\n", + return scnprintf(buf, WLS_SHOW_MAX_SIZE, "0x%02x%02x\n", data[1], data[0]); }