All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] leds: Clarify supported chips by LM355x driver
@ 2018-01-26  7:38 Andy Shevchenko
  2018-01-26 10:25 ` Pavel Machek
  2018-01-26 20:39 ` Jacek Anaszewski
  0 siblings, 2 replies; 14+ messages in thread
From: Andy Shevchenko @ 2018-01-26  7:38 UTC (permalink / raw)
  To: Richard Purdie, Jacek Anaszewski, Pavel Machek, linux-leds
  Cc: Andy Shevchenko

LM3555 is supported by AS3645A.
Clarify this in Kconfig by referencing to AS3645A.

No functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/leds/Kconfig | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 3e763d2a0cb3..0961882fa57f 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -601,6 +601,8 @@ config LEDS_LM355x
 	  This option enables support for LEDs connected to LM355x.
 	  LM355x includes Torch, Flash and Indicator functions.
 
+	  Note, LM3555 is driven by AS3645A.
+
 config LEDS_OT200
 	tristate "LED support for the Bachmann OT200"
 	depends on LEDS_CLASS && HAS_IOMEM && (X86_32 || COMPILE_TEST)
-- 
2.15.1

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-26  7:38 [PATCH v1] leds: Clarify supported chips by LM355x driver Andy Shevchenko
@ 2018-01-26 10:25 ` Pavel Machek
  2018-01-26 11:44   ` Andy Shevchenko
  2018-01-26 21:32   ` Pavel Machek
  2018-01-26 20:39 ` Jacek Anaszewski
  1 sibling, 2 replies; 14+ messages in thread
From: Pavel Machek @ 2018-01-26 10:25 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Richard Purdie, Jacek Anaszewski, linux-leds, sakari.ailus

[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]

On Fri 2018-01-26 09:38:28, Andy Shevchenko wrote:
> LM3555 is supported by AS3645A.
> Clarify this in Kconfig by referencing to AS3645A.
> 
> No functional change.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/leds/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 3e763d2a0cb3..0961882fa57f 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -601,6 +601,8 @@ config LEDS_LM355x
>  	  This option enables support for LEDs connected to LM355x.
>  	  LM355x includes Torch, Flash and Indicator functions.
>  
> +	  Note, LM3555 is driven by AS3645A.
> +

I took a look at the driver. It seems to me lm355x only handles lm3554
and lm3556? Perhaps Kconfig help should say that explicitely?

(I guess lm3555 is somehow different from the other two?)
								Pavel

>  config LEDS_OT200
>  	tristate "LED support for the Bachmann OT200"
>  	depends on LEDS_CLASS && HAS_IOMEM && (X86_32 || COMPILE_TEST)

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-26 10:25 ` Pavel Machek
@ 2018-01-26 11:44   ` Andy Shevchenko
  2018-01-26 21:05     ` Pavel Machek
  2018-01-26 21:32   ` Pavel Machek
  1 sibling, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2018-01-26 11:44 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Richard Purdie, Jacek Anaszewski, linux-leds, sakari.ailus

On Fri, 2018-01-26 at 11:25 +0100, Pavel Machek wrote:
> On Fri 2018-01-26 09:38:28, Andy Shevchenko wrote:
> > LM3555 is supported by AS3645A.
> > Clarify this in Kconfig by referencing to AS3645A.
> > 
> > No functional change.

> > 	  This option enables support for LEDs connected to LM355x.
> >  	  LM355x includes Torch, Flash and Indicator functions.
> >  
> > +	  Note, LM3555 is driven by AS3645A.
> > +
> 
> I took a look at the driver. It seems to me lm355x only handles lm3554
> and lm3556?

Correct.

>  Perhaps Kconfig help should say that explicitely?

It's in the title.

> (I guess lm3555 is somehow different from the other two?)

