Lines Matching refs:mcp23s08
2 * mcp23s08.c - SPI gpio expander driver
11 #include <linux/spi/mcp23s08.h>
38 struct mcp23s08 {
51 /* A given spi_device can represent up to four mcp23s08 chips
58 struct mcp23s08 *mcp[4];
59 struct mcp23s08 chip[];
62 static int mcp23s08_read(struct mcp23s08 *mcp, unsigned reg)
73 static int mcp23s08_write(struct mcp23s08 *mcp, unsigned reg, u8 val)
84 mcp23s08_read_regs(struct mcp23s08 *mcp, unsigned reg, u8 *vals, unsigned n)
99 struct mcp23s08 *mcp = container_of(chip, struct mcp23s08, chip);
111 struct mcp23s08 *mcp = container_of(chip, struct mcp23s08, chip);
128 static int __mcp23s08_set(struct mcp23s08 *mcp, unsigned mask, int value)
142 struct mcp23s08 *mcp = container_of(chip, struct mcp23s08, chip);
153 struct mcp23s08 *mcp = container_of(chip, struct mcp23s08, chip);
179 struct mcp23s08 *mcp;
184 mcp = container_of(chip, struct mcp23s08, chip);
225 struct mcp23s08 *mcp = data->mcp[addr];
234 mcp->chip.label = "mcp23s08",
325 data = kzalloc(sizeof *data + chips * sizeof(struct mcp23s08),
412 .name = "mcp23s08",
435 MODULE_ALIAS("spi:mcp23s08");