linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/1] backlight: mp3309c: fix leds flickering in pwm mode
@ 2024-04-17 15:31 Flavio Suligoi
  2024-04-17 15:31 ` [PATCH v1 1/1] " Flavio Suligoi
  0 siblings, 1 reply; 8+ messages in thread
From: Flavio Suligoi @ 2024-04-17 15:31 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller, Dan Carpenter
  Cc: dri-devel, linux-fbdev, linux-kernel, Flavio Suligoi

The mp3309 has two configuration registers, named according to their
address (0x00 and 0x01).
In the second register (0x01), the bit DIMS (Dimming Mode Select) must
be always 0 (zero), in both analog (via i2c commands) and pwm dimming
mode.

In the initial driver version, the DIMS bit was set in pwm mode and
reset in analog mode.
But if the DIMS bit is set in pwm dimming mode and other devices are
connected on the same i2c bus, every i2c commands on the bus generates a
flickering on the LEDs powered by the mp3309c.

This change concerns the chip initialization and does not impact any
existing device-tree configuration.

I created this device driver for one of our boards, where both dimming
modes (pwm and analog by i2c commands) can be used.
This board uses the same i2c bus for the mp3309c and for an at24cs32
eeprom.
During further tests, I realized that, when the mp3309c is used in pwm
mode, every read operation on the eeprom caused a backlight flickering.
This is why I made this device driver modification.

Flavio Suligoi (1):
  backlight: mp3309c: fix leds flickering in pwm mode

 drivers/video/backlight/mp3309c.c | 5 -----
 1 file changed, 5 deletions(-)

-- 
2.34.1


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

* [PATCH v1 1/1] backlight: mp3309c: fix leds flickering in pwm mode
  2024-04-17 15:31 [PATCH v1 0/1] backlight: mp3309c: fix leds flickering in pwm mode Flavio Suligoi
@ 2024-04-17 15:31 ` Flavio Suligoi
  2024-04-18  8:41   ` Daniel Thompson
  2024-05-02 16:48   ` (subset) " Lee Jones
  0 siblings, 2 replies; 8+ messages in thread
From: Flavio Suligoi @ 2024-04-17 15:31 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller, Dan Carpenter
  Cc: dri-devel, linux-fbdev, linux-kernel, Flavio Suligoi

The mp3309 has two configuration registers, named according to their
address (0x00 and 0x01).
In the second register (0x01), the bit DIMS (Dimming Mode Select) must
be always 0 (zero), in both analog (via i2c commands) and pwm dimming
mode.

In the initial driver version, the DIMS bit was set in pwm mode and
reset in analog mode.
But if the DIMS bit is set in pwm dimming mode and other devices are
connected on the same i2c bus, every i2c commands on the bus generates a
flickering on the LEDs powered by the mp3309c.

This change concerns the chip initialization and does not impact any
existing device-tree configuration.

Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>
---
 drivers/video/backlight/mp3309c.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c
index 016c1296841c..a28036c964af 100644
--- a/drivers/video/backlight/mp3309c.c
+++ b/drivers/video/backlight/mp3309c.c
@@ -97,15 +97,10 @@ static int mp3309c_enable_device(struct mp3309c_chip *chip)
 
 	/*
 	 * I2C register #1 - Set working mode:
-	 *  - set one of the two dimming mode:
-	 *    - PWM dimming using an external PWM dimming signal
-	 *    - analog dimming using I2C commands
 	 *  - enable/disable synchronous mode
 	 *  - set overvoltage protection (OVP)
 	 */
 	reg_val = 0x00;
-	if (chip->pdata->dimming_mode == DIMMING_PWM)
-		reg_val |= REG_I2C_1_DIMS;
 	if (chip->pdata->sync_mode)
 		reg_val |= REG_I2C_1_SYNC;
 	reg_val |= chip->pdata->over_voltage_protection;
-- 
2.34.1


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