Correct.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-26  7:38 [PATCH v1] leds: Clarify supported chips by LM355x driver Andy Shevchenko
  2018-01-26 10:25 ` Pavel Machek
@ 2018-01-26 20:39 ` Jacek Anaszewski
  2018-01-28 14:30   ` Andy Shevchenko
  1 sibling, 1 reply; 14+ messages in thread
From: Jacek Anaszewski @ 2018-01-26 20:39 UTC (permalink / raw)
  To: Andy Shevchenko, Richard Purdie, Pavel Machek, linux-leds

Hi Andy,

Thanks for the patch.

On 01/26/2018 08:38 AM, Andy Shevchenko wrote:
> LM3555 is supported by AS3645A.
> Clarify this in Kconfig by referencing to AS3645A.
> 
> No functional change.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/leds/Kconfig | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 3e763d2a0cb3..0961882fa57f 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -601,6 +601,8 @@ config LEDS_LM355x
>  	  This option enables support for LEDs connected to LM355x.
>  	  LM355x includes Torch, Flash and Indicator functions.
>  
> +	  Note, LM3555 is driven by AS3645A.

Could you please provide more details on this relationship?
Looking at the datasheet it seems that both chips are standalone
and controlled via I2C and/or via GPIO in case of LM3555.

>  config LEDS_OT200
>  	tristate "LED support for the Bachmann OT200"
>  	depends on LEDS_CLASS && HAS_IOMEM && (X86_32 || COMPILE_TEST)
> 

-- 
Best regards,
Jacek Anaszewski

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-26 11:44   ` Andy Shevchenko
@ 2018-01-26 21:05     ` Pavel Machek
  0 siblings, 0 replies; 14+ messages in thread
From: Pavel Machek @ 2018-01-26 21:05 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Richard Purdie, Jacek Anaszewski, linux-leds, sakari.ailus

[-- Attachment #1: Type: text/plain, Size: 906 bytes --]

On Fri 2018-01-26 13:44:01, Andy Shevchenko wrote:
> On Fri, 2018-01-26 at 11:25 +0100, Pavel Machek wrote:
> > On Fri 2018-01-26 09:38:28, Andy Shevchenko wrote:
> > > LM3555 is supported by AS3645A.
> > > Clarify this in Kconfig by referencing to AS3645A.
> > > 
> > > No functional change.
> 
> > > 	  This option enables support for LEDs connected to LM355x.
> > >  	  LM355x includes Torch, Flash and Indicator functions.
> > >  
> > > +	  Note, LM3555 is driven by AS3645A.
> > > +
> > 
> > I took a look at the driver. It seems to me lm355x only handles lm3554
> > and lm3556?
> 
> Correct.
> 
> >  Perhaps Kconfig help should say that explicitely?
> 
> It's in the title.

Aha.

Acked-by: Pavel Machek <pavel@ucw.cz>
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-26 10:25 ` Pavel Machek
  2018-01-26 11:44   ` Andy Shevchenko
@ 2018-01-26 21:32   ` Pavel Machek
  2018-01-26 22:07     ` Sakari Ailus
  2018-01-28 14:18     ` Andy Shevchenko
  1 sibling, 2 replies; 14+ messages in thread
From: Pavel Machek @ 2018-01-26 21:32 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Richard Purdie, Jacek Anaszewski, linux-leds, sakari.ailus

