File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
drivers/iio/imu/inv_icm42600 Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -403,6 +403,7 @@ struct inv_icm42600_sensor_state {
403
403
typedef int (* inv_icm42600_bus_setup )(struct inv_icm42600_state * );
404
404
405
405
extern const struct regmap_config inv_icm42600_regmap_config ;
406
+ extern const struct regmap_config inv_icm42600_spi_regmap_config ;
406
407
extern const struct dev_pm_ops inv_icm42600_pm_ops ;
407
408
408
409
const struct iio_mount_matrix *
Original file line number Diff line number Diff line change @@ -87,6 +87,21 @@ const struct regmap_config inv_icm42600_regmap_config = {
87
87
};
88
88
EXPORT_SYMBOL_NS_GPL (inv_icm42600_regmap_config , "IIO_ICM42600" );
89
89
90
+ /* define specific regmap for SPI not supporting burst write */
91
+ const struct regmap_config inv_icm42600_spi_regmap_config = {
92
+ .name = "inv_icm42600" ,
93
+ .reg_bits = 8 ,
94
+ .val_bits = 8 ,
95
+ .max_register = 0x4FFF ,
96
+ .ranges = inv_icm42600_regmap_ranges ,
97
+ .num_ranges = ARRAY_SIZE (inv_icm42600_regmap_ranges ),
98
+ .volatile_table = inv_icm42600_regmap_volatile_accesses ,
99
+ .rd_noinc_table = inv_icm42600_regmap_rd_noinc_accesses ,
100
+ .cache_type = REGCACHE_RBTREE ,
101
+ .use_single_write = true,
102
+ };
103
+ EXPORT_SYMBOL_NS_GPL (inv_icm42600_spi_regmap_config , "IIO_ICM42600" );
104
+
90
105
struct inv_icm42600_hw {
91
106
uint8_t whoami ;
92
107
const char * name ;
Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ static int inv_icm42600_probe(struct spi_device *spi)
59
59
return - EINVAL ;
60
60
chip = (uintptr_t )match ;
61
61
62
- regmap = devm_regmap_init_spi (spi , & inv_icm42600_regmap_config );
62
+ /* use SPI specific regmap */
63
+ regmap = devm_regmap_init_spi (spi , & inv_icm42600_spi_regmap_config );
63
64
if (IS_ERR (regmap ))
64
65
return PTR_ERR (regmap );
65
66
You can’t perform that action at this time.
0 commit comments