* Re: [PATCH v1 1/1] backlight: mp3309c: fix leds flickering in pwm mode
  2024-04-17 15:31 ` [PATCH v1 1/1] " Flavio Suligoi
@ 2024-04-18  8:41   ` Daniel Thompson
  2024-05-02 16:48   ` (subset) " Lee Jones
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Thompson @ 2024-04-18  8:41 UTC (permalink / raw)
  To: Flavio Suligoi
  Cc: Lee Jones, Jingoo Han, Helge Deller, Dan Carpenter, dri-devel,
	linux-fbdev, linux-kernel

On Wed, Apr 17, 2024 at 05:31:05PM +0200, Flavio Suligoi wrote:
> The mp3309 has two configuration registers, named according to their
> address (0x00 and 0x01).
> In the second register (0x01), the bit DIMS (Dimming Mode Select) must
> be always 0 (zero), in both analog (via i2c commands) and pwm dimming
> mode.
>
> In the initial driver version, the DIMS bit was set in pwm mode and
> reset in analog mode.
> But if the DIMS bit is set in pwm dimming mode and other devices are
> connected on the same i2c bus, every i2c commands on the bus generates a
> flickering on the LEDs powered by the mp3309c.
>
> This change concerns the chip initialization and does not impact any
> existing device-tree configuration.
>
> Signed-off-by: Flavio Suligoi <f.suligoi@asem.it>

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>


Daniel.

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

* Re: (subset) [PATCH v1 1/1] backlight: mp3309c: fix leds flickering in pwm mode
  2024-04-17 15:31 ` [PATCH v1 1/1] " Flavio Suligoi
  2024-04-18  8:41   ` Daniel Thompson
@ 2024-05-02 16:48   ` Lee Jones
  2024-05-02 16:48     ` Lee Jones
  1 sibling, 1 reply; 8+ messages in thread
From: Lee Jones @ 2024-05-02 16:48 UTC (permalink / raw)
  To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
	Dan Carpenter, Flavio Suligoi
  Cc: dri-devel, linux-fbdev, linux-kernel

On Wed, 17 Apr 2024 17:31:05 +0200, Flavio Suligoi wrote:
> The mp3309 has two configuration registers, named according to their
> address (0x00 and 0x01).
> In the second register (0x01), the bit DIMS (Dimming Mode Select) must
> be always 0 (zero), in both analog (via i2c commands) and pwm dimming
> mode.
> 
> In the initial driver version, the DIMS bit was set in pwm mode and
> reset in analog mode.
> But if the DIMS bit is set in pwm dimming mode and other devices are
> connected on the same i2c bus, every i2c commands on the bus generates a
> flickering on the LEDs powered by the mp3309c.
> 
> [...]

Applied, thanks!

[1/1] backlight: mp3309c: fix leds flickering in pwm mode
      commit: ce60cddc2abf61902dfca71d630624db95315124

--
Lee Jones [李琼斯]


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

* Re: (subset) [PATCH v1 1/1] backlight: mp3309c: fix leds flickering in pwm mode
  2024-05-02 16:48   ` (subset) " Lee Jones
@ 2024-05-02 16:48     ` Lee Jones
  2024-05-03  6:47       ` EXTERNAL: " FLAVIO SULIGOI
  0 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2024-05-02 16:48 UTC (permalink / raw)
  To: Daniel Thompson, Jingoo Han, Helge Deller, Dan Carpenter, Flavio Suligoi
  Cc: dri-devel, linux-fbdev, linux-kernel

On Thu, 02 May 2024, Lee Jones wrote:

> On Wed, 17 Apr 2024 17:31:05 +0200, Flavio Suligoi wrote:
> > The mp3309 has two configuration registers, named according to their
> > address (0x00 and 0x01).
> > In the second register (0x01), the bit DIMS (Dimming Mode Select) must
> > be always 0 (zero), in both analog (via i2c commands) and pwm dimming
> > mode.
> > 
> > In the initial driver version, the DIMS bit was set in pwm mode and
> > reset in analog mode.
> > But if the DIMS bit is set in pwm dimming mode and other devices are
> > connected on the same i2c bus, every i2c commands on the bus generates a
> > flickering on the LEDs powered by the mp3309c.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/1] backlight: mp3309c: fix leds flickering in pwm mode
>       commit: ce60cddc2abf61902dfca71d630624db95315124

