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 @@ -362,6 +362,7 @@ struct inv_icm42600_state {
362
362
typedef int (* inv_icm42600_bus_setup )(struct inv_icm42600_state * );
363
363
364
364
extern const struct regmap_config inv_icm42600_regmap_config ;
365
+ extern const struct regmap_config inv_icm42600_spi_regmap_config ;
365
366
extern const struct dev_pm_ops inv_icm42600_pm_ops ;
366
367
367
368
const struct iio_mount_matrix *
Original file line number Diff line number Diff line change @@ -44,6 +44,17 @@ const struct regmap_config inv_icm42600_regmap_config = {
44
44
};
45
45
EXPORT_SYMBOL_NS_GPL (inv_icm42600_regmap_config , IIO_ICM42600 );
46
46
47
+ /* define specific regmap for SPI not supporting burst write */
48
+ const struct regmap_config inv_icm42600_spi_regmap_config = {
49
+ .reg_bits = 8 ,
50
+ .val_bits = 8 ,
51
+ .max_register = 0x4FFF ,
52
+ .ranges = inv_icm42600_regmap_ranges ,
53
+ .num_ranges = ARRAY_SIZE (inv_icm42600_regmap_ranges ),
54
+ .use_single_write = true,
55
+ };
56
+ EXPORT_SYMBOL_NS_GPL (inv_icm42600_spi_regmap_config , IIO_ICM42600 );
57
+
47
58
struct inv_icm42600_hw {
48
59
uint8_t whoami ;
49
60
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