Source
50
50
51
51
static const struct regmap_config mc13xxx_regmap_spi_config = {
52
52
.reg_bits = 7,
53
53
.pad_bits = 1,
54
54
.val_bits = 24,
55
55
.write_flag_mask = 0x80,
56
56
57
57
.max_register = MC13XXX_NUMREGS,
58
58
59
59
.cache_type = REGCACHE_NONE,
60
-
.use_single_rw = 1,
60
+
.use_single_read = true,
61
+
.use_single_write = true,
61
62
};
62
63
63
64
static int mc13xxx_spi_read(void *context, const void *reg, size_t reg_size,
64
65
void *val, size_t val_size)
65
66
{
66
67
unsigned char w[4] = { *((unsigned char *) reg), 0, 0, 0};
67
68
unsigned char r[4];
68
69
unsigned char *p = val;
69
70
struct device *dev = context;
70
71
struct spi_device *spi = to_spi_device(dev);