@@ -90,25 +90,56 @@ static int tcan4x5x_regmap_read(void *context,
90
90
return 0 ;
91
91
}
92
92
93
- static const struct regmap_range tcan4x5x_reg_table_yes_range [] = {
93
+ static const struct regmap_range tcan4x5x_reg_table_wr_range [] = {
94
+ /* Device ID and SPI Registers */
95
+ regmap_reg_range (0x000c , 0x0010 ),
96
+ /* Device configuration registers and Interrupt Flags*/
97
+ regmap_reg_range (0x0800 , 0x080c ),
98
+ regmap_reg_range (0x0814 , 0x0814 ),
99
+ regmap_reg_range (0x0820 , 0x0820 ),
100
+ regmap_reg_range (0x0830 , 0x0830 ),
101
+ /* M_CAN */
102
+ regmap_reg_range (0x100c , 0x102c ),
103
+ regmap_reg_range (0x1048 , 0x1048 ),
104
+ regmap_reg_range (0x1050 , 0x105c ),
105
+ regmap_reg_range (0x1080 , 0x1088 ),
106
+ regmap_reg_range (0x1090 , 0x1090 ),
107
+ regmap_reg_range (0x1098 , 0x10a0 ),
108
+ regmap_reg_range (0x10a8 , 0x10b0 ),
109
+ regmap_reg_range (0x10b8 , 0x10c0 ),
110
+ regmap_reg_range (0x10c8 , 0x10c8 ),
111
+ regmap_reg_range (0x10d0 , 0x10d4 ),
112
+ regmap_reg_range (0x10e0 , 0x10e4 ),
113
+ regmap_reg_range (0x10f0 , 0x10f0 ),
114
+ regmap_reg_range (0x10f8 , 0x10f8 ),
115
+ /* MRAM */
116
+ regmap_reg_range (0x8000 , 0x87fc ),
117
+ };
118
+
119
+ static const struct regmap_range tcan4x5x_reg_table_rd_range [] = {
94
120
regmap_reg_range (0x0000 , 0x0010 ), /* Device ID and SPI Registers */
95
121
regmap_reg_range (0x0800 , 0x0830 ), /* Device configuration registers and Interrupt Flags*/
96
122
regmap_reg_range (0x1000 , 0x10fc ), /* M_CAN */
97
123
regmap_reg_range (0x8000 , 0x87fc ), /* MRAM */
98
124
};
99
125
100
- static const struct regmap_access_table tcan4x5x_reg_table = {
101
- .yes_ranges = tcan4x5x_reg_table_yes_range ,
102
- .n_yes_ranges = ARRAY_SIZE (tcan4x5x_reg_table_yes_range ),
126
+ static const struct regmap_access_table tcan4x5x_reg_table_wr = {
127
+ .yes_ranges = tcan4x5x_reg_table_wr_range ,
128
+ .n_yes_ranges = ARRAY_SIZE (tcan4x5x_reg_table_wr_range ),
129
+ };
130
+
131
+ static const struct regmap_access_table tcan4x5x_reg_table_rd = {
132
+ .yes_ranges = tcan4x5x_reg_table_rd_range ,
133
+ .n_yes_ranges = ARRAY_SIZE (tcan4x5x_reg_table_rd_range ),
103
134
};
104
135
105
136
static const struct regmap_config tcan4x5x_regmap = {
106
137
.reg_bits = 24 ,
107
138
.reg_stride = 4 ,
108
139
.pad_bits = 8 ,
109
140
.val_bits = 32 ,
110
- .wr_table = & tcan4x5x_reg_table ,
111
- .rd_table = & tcan4x5x_reg_table ,
141
+ .wr_table = & tcan4x5x_reg_table_wr ,
142
+ .rd_table = & tcan4x5x_reg_table_rd ,
112
143
.max_register = TCAN4X5X_MAX_REGISTER ,
113
144
.cache_type = REGCACHE_NONE ,
114
145
.read_flag_mask = (__force unsigned long )
0 commit comments