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 {
403403typedef int (* inv_icm42600_bus_setup )(struct inv_icm42600_state * );
404404
405405extern const struct regmap_config inv_icm42600_regmap_config ;
406+ extern const struct regmap_config inv_icm42600_spi_regmap_config ;
406407extern const struct dev_pm_ops inv_icm42600_pm_ops ;
407408
408409const 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 = {
8787};
8888EXPORT_SYMBOL_NS_GPL (inv_icm42600_regmap_config , "IIO_ICM42600" );
8989
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+
90105struct inv_icm42600_hw {
91106 uint8_t whoami ;
92107 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)
5959 return - EINVAL ;
6060 chip = (uintptr_t )match ;
6161
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 );
6364 if (IS_ERR (regmap ))
6465 return PTR_ERR (regmap );
6566
You can’t perform that action at this time.
0 commit comments