diff mbox

[2/3] rtc: ds3232: Add regmap max_register definition.

Message ID 1487295898-90177-3-git-send-email-preid@electromag.com.au
State Accepted
Headers show

Commit Message

Phil Reid Feb. 17, 2017, 1:44 a.m. UTC
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>
---
 drivers/rtc/rtc-ds3232.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alexandre Belloni Feb. 21, 2017, 8:34 p.m. UTC | #1
On 17/02/2017 at 09:44:57 +0800, Phil Reid wrote:
> 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>
> ---
>  drivers/rtc/rtc-ds3232.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
Applied, thanks.
diff mbox

Patch

diff --git a/drivers/rtc/rtc-ds3232.c b/drivers/rtc/rtc-ds3232.c
index 67066f1..60de3a0 100644
--- a/drivers/rtc/rtc-ds3232.c
+++ b/drivers/rtc/rtc-ds3232.c
@@ -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);
@@ -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;