Lines Matching +full:spi +full:- +full:compatible
1 // SPDX-License-Identifier: GPL-2.0-only
3 * ST Microelectronics MFD: stmpe's spi client specific driver
10 #include <linux/spi/spi.h>
22 struct spi_device *spi = stmpe->client; in spi_reg_read() local
23 int status = spi_w8r16(spi, reg | READ_CMD); in spi_reg_read()
30 struct spi_device *spi = stmpe->client; in spi_reg_write() local
33 return spi_write(spi, (const u8 *)&cmd, 2); in spi_reg_write()
55 for (i = length; i > 0; i--, reg++) { in spi_block_write()
56 ret = spi_reg_write(stmpe, reg, *(values + i - 1)); in spi_block_write()
66 struct spi_device *spi = stmpe->client; in spi_init() local
68 spi->bits_per_word = 8; in spi_init()
71 if (stmpe->variant->id_val == 0x0811) in spi_init()
72 spi_reg_write(stmpe, STMPE811_REG_SPI_CFG, spi->mode); in spi_init()
74 if (spi_setup(spi) < 0) in spi_init()
75 dev_dbg(&spi->dev, "spi_setup failed\n"); in spi_init()
87 stmpe_spi_probe(struct spi_device *spi) in stmpe_spi_probe() argument
89 const struct spi_device_id *id = spi_get_device_id(spi); in stmpe_spi_probe()
91 /* don't exceed max specified rate - 1MHz - Limitation of STMPE */ in stmpe_spi_probe()
92 if (spi->max_speed_hz > 1000000) { in stmpe_spi_probe()
93 dev_dbg(&spi->dev, "f(sample) %d KHz?\n", in stmpe_spi_probe()
94 (spi->max_speed_hz/1000)); in stmpe_spi_probe()
95 return -EINVAL; in stmpe_spi_probe()
98 spi_ci.irq = spi->irq; in stmpe_spi_probe()
99 spi_ci.client = spi; in stmpe_spi_probe()
100 spi_ci.dev = &spi->dev; in stmpe_spi_probe()
102 return stmpe_probe(&spi_ci, id->driver_data); in stmpe_spi_probe()
105 static void stmpe_spi_remove(struct spi_device *spi) in stmpe_spi_remove() argument
107 struct stmpe *stmpe = spi_get_drvdata(spi); in stmpe_spi_remove()
113 { .compatible = "st,stmpe610", },
114 { .compatible = "st,stmpe801", },
115 { .compatible = "st,stmpe811", },
116 { .compatible = "st,stmpe1601", },
117 { .compatible = "st,stmpe2401", },
118 { .compatible = "st,stmpe2403", },
132 MODULE_DEVICE_TABLE(spi, stmpe_id);
136 .name = "stmpe-spi",
157 MODULE_DESCRIPTION("STMPE MFD SPI Interface Driver");