Lines Matching defs:st
16 static int ad5686_spi_write(struct ad5686_state *st,
19 struct spi_device *spi = to_spi_device(st->dev);
22 switch (st->chip_info->regmap_type) {
24 st->data[0].d16 = cpu_to_be16(AD5310_CMD(cmd) |
26 buf = &st->data[0].d8[0];
30 st->data[0].d32 = cpu_to_be32(AD5686_CMD(cmd) |
32 buf = &st->data[0].d8[1];
36 st->data[0].d32 = cpu_to_be32(AD5686_CMD(cmd) |
39 buf = &st->data[0].d8[1];
49 static int ad5686_spi_read(struct ad5686_state *st, u8 addr)
53 .tx_buf = &st->data[0].d8[1],
57 .tx_buf = &st->data[1].d8[1],
58 .rx_buf = &st->data[2].d8[1],
62 struct spi_device *spi = to_spi_device(st->dev);
66 switch (st->chip_info->regmap_type) {
79 st->data[0].d32 = cpu_to_be32(AD5686_CMD(cmd) |
81 st->data[1].d32 = cpu_to_be32(AD5686_CMD(AD5686_CMD_NOOP));
87 return be32_to_cpu(st->data[2].d32);