public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rtc: pcf2127: fix SPI command byte for PCF2131 backport
@ 2025-08-20 19:30 Bruno Thomsen
  2025-09-14 22:35 ` Alexandre Belloni
  0 siblings, 1 reply; 4+ messages in thread
From: Bruno Thomsen @ 2025-08-20 19:30 UTC (permalink / raw)
  To: linux-rtc
  Cc: bruno.thomsen, stable, Alexandre Belloni, Elena Popa,
	Hugo Villeneuve

When commit fa78e9b606a472495ef5b6b3d8b45c37f7727f9d 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: ee61aec8529e ("rtc: pcf2127: fix SPI command byte for PCF2131")
Fixes: 5cdd1f73401d ("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>
---
 drivers/rtc/rtc-pcf2127.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
index fc079b9dcf71..502571f0c203 100644
--- a/drivers/rtc/rtc-pcf2127.c
+++ b/drivers/rtc/rtc-pcf2127.c
@@ -1383,11 +1383,6 @@ static int pcf2127_i2c_probe(struct i2c_client *client)
 		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(&client->dev, &pcf2127_i2c_regmap,
@@ -1461,6 +1456,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);

base-commit: 880e4ff5d6c8dc6b660f163a0e9b68b898cc6310
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] rtc: pcf2127: fix SPI command byte for PCF2131 backport
  2025-08-20 19:30 [PATCH] rtc: pcf2127: fix SPI command byte for PCF2131 backport Bruno Thomsen
@ 2025-09-14 22:35 ` Alexandre Belloni
  2025-09-21 16:52   ` Bruno Thomsen
  0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Belloni @ 2025-09-14 22:35 UTC (permalink / raw)
  To: Bruno Thomsen; +Cc: linux-rtc, stable, Elena Popa, Hugo Villeneuve

Hello Bruno,

I guess you'd have to send this directly to stable and gkh so he wll
notice it.

On 20/08/2025 21:30:16+0200, Bruno Thomsen wrote:
> When commit fa78e9b606a472495ef5b6b3d8b45c37f7727f9d 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: ee61aec8529e ("rtc: pcf2127: fix SPI command byte for PCF2131")
> Fixes: 5cdd1f73401d ("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>
> ---
>  drivers/rtc/rtc-pcf2127.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
> index fc079b9dcf71..502571f0c203 100644
> --- a/drivers/rtc/rtc-pcf2127.c
> +++ b/drivers/rtc/rtc-pcf2127.c
> @@ -1383,11 +1383,6 @@ static int pcf2127_i2c_probe(struct i2c_client *client)
>  		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(&client->dev, &pcf2127_i2c_regmap,
> @@ -1461,6 +1456,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);
> 
> base-commit: 880e4ff5d6c8dc6b660f163a0e9b68b898cc6310
> -- 
> 2.50.1
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rtc: pcf2127: fix SPI command byte for PCF2131 backport
  2025-09-14 22:35 ` Alexandre Belloni
@ 2025-09-21 16:52   ` Bruno Thomsen
  2025-09-21 17:36     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Bruno Thomsen @ 2025-09-21 16:52 UTC (permalink / raw)
  To: stable, Greg KH

Hi Greg,

I have not tried to report issues with stable branches before,
so my email did reach you[1]. A backported rtc fix was applied
incorrectly to linux-6.12.y and linux-6.6.y. Patch message
got both incorrect backport commits.

/Bruno

[1] https://lore.kernel.org/stable/20250820193016.7987-1-bruno.thomsen@gmail.com/

Den man. 15. sep. 2025 kl. 00.35 skrev Alexandre Belloni
<alexandre.belloni@bootlin.com>:
>
> Hello Bruno,
>
> I guess you'd have to send this directly to stable and gkh so he wll
> notice it.
>
> On 20/08/2025 21:30:16+0200, Bruno Thomsen wrote:
> > When commit fa78e9b606a472495ef5b6b3d8b45c37f7727f9d 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: ee61aec8529e ("rtc: pcf2127: fix SPI command byte for PCF2131")
> > Fixes: 5cdd1f73401d ("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>
> > ---
> >  drivers/rtc/rtc-pcf2127.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/rtc/rtc-pcf2127.c b/drivers/rtc/rtc-pcf2127.c
> > index fc079b9dcf71..502571f0c203 100644
> > --- a/drivers/rtc/rtc-pcf2127.c
> > +++ b/drivers/rtc/rtc-pcf2127.c
> > @@ -1383,11 +1383,6 @@ static int pcf2127_i2c_probe(struct i2c_client *client)
> >               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(&client->dev, &pcf2127_i2c_regmap,
> > @@ -1461,6 +1456,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);
> >
> > base-commit: 880e4ff5d6c8dc6b660f163a0e9b68b898cc6310
> > --
> > 2.50.1
> >
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rtc: pcf2127: fix SPI command byte for PCF2131 backport
  2025-09-21 16:52   ` Bruno Thomsen
@ 2025-09-21 17:36     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2025-09-21 17:36 UTC (permalink / raw)
  To: Bruno Thomsen; +Cc: stable

On Sun, Sep 21, 2025 at 06:52:17PM +0200, Bruno Thomsen wrote:
> Hi Greg,
> 
> I have not tried to report issues with stable branches before,
> so my email did reach you[1]. A backported rtc fix was applied
> incorrectly to linux-6.12.y and linux-6.6.y. Patch message
> got both incorrect backport commits.

Ah, missed this, sorry about that, now queued up, thanks for pointing it
out again.

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-09-21 17:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 19:30 [PATCH] rtc: pcf2127: fix SPI command byte for PCF2131 backport Bruno Thomsen
2025-09-14 22:35 ` Alexandre Belloni
2025-09-21 16:52   ` Bruno Thomsen
2025-09-21 17:36     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox