Lines Matching refs:tps
29 struct tps6594 *tps = spi_get_drvdata(spi); in tps6594_spi_reg_read() local
37 if (tps->use_crc) in tps6594_spi_reg_read()
44 if (tps->use_crc && buf[3] != crc8(tps6594_spi_crc_table, buf, 3, CRC8_INIT_VALUE)) in tps6594_spi_reg_read()
55 struct tps6594 *tps = spi_get_drvdata(spi); in tps6594_spi_reg_write() local
63 if (tps->use_crc) in tps6594_spi_reg_write()
91 struct tps6594 *tps; in tps6594_spi_probe() local
94 tps = devm_kzalloc(dev, sizeof(*tps), GFP_KERNEL); in tps6594_spi_probe()
95 if (!tps) in tps6594_spi_probe()
98 spi_set_drvdata(spi, tps); in tps6594_spi_probe()
100 tps->dev = dev; in tps6594_spi_probe()
101 tps->reg = spi->chip_select; in tps6594_spi_probe()
102 tps->irq = spi->irq; in tps6594_spi_probe()
104 tps->regmap = devm_regmap_init(dev, NULL, spi, &tps6594_spi_regmap_config); in tps6594_spi_probe()
105 if (IS_ERR(tps->regmap)) in tps6594_spi_probe()
106 return dev_err_probe(dev, PTR_ERR(tps->regmap), "Failed to init regmap\n"); in tps6594_spi_probe()
111 tps->chip_id = (unsigned long)match->data; in tps6594_spi_probe()
115 return tps6594_device_init(tps, enable_crc); in tps6594_spi_probe()