aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-pcf2127.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2020-05-05 22:13:09 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2020-05-11 16:04:42 +0200
commit040e6dc0911c86add1ec3140432672e626b9d4ae (patch)
tree7f64bd47cb43437582469d39bb44ee4634432972 /drivers/rtc/rtc-pcf2127.c
parent664eaf033f9f85d67cb9b9e4b1584bd12e4ed20e (diff)
downloadlinux-040e6dc0911c86add1ec3140432672e626b9d4ae.tar.gz
rtc: pcf2127: set regmap max_register
Set regmap max_register to ease debugging and enforce the register range. Link: https://lore.kernel.org/r/20200505201310.255145-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc/rtc-pcf2127.c')
-rw-r--r--drivers/rtc/rtc-pcf2127.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index 5ac9965785238..039078029bd42 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -634,6 +634,7 @@ static int pcf2127_i2c_probe(struct i2c_client *client,
static const struct regmap_config config = {
.reg_bits = 8,
.val_bits = 8,
+ .max_register = 0x1d,
};
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C))
@@ -701,6 +702,7 @@ static int pcf2127_spi_probe(struct spi_device *spi)
.val_bits = 8,
.read_flag_mask = 0xa0,
.write_flag_mask = 0x20,
+ .max_register = 0x1d,
};
struct regmap *regmap;