Applied, but in future it's; I2C, PWM and LED, thanks.

-- 
Lee Jones [李琼斯]

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

* RE: EXTERNAL: Re: (subset) [PATCH v1 1/1] backlight: mp3309c: fix leds flickering in pwm mode
  2024-05-02 16:48     ` Lee Jones
@ 2024-05-03  6:47       ` FLAVIO SULIGOI
  2024-05-03  7:07         ` Lee Jones
  0 siblings, 1 reply; 8+ messages in thread
From: FLAVIO SULIGOI @ 2024-05-03  6:47 UTC (permalink / raw)
  To: 'Lee Jones',
	Daniel Thompson, Jingoo Han, Helge Deller, Dan Carpenter
  Cc: dri-devel, linux-fbdev, linux-kernel

Hi Lee,

...

> Subject: EXTERNAL: Re: (subset) [PATCH v1 1/1] backlight: mp3309c: fix
> leds flickering in pwm mode
> 
> [Use caution with links & attachments]
> 
> 
> 
> On Thu, 02 May 2024, Lee Jones wrote:
> 
> > On Wed, 17 Apr 2024 17:31:05 +0200, Flavio Suligoi wrote:
> > > The mp3309 has two configuration registers, named according to their
> > > address (0x00 and 0x01).
> > > In the second register (0x01), the bit DIMS (Dimming Mode Select)
> > > must be always 0 (zero), in both analog (via i2c commands) and pwm
> > > dimming mode.
> > >
> > > In the initial driver version, the DIMS bit was set in pwm mode and
> > > reset in analog mode.
> > > But if the DIMS bit is set in pwm dimming mode and other devices are
> > > connected on the same i2c bus, every i2c commands on the bus
> > > generates a flickering on the LEDs powered by the mp3309c.
> > >
> > > [...]
> >
> > Applied, thanks!
> >
> > [1/1] backlight: mp3309c: fix leds flickering in pwm mode
> >       commit: ce60cddc2abf61902dfca71d630624db95315124
> 
> Applied, but in future it's; I2C, PWM and LED, thanks.

Sorry for my question, but do you mean that I also have to add the I2C,
PWM and LED mailing lists in my messages related to the mp33309c patches?

> 
> --
> Lee Jones [李琼斯]

Thanks and best regards,
Flavio

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

* Re: EXTERNAL: Re: (subset) [PATCH v1 1/1] backlight: mp3309c: fix leds flickering in pwm mode
  2024-05-03  6:47       ` EXTERNAL: " FLAVIO SULIGOI
@ 2024-05-03  7:07         ` Lee Jones
  2024-05-03  7:35           ` FLAVIO SULIGOI
  0 siblings, 1 reply; 8+ messages in thread
From: Lee Jones @ 2024-05-03  7:07 UTC (permalink / raw)
  To: FLAVIO SULIGOI
  Cc: Daniel Thompson, Jingoo Han, Helge Deller, Dan Carpenter,
	dri-devel, linux-fbdev, linux-kernel

On Fri, 03 May 2024, FLAVIO SULIGOI wrote:

> Hi Lee,
> 
> ...
> 
> > Subject: EXTERNAL: Re: (subset) [PATCH v1 1/1] backlight: mp3309c: fix
> > leds flickering in pwm mode
> > 
> > [Use caution with links & attachments]
> > 
> > 
> > 
> > On Thu, 02 May 2024, Lee Jones wrote:
> > 
> > > On Wed, 17 Apr 2024 17:31:05 +0200, Flavio Suligoi wrote:
> > > > The mp3309 has two configuration registers, named according to their
> > > > address (0x00 and 0x01).
> > > > In the second register (0x01), the bit DIMS (Dimming Mode Select)
> > > > must be always 0 (zero), in both analog (via i2c commands) and pwm
> > > > dimming mode.
> > > >
> > > > In the initial driver version, the DIMS bit was set in pwm mode and
> > > > reset in analog mode.
> > > > But if the DIMS bit is set in pwm dimming mode and other devices are
> > > > connected on the same i2c bus, every i2c commands on the bus
> > > > generates a flickering on the LEDs powered by the mp3309c.
> > > >
> > > > [...]
> > >
> > > Applied, thanks!
> > >
> > > [1/1] backlight: mp3309c: fix leds flickering in pwm mode
> > >       commit: ce60cddc2abf61902dfca71d630624db95315124
> > 
> > Applied, but in future it's; I2C, PWM and LED, thanks.
> 
> Sorry for my question, but do you mean that I also have to add the I2C,
> PWM and LED mailing lists in my messages related to the mp33309c patches?

