Skip to content

Commit

Permalink
rtc: ds3232: Add regmap max_register definition.
Browse files Browse the repository at this point in the history
Add the max_register  to the regmap_config definition. This allows
dumping of the device's registers via the regmap debugfs interface.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
  • Loading branch information
Phil Reid authored and Alexandre Belloni committed Feb 21, 2017
1 parent ca4b0a6 commit 082edf0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/rtc/rtc-ds3232.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ static int ds3232_i2c_probe(struct i2c_client *client,
static const struct regmap_config config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0x13,
};

regmap = devm_regmap_init_i2c(client, &config);
Expand Down Expand Up @@ -479,6 +480,7 @@ static int ds3234_probe(struct spi_device *spi)
static const struct regmap_config config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0x13,
.write_flag_mask = 0x80,
};
struct regmap *regmap;
Expand Down

0 comments on commit 082edf0

Please sign in to comment.