Lines Matching full:pfsm

3  * PFSM (Pre-configurable Finite State Machine) driver for TI TPS6594/TPS6593/LP8764 PMICs
51 struct tps6594_pfsm *pfsm = TPS6594_FILE_TO_PFSM(f); in tps6594_pfsm_read() local
65 ret = regmap_read(pfsm->regmap, pos + i, &val); in tps6594_pfsm_read()
81 struct tps6594_pfsm *pfsm = TPS6594_FILE_TO_PFSM(f); in tps6594_pfsm_write() local
98 ret = regmap_write(pfsm->regmap, pos + i, val); in tps6594_pfsm_write()
133 struct tps6594_pfsm *pfsm = TPS6594_FILE_TO_PFSM(f); in tps6594_pfsm_ioctl() local
141 ret = regmap_clear_bits(pfsm->regmap, TPS6594_REG_RTC_CTRL_2, in tps6594_pfsm_ioctl()
147 ret = regmap_write_bits(pfsm->regmap, TPS6594_REG_FSM_I2C_TRIGGERS, in tps6594_pfsm_ioctl()
152 ret = regmap_set_bits(pfsm->regmap, TPS6594_REG_RTC_CTRL_2, in tps6594_pfsm_ioctl()
158 ret = regmap_write_bits(pfsm->regmap, TPS6594_REG_FSM_I2C_TRIGGERS, in tps6594_pfsm_ioctl()
163 ret = regmap_write_bits(pfsm->regmap, TPS6594_REG_FSM_I2C_TRIGGERS, in tps6594_pfsm_ioctl()
168 ret = regmap_set_bits(pfsm->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS, in tps6594_pfsm_ioctl()
176 ret = tps6594_pfsm_configure_ret_trig(pfsm->regmap, state_opt.gpio_retention, in tps6594_pfsm_ioctl()
182 ret = regmap_clear_bits(pfsm->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS, in tps6594_pfsm_ioctl()
187 ret = regmap_set_bits(pfsm->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS, in tps6594_pfsm_ioctl()
196 ret = regmap_write_bits(pfsm->regmap, TPS6594_REG_RTC_CTRL_2, in tps6594_pfsm_ioctl()
200 ret = regmap_write_bits(pfsm->regmap, TPS6594_REG_RTC_CTRL_2, in tps6594_pfsm_ioctl()
207 ret = tps6594_pfsm_configure_ret_trig(pfsm->regmap, state_opt.gpio_retention, in tps6594_pfsm_ioctl()
213 ret = regmap_clear_bits(pfsm->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS, in tps6594_pfsm_ioctl()
247 struct tps6594_pfsm *pfsm; in tps6594_pfsm_probe() local
254 pfsm = devm_kzalloc(dev, sizeof(struct tps6594_pfsm), GFP_KERNEL); in tps6594_pfsm_probe()
255 if (!pfsm) in tps6594_pfsm_probe()
258 pfsm->regmap = tps->regmap; in tps6594_pfsm_probe()
260 pfsm->miscdev.minor = MISC_DYNAMIC_MINOR; in tps6594_pfsm_probe()
261 pfsm->miscdev.name = devm_kasprintf(dev, GFP_KERNEL, "pfsm-%ld-0x%02x", in tps6594_pfsm_probe()
263 pfsm->miscdev.fops = &tps6594_pfsm_fops; in tps6594_pfsm_probe()
264 pfsm->miscdev.parent = dev->parent; in tps6594_pfsm_probe()
278 platform_set_drvdata(pdev, pfsm); in tps6594_pfsm_probe()
280 return misc_register(&pfsm->miscdev); in tps6594_pfsm_probe()
285 struct tps6594_pfsm *pfsm = platform_get_drvdata(pdev); in tps6594_pfsm_remove() local
287 misc_deregister(&pfsm->miscdev); in tps6594_pfsm_remove()
292 .name = "tps6594-pfsm",
300 MODULE_ALIAS("platform:tps6594-pfsm");