Lines Matching +full:tps6593 +full:- +full:q1
1 // SPDX-License-Identifier: GPL-2.0
3 * SPI access driver for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs
5 * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
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()
45 return -EIO; in tps6594_spi_reg_read()
63 if (tps->use_crc) in tps6594_spi_reg_write()
81 { .compatible = "ti,tps6594-q1", .data = (void *)TPS6594, },
82 { .compatible = "ti,tps6593-q1", .data = (void *)TPS6593, },
83 { .compatible = "ti,lp8764-q1", .data = (void *)LP8764, },
84 { .compatible = "ti,tps65224-q1", .data = (void *)TPS65224, },
91 struct device *dev = &spi->dev; in tps6594_spi_probe()
97 return -ENOMEM; in tps6594_spi_probe()
101 tps->dev = dev; in tps6594_spi_probe()
102 tps->reg = spi_get_chipselect(spi, 0); in tps6594_spi_probe()
103 tps->irq = spi->irq; in tps6594_spi_probe()
107 return dev_err_probe(dev, -EINVAL, "Failed to find matching chip ID\n"); in tps6594_spi_probe()
108 tps->chip_id = (unsigned long)match->data; in tps6594_spi_probe()
110 if (tps->chip_id == TPS65224) in tps6594_spi_probe()
113 tps->regmap = devm_regmap_init(dev, NULL, spi, &tps6594_spi_regmap_config); in tps6594_spi_probe()
114 if (IS_ERR(tps->regmap)) in tps6594_spi_probe()
115 return dev_err_probe(dev, PTR_ERR(tps->regmap), "Failed to init regmap\n"); in tps6594_spi_probe()