File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
drivers/iio/imu/inv_icm42600 Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,7 @@ struct inv_icm42600_state {
360
360
typedef int (* inv_icm42600_bus_setup )(struct inv_icm42600_state * );
361
361
362
362
extern const struct regmap_config inv_icm42600_regmap_config ;
363
+ extern const struct regmap_config inv_icm42600_spi_regmap_config ;
363
364
extern const struct dev_pm_ops inv_icm42600_pm_ops ;
364
365
365
366
const struct iio_mount_matrix *
Original file line number Diff line number Diff line change @@ -43,6 +43,17 @@ const struct regmap_config inv_icm42600_regmap_config = {
43
43
};
44
44
EXPORT_SYMBOL_GPL (inv_icm42600_regmap_config );
45
45
46
+ /* define specific regmap for SPI not supporting burst write */
47
+ const struct regmap_config inv_icm42600_spi_regmap_config = {
48
+ .reg_bits = 8 ,
49
+ .val_bits = 8 ,
50
+ .max_register = 0x4FFF ,
51
+ .ranges = inv_icm42600_regmap_ranges ,
52
+ .num_ranges = ARRAY_SIZE (inv_icm42600_regmap_ranges ),
53
+ .use_single_write = true,
54
+ };
55
+ EXPORT_SYMBOL_GPL (inv_icm42600_spi_regmap_config );
56
+
46
57
struct inv_icm42600_hw {
47
58
uint8_t whoami ;
48
59
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