Commit fa78e9b6 authored by Elena Popa's avatar Elena Popa Committed by Alexandre Belloni
Browse files

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: afc505bf ("rtc: pcf2127: add support for PCF2131 RTC")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarElena Popa <elena.popa@nxp.com>
Acked-by: default avatarHugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20250530104001.957977-1-elena.popa@nxp.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 00a39d86
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1538,6 +1538,11 @@ static int pcf2127_spi_probe(struct spi_device *spi)
		variant = &pcf21xx_cfg[type];
	}

	if (variant->type == PCF2131) {
		config.read_flag_mask = 0x0;
		config.write_flag_mask = 0x0;
	}

	config.max_register = variant->max_register,

	regmap = devm_regmap_init_spi(spi, &config);