Skip to content

Commit fa78e9b

Browse files
elenap08alexandrebelloni
authored andcommitted
rtc: pcf2127: fix SPI command byte for PCF2131
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: [email protected] Signed-off-by: Elena Popa <[email protected]> Acked-by: Hugo Villeneuve <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
1 parent 00a39d8 commit fa78e9b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/rtc/rtc-pcf2127.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1538,6 +1538,11 @@ static int pcf2127_spi_probe(struct spi_device *spi)
15381538
variant = &pcf21xx_cfg[type];
15391539
}
15401540

1541+
if (variant->type == PCF2131) {
1542+
config.read_flag_mask = 0x0;
1543+
config.write_flag_mask = 0x0;
1544+
}
1545+
15411546
config.max_register = variant->max_register,
15421547

15431548
regmap = devm_regmap_init_spi(spi, &config);

0 commit comments

Comments
 (0)