
16 Jan
2015
16 Jan
'15
4:34 p.m.
On Fri, Jan 16, 2015 at 1:25 PM, Peng Fan Peng.Fan@freescale.com wrote:
+int pfuze_mode_init(struct pmic *p, u32 mode) +{
unsigned char offset, i, switch_num;
u32 id, ret;
pmic_reg_read(p, PFUZE100_DEVICEID, &id);
id = id & 0xf;
if (id == 0) {
switch_num = 6;
offset = PFUZE100_SW1CMODE;
} else if (id == 1) {
switch_num = 4;
offset = PFUZE100_SW2MODE;
} else {
printf("Not supported, id=%d\n", id);
return -1;
return -EINVAL would be better.