Lines Matching refs:p
190 struct pmic *p; in pfuze_init() local
198 p = pmic_get("PFUZE100"); in pfuze_init()
199 ret = pmic_probe(p); in pfuze_init()
203 pmic_reg_read(p, PFUZE100_DEVICEID, ®); in pfuze_init()
207 pmic_reg_read(p, PFUZE100_SW1ABSTBY, ®); in pfuze_init()
210 pmic_reg_write(p, PFUZE100_SW1ABSTBY, reg); in pfuze_init()
213 pmic_reg_read(p, PFUZE100_SW1ABCONF, ®); in pfuze_init()
216 pmic_reg_write(p, PFUZE100_SW1ABCONF, reg); in pfuze_init()
219 pmic_reg_read(p, PFUZE100_SW1CSTBY, ®); in pfuze_init()
222 pmic_reg_write(p, PFUZE100_SW1CSTBY, reg); in pfuze_init()
225 pmic_reg_read(p, PFUZE100_SW1CCONF, ®); in pfuze_init()
228 pmic_reg_write(p, PFUZE100_SW1CCONF, reg); in pfuze_init()
230 return p; in pfuze_init()
233 static int pfuze_mode_init(struct pmic *p, u32 mode) in pfuze_mode_init() argument
239 pmic_reg_read(p, PFUZE100_DEVICEID, &id); in pfuze_mode_init()
253 ret = pmic_reg_write(p, PFUZE100_SW1ABMODE, mode); in pfuze_mode_init()
260 ret = pmic_reg_write(p, offset + i * SWITCH_SIZE, mode); in pfuze_mode_init()
273 struct pmic *p; in power_init_board() local
276 p = pfuze_init(I2C_PMIC); in power_init_board()
277 if (!p) in power_init_board()
280 ret = pfuze_mode_init(p, APS_PFM); in power_init_board()