Lines Matching full:pfsm

3  * PFSM (Pre-configurable Finite State Machine) driver for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs
53 struct tps6594_pfsm *pfsm = TPS6594_FILE_TO_PFSM(f); in tps6594_pfsm_read() local
67 ret = regmap_read(pfsm->regmap, pos + i, &val); in tps6594_pfsm_read()
83 struct tps6594_pfsm *pfsm = TPS6594_FILE_TO_PFSM(f); in tps6594_pfsm_write() local
100 ret = regmap_write(pfsm->regmap, pos + i, val); in tps6594_pfsm_write()
135 struct tps6594_pfsm *pfsm = TPS6594_FILE_TO_PFSM(f); in tps6594_pfsm_ioctl() local
144 if (pfsm->chip_id != TPS65224) { in tps6594_pfsm_ioctl()
145 ret = regmap_clear_bits(pfsm->regmap, TPS6594_REG_RTC_CTRL_2, in tps6594_pfsm_ioctl()
153 ret = regmap_write_bits(pfsm->regmap, TPS6594_REG_FSM_I2C_TRIGGERS, in tps6594_pfsm_ioctl()
158 if (pfsm->chip_id == TPS65224) in tps6594_pfsm_ioctl()
162 ret = regmap_set_bits(pfsm->regmap, TPS6594_REG_RTC_CTRL_2, in tps6594_pfsm_ioctl()
168 ret = regmap_write_bits(pfsm->regmap, TPS6594_REG_FSM_I2C_TRIGGERS, in tps6594_pfsm_ioctl()
173 ret = regmap_write_bits(pfsm->regmap, TPS6594_REG_FSM_I2C_TRIGGERS, in tps6594_pfsm_ioctl()
178 ret = regmap_set_bits(pfsm->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS, in tps6594_pfsm_ioctl()
183 if (pfsm->chip_id == TPS65224) in tps6594_pfsm_ioctl()
190 ret = tps6594_pfsm_configure_ret_trig(pfsm->regmap, state_opt.gpio_retention, in tps6594_pfsm_ioctl()
196 ret = regmap_clear_bits(pfsm->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS, in tps6594_pfsm_ioctl()
201 ret = regmap_set_bits(pfsm->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS, in tps6594_pfsm_ioctl()
209 if (pfsm->chip_id == TPS65224) { in tps6594_pfsm_ioctl()
218 ret = regmap_write_bits(pfsm->regmap, regmap_reg, in tps6594_pfsm_ioctl()
221 ret = regmap_write_bits(pfsm->regmap, regmap_reg, in tps6594_pfsm_ioctl()
227 ret = tps6594_pfsm_configure_ret_trig(pfsm->regmap, state_opt.gpio_retention, in tps6594_pfsm_ioctl()
233 ret = regmap_clear_bits(pfsm->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS, in tps6594_pfsm_ioctl()
234 pfsm->chip_id == TPS65224 ? in tps6594_pfsm_ioctl()
268 struct tps6594_pfsm *pfsm; in tps6594_pfsm_probe() local
275 pfsm = devm_kzalloc(dev, sizeof(struct tps6594_pfsm), GFP_KERNEL); in tps6594_pfsm_probe()
276 if (!pfsm) in tps6594_pfsm_probe()
279 pfsm->regmap = tps->regmap; in tps6594_pfsm_probe()
281 pfsm->miscdev.minor = MISC_DYNAMIC_MINOR; in tps6594_pfsm_probe()
282 pfsm->miscdev.name = devm_kasprintf(dev, GFP_KERNEL, "pfsm-%ld-0x%02x", in tps6594_pfsm_probe()
284 pfsm->miscdev.fops = &tps6594_pfsm_fops; in tps6594_pfsm_probe()
285 pfsm->miscdev.parent = dev->parent; in tps6594_pfsm_probe()
286 pfsm->chip_id = tps->chip_id; in tps6594_pfsm_probe()
300 platform_set_drvdata(pdev, pfsm); in tps6594_pfsm_probe()
302 return misc_register(&pfsm->miscdev); in tps6594_pfsm_probe()
307 struct tps6594_pfsm *pfsm = platform_get_drvdata(pdev); in tps6594_pfsm_remove() local
309 misc_deregister(&pfsm->miscdev); in tps6594_pfsm_remove()
314 .name = "tps6594-pfsm",
322 MODULE_ALIAS("platform:tps6594-pfsm");