Lines Matching refs:tps

289 	struct tps6594 *tps = irq_drv_data;  in tps6594_handle_post_irq()  local
302 if (tps->use_crc) in tps6594_handle_post_irq()
303 ret = regmap_write_bits(tps->regmap, TPS6594_REG_INT_COMM_ERR, in tps6594_handle_post_irq()
329 static int tps6594_check_crc_mode(struct tps6594 *tps, bool primary_pmic) in tps6594_check_crc_mode() argument
337 tps->use_crc = true; in tps6594_check_crc_mode()
338 ret = regmap_test_bits(tps->regmap, TPS6594_REG_SERIAL_IF_CONFIG, in tps6594_check_crc_mode()
343 dev_info(tps->dev, "CRC feature enabled on %s PMIC", in tps6594_check_crc_mode()
351 static int tps6594_set_crc_feature(struct tps6594 *tps) in tps6594_set_crc_feature() argument
355 ret = tps6594_check_crc_mode(tps, true); in tps6594_set_crc_feature()
361 tps->use_crc = false; in tps6594_set_crc_feature()
362 ret = regmap_write_bits(tps->regmap, TPS6594_REG_FSM_I2C_TRIGGERS, in tps6594_set_crc_feature()
374 ret = tps6594_check_crc_mode(tps, true); in tps6594_set_crc_feature()
380 static int tps6594_enable_crc(struct tps6594 *tps) in tps6594_enable_crc() argument
382 struct device *dev = tps->dev; in tps6594_enable_crc()
397 ret = tps6594_set_crc_feature(tps); in tps6594_enable_crc()
409 ret = tps6594_check_crc_mode(tps, false); in tps6594_enable_crc()
415 int tps6594_device_init(struct tps6594 *tps, bool enable_crc) in tps6594_device_init() argument
417 struct device *dev = tps->dev; in tps6594_device_init()
421 ret = tps6594_enable_crc(tps); in tps6594_device_init()
427 ret = regmap_set_bits(tps->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS, in tps6594_device_init()
432 tps6594_irq_chip.irq_drv_data = tps; in tps6594_device_init()
434 dev->driver->name, tps->chip_id, tps->reg); in tps6594_device_init()
436 ret = devm_regmap_add_irq_chip(dev, tps->regmap, tps->irq, IRQF_SHARED | IRQF_ONESHOT, in tps6594_device_init()
437 0, &tps6594_irq_chip, &tps->irq_data); in tps6594_device_init()
443 regmap_irq_get_domain(tps->irq_data)); in tps6594_device_init()
448 if (tps->chip_id != LP8764) { in tps6594_device_init()
451 regmap_irq_get_domain(tps->irq_data)); in tps6594_device_init()