[-- Attachment #1: Type: text/plain, Size: 1670 bytes --]

On Fri 2018-01-26 11:25:07, Pavel Machek wrote:
> On Fri 2018-01-26 09:38:28, Andy Shevchenko wrote:
> > LM3555 is supported by AS3645A.
> > Clarify this in Kconfig by referencing to AS3645A.
> > 
> > No functional change.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  drivers/leds/Kconfig | 2 ++
> >  1 file changed, 2 insertions(+)

Actually, what about this?

Signed-off-by: Pavel Machek <pavel@ucw.cz>

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 318a28f..2acf864 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -69,7 +69,7 @@ config LEDS_APU
 	  module will be called leds-apu.
 
 config LEDS_AS3645A
-	tristate "AS3645A LED flash controller support"
+	tristate "AS3645A and LM3555 LED flash controller support"
 	depends on I2C && LEDS_CLASS_FLASH
 	depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
 	help
@@ -587,12 +587,12 @@ config LEDS_MAX8997
 	  MAXIM MAX8997 PMIC.
 
 config LEDS_LM355x
-	tristate "LED support for LM355x Chips, LM3554 and LM3556"
+	tristate "LED support for LM3554 and LM3556 chips"
 	depends on LEDS_CLASS && I2C
 	select REGMAP_I2C
 	help
-	  This option enables support for LEDs connected to LM355x.
-	  LM355x includes Torch, Flash and Indicator functions.
+	  This option enables support for LEDs connected to LM3554
+	  and lM3556. It includes Torch, Flash and Indicator functions.
 
 config LEDS_OT200
 	tristate "LED support for the Bachmann OT200"






-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-26 21:32   ` Pavel Machek
@ 2018-01-26 22:07     ` Sakari Ailus
  2018-01-28 14:18     ` Andy Shevchenko
  1 sibling, 0 replies; 14+ messages in thread
From: Sakari Ailus @ 2018-01-26 22:07 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Andy Shevchenko, Richard Purdie, Jacek Anaszewski, linux-leds

Hi Pavel,

On Fri, Jan 26, 2018 at 10:32:39PM +0100, Pavel Machek wrote:
> On Fri 2018-01-26 11:25:07, Pavel Machek wrote:
> > On Fri 2018-01-26 09:38:28, Andy Shevchenko wrote:
> > > LM3555 is supported by AS3645A.
> > > Clarify this in Kconfig by referencing to AS3645A.
> > > 
> > > No functional change.
> > > 
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > > ---
> > >  drivers/leds/Kconfig | 2 ++
> > >  1 file changed, 2 insertions(+)
> 
> Actually, what about this?
> 
> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 318a28f..2acf864 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -69,7 +69,7 @@ config LEDS_APU
>  	  module will be called leds-apu.
>  
>  config LEDS_AS3645A
> -	tristate "AS3645A LED flash controller support"
> +	tristate "AS3645A and LM3555 LED flash controller support"
>  	depends on I2C && LEDS_CLASS_FLASH
>  	depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
>  	help
> @@ -587,12 +587,12 @@ config LEDS_MAX8997
>  	  MAXIM MAX8997 PMIC.
>  
>  config LEDS_LM355x
> -	tristate "LED support for LM355x Chips, LM3554 and LM3556"
> +	tristate "LED support for LM3554 and LM3556 chips"
>  	depends on LEDS_CLASS && I2C
>  	select REGMAP_I2C
>  	help
> -	  This option enables support for LEDs connected to LM355x.
> -	  LM355x includes Torch, Flash and Indicator functions.
> +	  This option enables support for LEDs connected to LM3554
> +	  and lM3556. It includes Torch, Flash and Indicator functions.

s/l/L/

>  
>  config LEDS_OT200
>  	tristate "LED support for the Bachmann OT200"

Could you submit a patch to linux-leds, please?

-- 
Sakari Ailus
e-mail: sakari.ailus@iki.fi

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-26 21:32   ` Pavel Machek
  2018-01-26 22:07     ` Sakari Ailus
@ 2018-01-28 14:18     ` Andy Shevchenko
  1 sibling, 0 replies; 14+ messages in thread
From: Andy Shevchenko @ 2018-01-28 14:18 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Richard Purdie, Jacek Anaszewski, linux-leds, sakari.ailus

On Fri, 2018-01-26 at 22:32 +0100, Pavel Machek wrote:
> On Fri 2018-01-26 11:25:07, Pavel Machek wrote:

> Actually, what about this?

Works for me:
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Though one typo below.

> 
> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 318a28f..2acf864 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -69,7 +69,7 @@ config LEDS_APU
>  	  module will be called leds-apu.
>  
>  config LEDS_AS3645A
> -	tristate "AS3645A LED flash controller support"
> +	tristate "AS3645A and LM3555 LED flash controller support"

controller -> controllers

>  	depends on I2C && LEDS_CLASS_FLASH
>  	depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
>  	help
> @@ -587,12 +587,12 @@ config LEDS_MAX8997
>  	  MAXIM MAX8997 PMIC.
>  
>  config LEDS_LM355x
> -	tristate "LED support for LM355x Chips, LM3554 and LM3556"
> +	tristate "LED support for LM3554 and LM3556 chips"
>  	depends on LEDS_CLASS && I2C
>  	select REGMAP_I2C
>  	help
> -	  This option enables support for LEDs connected to LM355x.
> -	  LM355x includes Torch, Flash and Indicator functions.
> +	  This option enables support for LEDs connected to LM3554
> +	  and lM3556. It includes Torch, Flash and Indicator
> functions.
>  
>  config LEDS_OT200
>  	tristate "LED support for the Bachmann OT200"
> 
> 
> 
> 
> 
> 

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-26 20:39 ` Jacek Anaszewski
@ 2018-01-28 14:30   ` Andy Shevchenko
  2018-01-29 20:46     ` Jacek Anaszewski
  0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2018-01-28 14:30 UTC (permalink / raw)
  To: Jacek Anaszewski, Richard Purdie, Pavel Machek, linux-leds

On Fri, 2018-01-26 at 21:39 +0100, Jacek Anaszewski wrote:
> On 01/26/2018 08:38 AM, Andy Shevchenko wrote:

> > +	  Note, LM3555 is driven by AS3645A.
> 
> Could you please provide more details on this relationship?
> Looking at the datasheet it seems that both chips are standalone
> and controlled via I2C and/or via GPIO in case of LM3555.

The only difference I see looking in datasheets again that AS3645A
supports dual-led mode, by using STROBE signal in case of parallel
interface or thru additional bits in I2C mode.

Can you be more specific what exactly makes you feel that they are not
compatible?

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-28 14:30   ` Andy Shevchenko
@ 2018-01-29 20:46     ` Jacek Anaszewski
  2018-01-30 11:08       ` Andy Shevchenko
  0 siblings, 1 reply; 14+ messages in thread
From: Jacek Anaszewski @ 2018-01-29 20:46 UTC (permalink / raw)
  To: Andy Shevchenko, Richard Purdie, Pavel Machek, linux-leds,
	Sakari Ailus

On 01/28/2018 03:30 PM, Andy Shevchenko wrote:
> On Fri, 2018-01-26 at 21:39 +0100, Jacek Anaszewski wrote:
>> On 01/26/2018 08:38 AM, Andy Shevchenko wrote:
> 
>>> +	  Note, LM3555 is driven by AS3645A.
>>
>> Could you please provide more details on this relationship?
>> Looking at the datasheet it seems that both chips are standalone
>> and controlled via I2C and/or via GPIO in case of LM3555.
> 
> The only difference I see looking in datasheets again that AS3645A
> supports dual-led mode, by using STROBE signal in case of parallel
> interface or thru additional bits in I2C mode.
> 
> Can you be more specific what exactly makes you feel that they are not
> compatible?

The expression "LM3555 is driven by AS3645A" brings on mind rather
some type of hardware dependency between chips than drivers similarity.

Now I understand that you meant that both devices can be driven by any
of leds-lm355x or leds-as3645a driver, am I right?

If so, then I don't see the compatibility:

Excerpt from both drivers showing register addresses:

drivers/leds/leds-as3645a.c:

#define AS_DESIGN_INFO_REG			0x00
#define AS_VERSION_CONTROL_REG			0x01
#define AS_INDICATOR_AND_TIMER_REG		0x02
#define AS_CURRENT_SET_REG			0x03
#define AS_CONTROL_REG				0x04
#define AS_FAULT_INFO_REG			0x05
#define AS_BOOST_REG				0x0d
#define AS_PASSWORD_REG				0x0f

drivers/leds/leds-lm355x.c:

struct lm355x_reg_data {
        u8 regno; // this is register address
        u8 mask;
        u8 shift;
};

static struct lm355x_reg_data lm3554_regs[REG_MAX] = {
	[REG_FLAG] = {0xD0, 0xBF, 0},
	[REG_TORCH_CFG] = {0xE0, 0x80, 7},
	[REG_TORCH_CTRL] = {0xA0, 0x38, 3},
	[REG_STROBE_CFG] = {0xE0, 0x04, 2},
	[REG_FLASH_CTRL] = {0xB0, 0x78, 3},
	[REG_INDI_CFG] = {0xE0, 0x08, 3},
	[REG_INDI_CTRL] = {0xA0, 0xC0, 6},
	[REG_OPMODE] = {0xA0, 0x03, 0},
};

static struct lm355x_reg_data lm3556_regs[REG_MAX] = {
	[REG_FLAG] = {0x0B, 0xFF, 0},
	[REG_TORCH_CFG] = {0x0A, 0x10, 4},
	[REG_TORCH_CTRL] = {0x09, 0x70, 4},
	[REG_STROBE_CFG] = {0x0A, 0x20, 5},
	[REG_FLASH_CTRL] = {0x09, 0x0F, 0},
	[REG_INDI_CFG] = {0xFF, 0xFF, 0},
	[REG_INDI_CTRL] = {0x09, 0x70, 4},
	[REG_OPMODE] = {0x0A, 0x03, 0},
};


This is consistent with documentation:

[0] http://www.ti.com/lit/ds/symlink/lm3554.pdf
[1] http://www.ti.com/lit/ds/symlink/lm3556.pdf
[2] https://www.mouser.com/ds/2/588/AS3645_Datasheet_EN_v3-1214758.pdf

I suspected that I got something entirely wrong here, especially
that both you and Pavel agreed.

But, given that it turned out that leds-lm355x.c doesn't support
LM3555 and its documentation [3] indeed shows the affinity with
AS3645, I suppose that this patch is a result of a premature
conclusion drawn basing on the driver's description rather than its
capabilities.

[3] http://www.ti.com/lit/ds/symlink/lm3555.pdf

Effectively, the only sensible change seems to be:

-	tristate "LED support for LM355x Chips, LM3554 and LM3556"
+	tristate "LED support for LM3554 and LM3556 chips"
 	depends on LEDS_CLASS && I2C
 	select REGMAP_I2C
 	help
-	  This option enables support for LEDs connected to LM355x.
-	  LM355x includes Torch, Flash and Indicator functions.
+	  This option enables support for LEDs connected to LM3554
+	  and LM3556. It includes Torch, Flash and Indicator functions.



-- 
Best regards,
Jacek Anaszewski

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-29 20:46     ` Jacek Anaszewski
@ 2018-01-30 11:08       ` Andy Shevchenko
  2018-01-30 20:04         ` Jacek Anaszewski
  0 siblings, 1 reply; 14+ messages in thread
From: Andy Shevchenko @ 2018-01-30 11:08 UTC (permalink / raw)
  To: Jacek Anaszewski, Richard Purdie, Pavel Machek, linux-leds,
	Sakari Ailus

On Mon, 2018-01-29 at 21:46 +0100, Jacek Anaszewski wrote:
> On 01/28/2018 03:30 PM, Andy Shevchenko wrote:
> > On Fri, 2018-01-26 at 21:39 +0100, Jacek Anaszewski wrote:
> > > On 01/26/2018 08:38 AM, Andy Shevchenko wrote:
> > > > +	  Note, LM3555 is driven by AS3645A.
> > > 
> > > Could you please provide more details on this relationship?
> > > Looking at the datasheet it seems that both chips are standalone
> > > and controlled via I2C and/or via GPIO in case of LM3555.
> > 
> > The only difference I see looking in datasheets again that AS3645A
> > supports dual-led mode, by using STROBE signal in case of parallel
> > interface or thru additional bits in I2C mode.
> > 
> > Can you be more specific what exactly makes you feel that they are
> > not
> > compatible?
> 
> The expression "LM3555 is driven by AS3645A" brings on mind rather
> some type of hardware dependency between chips than drivers
> similarity.
> 
> Now I understand that you meant that both devices can be driven by any
> of leds-lm355x or leds-as3645a driver, am I right?

No. The chip in question is LM3555, and it's handled only in as3645a
driver.

> I suspected that I got something entirely wrong here, especially
> that both you and Pavel agreed.
> 
> But, given that it turned out that leds-lm355x.c doesn't support
> LM3555 and its documentation [3] indeed shows the affinity with
> AS3645, I suppose that this patch is a result of a premature
> conclusion drawn basing on the driver's description rather than its
> capabilities.
> 
> [3] http://www.ti.com/lit/ds/symlink/lm3555.pdf
> 
> Effectively, the only sensible change seems to be:
> 
> -	tristate "LED support for LM355x Chips, LM3554 and LM3556"
> +	tristate "LED support for LM3554 and LM3556 chips"
>  	depends on LEDS_CLASS && I2C
>  	select REGMAP_I2C
>  	help
> -	  This option enables support for LEDs connected to LM355x.
> -	  LM355x includes Torch, Flash and Indicator functions.
> +	  This option enables support for LEDs connected to LM3554
> +	  and LM3556. It includes Torch, Flash and Indicator
> functions.

I like patch Pavel sent previously. It feels more comprehensive than
this one.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v1] leds: Clarify supported chips by LM355x driver
  2018-01-30 11:08       ` Andy Shevchenko
@ 2018-01-30 20:04         ` Jacek Anaszewski
  2018-02-01 20:26           ` [PATCH v2] " Pavel Machek
  0 siblings, 1 reply; 14+ messages in thread
From: Jacek Anaszewski @ 2018-01-30 20:04 UTC (permalink / raw)
  To: Andy Shevchenko, Richard Purdie, Pavel Machek, linux-leds,
	Sakari Ailus

On 01/30/2018 12:08 PM, Andy Shevchenko wrote:
> On Mon, 2018-01-29 at 21:46 +0100, Jacek Anaszewski wrote:
>> On 01/28/2018 03:30 PM, Andy Shevchenko wrote:
>>> On Fri, 2018-01-26 at 21:39 +0100, Jacek Anaszewski wrote:
>>>> On 01/26/2018 08:38 AM, Andy Shevchenko wrote:
>>>>> +	  Note, LM3555 is driven by AS3645A.
>>>>
>>>> Could you please provide more details on this relationship?
>>>> Looking at the datasheet it seems that both chips are standalone
>>>> and controlled via I2C and/or via GPIO in case of LM3555.
>>>
>>> The only difference I see looking in datasheets again that AS3645A
>>> supports dual-led mode, by using STROBE signal in case of parallel
>>> interface or thru additional bits in I2C mode.
>>>
>>> Can you be more specific what exactly makes you feel that they are
>>> not
>>> compatible?
>>
>> The expression "LM3555 is driven by AS3645A" brings on mind rather
>> some type of hardware dependency between chips than drivers
>> similarity.
>>
>> Now I understand that you meant that both devices can be driven by any
>> of leds-lm355x or leds-as3645a driver, am I right?
> 
> No. The chip in question is LM3555, and it's handled only in as3645a
> driver.
> 
>> I suspected that I got something entirely wrong here, especially
>> that both you and Pavel agreed.
>>
>> But, given that it turned out that leds-lm355x.c doesn't support
>> LM3555 and its documentation [3] indeed shows the affinity with
>> AS3645, I suppose that this patch is a result of a premature
>> conclusion drawn basing on the driver's description rather than its
>> capabilities.
>>
>> [3] http://www.ti.com/lit/ds/symlink/lm3555.pdf
>>
>> Effectively, the only sensible change seems to be:
>>
>> -	tristate "LED support for LM355x Chips, LM3554 and LM3556"
>> +	tristate "LED support for LM3554 and LM3556 chips"
>>  	depends on LEDS_CLASS && I2C
>>  	select REGMAP_I2C
>>  	help
>> -	  This option enables support for LEDs connected to LM355x.
>> -	  LM355x includes Torch, Flash and Indicator functions.
>> +	  This option enables support for LEDs connected to LM3554
>> +	  and LM3556. It includes Torch, Flash and Indicator
>> functions.
> 
> I like patch Pavel sent previously. It feels more comprehensive than
> this one.

Right. The patch subject and description will have to be tweaked a bit
then. I'll apply it once it is officially submitted.

-- 
Best regards,
Jacek Anaszewski

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

* [PATCH v2] leds: Clarify supported chips by LM355x driver
  2018-01-30 20:04         ` Jacek Anaszewski
@ 2018-02-01 20:26           ` Pavel Machek
  2018-02-01 21:33             ` Jacek Anaszewski
  0 siblings, 1 reply; 14+ messages in thread
From: Pavel Machek @ 2018-02-01 20:26 UTC (permalink / raw)
  To: Jacek Anaszewski
  Cc: Andy Shevchenko, Richard Purdie, linux-leds, Sakari Ailus

[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]

Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Clarify which controllers are supported by which driver.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 318a28f..9a538de 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -69,7 +69,7 @@ config LEDS_APU
 	  module will be called leds-apu.
 
 config LEDS_AS3645A
-	tristate "AS3645A LED flash controller support"
+	tristate "AS3645A and LM3555 LED flash controllers support"
 	depends on I2C && LEDS_CLASS_FLASH
 	depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
 	help
@@ -587,12 +587,12 @@ config LEDS_MAX8997
 	  MAXIM MAX8997 PMIC.
 
 config LEDS_LM355x
-	tristate "LED support for LM355x Chips, LM3554 and LM3556"
+	tristate "LED support for LM3554 and LM3556 chips"
 	depends on LEDS_CLASS && I2C
 	select REGMAP_I2C
 	help
-	  This option enables support for LEDs connected to LM355x.
-	  LM355x includes Torch, Flash and Indicator functions.
+	  This option enables support for LEDs connected to LM3554
+	  and LM3556. It includes Torch, Flash and Indicator functions.
 
 config LEDS_OT200
 	tristate "LED support for the Bachmann OT200"

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* Re: [PATCH v2] leds: Clarify supported chips by LM355x driver
  2018-02-01 20:26           ` [PATCH v2] " Pavel Machek
@ 2018-02-01 21:33             ` Jacek Anaszewski
  0 siblings, 0 replies; 14+ messages in thread
From: Jacek Anaszewski @ 2018-02-01 21:33 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Andy Shevchenko, Richard Purdie, linux-leds, Sakari Ailus

Hi Pavel,

Thanks for the update.

On 02/01/2018 09:26 PM, Pavel Machek wrote:
> Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Clarify which controllers are supported by which driver.
> 
> Signed-off-by: Pavel Machek <pavel@ucw.cz>
> 
> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
> index 318a28f..9a538de 100644
> --- a/drivers/leds/Kconfig
> +++ b/drivers/leds/Kconfig
> @@ -69,7 +69,7 @@ config LEDS_APU
>  	  module will be called leds-apu.
>  
>  config LEDS_AS3645A
> -	tristate "AS3645A LED flash controller support"
> +	tristate "AS3645A and LM3555 LED flash controllers support"
>  	depends on I2C && LEDS_CLASS_FLASH
>  	depends on V4L2_FLASH_LED_CLASS || !V4L2_FLASH_LED_CLASS
>  	help
> @@ -587,12 +587,12 @@ config LEDS_MAX8997
>  	  MAXIM MAX8997 PMIC.
>  
>  config LEDS_LM355x
> -	tristate "LED support for LM355x Chips, LM3554 and LM3556"
> +	tristate "LED support for LM3554 and LM3556 chips"
>  	depends on LEDS_CLASS && I2C
>  	select REGMAP_I2C
>  	help
> -	  This option enables support for LEDs connected to LM355x.
> -	  LM355x includes Torch, Flash and Indicator functions.
> +	  This option enables support for LEDs connected to LM3554
> +	  and LM3556. It includes Torch, Flash and Indicator functions.
>  
>  config LEDS_OT200
>  	tristate "LED support for the Bachmann OT200"
> 

Applied to the for-4.17 branch.

-- 
Best regards,
Jacek Anaszewski

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

end of thread, other threads:[~2018-02-01 21:34 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-26  7:38 [PATCH v1] leds: Clarify supported chips by LM355x driver Andy Shevchenko
2018-01-26 10:25 ` Pavel Machek
2018-01-26 11:44   ` Andy Shevchenko
2018-01-26 21:05     ` Pavel Machek
2018-01-26 21:32   ` Pavel Machek
2018-01-26 22:07     ` Sakari Ailus
2018-01-28 14:18     ` Andy Shevchenko
2018-01-26 20:39 ` Jacek Anaszewski
2018-01-28 14:30   ` Andy Shevchenko
2018-01-29 20:46     ` Jacek Anaszewski
2018-01-30 11:08       ` Andy Shevchenko
2018-01-30 20:04         ` Jacek Anaszewski
2018-02-01 20:26           ` [PATCH v2] " Pavel Machek
2018-02-01 21:33             ` Jacek Anaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.