Just use proper capitalisation when you abbreviate the names these
subsystems please.

-- 
Lee Jones [李琼斯]

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

* RE: EXTERNAL: Re: (subset) [PATCH v1 1/1] backlight: mp3309c: fix leds flickering in pwm mode
  2024-05-03  7:07         ` Lee Jones
@ 2024-05-03  7:35           ` FLAVIO SULIGOI
  0 siblings, 0 replies; 8+ messages in thread
From: FLAVIO SULIGOI @ 2024-05-03  7:35 UTC (permalink / raw)
  To: 'Lee Jones'
  Cc: Daniel Thompson, Jingoo Han, Helge Deller, Dan Carpenter,
	dri-devel, linux-fbdev, linux-kernel

Hi Lee,

...

> Subject: Re: EXTERNAL: Re: (subset) [PATCH v1 1/1] backlight: mp3309c:
> fix leds flickering in pwm mode
> 
> On Fri, 03 May 2024, FLAVIO SULIGOI wrote:
> 
> > Hi Lee,
> >
> > ...
> >
> > > Subject: EXTERNAL: Re: (subset) [PATCH v1 1/1] backlight: mp3309c:
> > > fix leds flickering in pwm mode
> > >
> > > [Use caution with links & attachments]
> > >
> > >
> > >
> > > On Thu, 02 May 2024, Lee Jones wrote:
> > >
> > > > On Wed, 17 Apr 2024 17:31:05 +0200, Flavio Suligoi wrote:
> > > > > The mp3309 has two configuration registers, named according to
> > > > > their address (0x00 and 0x01).
> > > > > In the second register (0x01), the bit DIMS (Dimming Mode
> > > > > Select) must be always 0 (zero), in both analog (via i2c
> > > > > commands) and pwm dimming mode.
> > > > >
> > > > > In the initial driver version, the DIMS bit was set in pwm mode
> > > > > and reset in analog mode.
> > > > > But if the DIMS bit is set in pwm dimming mode and other devices
> > > > > are connected on the same i2c bus, every i2c commands on the bus
> > > > > generates a flickering on the LEDs powered by the mp3309c.
> > > > >
> > > > > [...]
> > > >
> > > > Applied, thanks!
> > > >
> > > > [1/1] backlight: mp3309c: fix leds flickering in pwm mode
> > > >       commit: ce60cddc2abf61902dfca71d630624db95315124
> > >
> > > Applied, but in future it's; I2C, PWM and LED, thanks.
> >
> > Sorry for my question, but do you mean that I also have to add the
> > I2C, PWM and LED mailing lists in my messages related to the mp33309c
> patches?
> 
> Just use proper capitalisation when you abbreviate the names these
> subsystems please.

Ah, ok, I got it!

> 
> --
> Lee Jones [李琼斯]

Thanks for your explanation,
Flavio

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

end of thread, other threads:[~2024-05-03  7:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 15:31 [PATCH v1 0/1] backlight: mp3309c: fix leds flickering in pwm mode Flavio Suligoi
2024-04-17 15:31 ` [PATCH v1 1/1] " Flavio Suligoi
2024-04-18  8:41   ` Daniel Thompson
2024-05-02 16:48   ` (subset) " Lee Jones
2024-05-02 16:48     ` Lee Jones
2024-05-03  6:47       ` EXTERNAL: " FLAVIO SULIGOI
2024-05-03  7:07         ` Lee Jones
2024-05-03  7:35           ` FLAVIO SULIGOI

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).