Skip to content

Commit 5cdd1f7

Browse files
elenap08gregkh
authored andcommitted
rtc: pcf2127: fix SPI command byte for PCF2131
commit fa78e9b upstream. PCF2131 was not responding to read/write operations using SPI. PCF2131 has a different command byte definition, compared to PCF2127/29. Added the new command byte definition when PCF2131 is detected. Fixes: afc505b ("rtc: pcf2127: add support for PCF2131 RTC") Cc: stable@vger.kernel.org Signed-off-by: Elena Popa <elena.popa@nxp.com> Acked-by: Hugo Villeneuve <hvilleneuve@dimonoff.com> Link: https://lore.kernel.org/r/20250530104001.957977-1-elena.popa@nxp.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1cb814d commit 5cdd1f7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/rtc/rtc-pcf2127.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,6 +1383,11 @@ static int pcf2127_i2c_probe(struct i2c_client *client)
13831383
variant = &pcf21xx_cfg[type];
13841384
}
13851385

1386+
if (variant->type == PCF2131) {
1387+
config.read_flag_mask = 0x0;
1388+
config.write_flag_mask = 0x0;
1389+
}
1390+
13861391
config.max_register = variant->max_register,
13871392

13881393
regmap = devm_regmap_init(&client->dev, &pcf2127_i2c_regmap,

0 commit comments

Comments
 (0)