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 <ryanl@motorola.com>
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 <cmsantos@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Ryan Lattrel 2019-10-24 14:03:00 -05:00
commit 0d96780b08

View file

@ -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]);
}