rtc: ds3232: Add regmap max_register definition.
authorPhil Reid <preid@electromag.com.au>
Fri, 17 Feb 2017 01:44:57 +0000 (09:44 +0800)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Tue, 21 Feb 2017 20:34:00 +0000 (21:34 +0100)
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>
drivers/rtc/rtc-ds3232.c

index 67066f1da8602fc144d659aecb6cc9ac4f96b0c5..60de3a0cc35b836ecc4bd1a4c54c2dff4aabc742 100644 (file)
@@ -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;