Skip to content

Commit 3ef938f

Browse files
baxenogregkh
authored andcommitted
rtc: pcf2127: fix SPI command byte for PCF2131 backport
When commit fa78e9b upstream was backported to LTS branches linux-6.12.y and linux-6.6.y, the SPI regmap config fix got applied to the I2C regmap config. Most likely due to a new RTC get/set parm feature introduced in 6.14 causing regmap config sections in the buttom of the driver to move. LTS branch linux-6.1.y and earlier does not have PCF2131 device support. Issue can be seen in buttom of this diff in stable/linux.git tree: git diff master..linux-6.12.y -- drivers/rtc/rtc-pcf2127.c Fixes: ee61aec ("rtc: pcf2127: fix SPI command byte for PCF2131") Fixes: 5cdd1f7 ("rtc: pcf2127: fix SPI command byte for PCF2131") Cc: stable@vger.kernel.org Cc: Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Elena Popa <elena.popa@nxp.com> Cc: Hugo Villeneuve <hvilleneuve@dimonoff.com> Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 075abf0 commit 3ef938f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/rtc/rtc-pcf2127.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,11 +1383,6 @@ 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-
13911386
config.max_register = variant->max_register,
13921387

13931388
regmap = devm_regmap_init(&client->dev, &pcf2127_i2c_regmap,
@@ -1461,6 +1456,11 @@ static int pcf2127_spi_probe(struct spi_device *spi)
14611456
variant = &pcf21xx_cfg[type];
14621457
}
14631458

1459+
if (variant->type == PCF2131) {
1460+
config.read_flag_mask = 0x0;
1461+
config.write_flag_mask = 0x0;
1462+
}
1463+
14641464
config.max_register = variant->max_register;
14651465

14661466
regmap = devm_regmap_init_spi(spi, &config);

0 commit comments

Comments
 (0)