devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] leds: pca955x: Add IBM software implemenation of the PCA9552 chip
@ 2020-08-03 14:50 Eddie James
  2020-08-03 14:50 ` [PATCH v2 1/2] dt-bindings: leds: pca955x: Add IBM implementation compatible string Eddie James
  2020-08-03 14:50 ` [PATCH v2 2/2] leds: pca955x: Add an IBM software implementation of the PCA9552 chip Eddie James
  0 siblings, 2 replies; 8+ messages in thread
From: Eddie James @ 2020-08-03 14:50 UTC (permalink / raw)
  To: linux-leds
  Cc: linux-kernel, devicetree, robh+dt, dmurphy, pavel,
	jacek.anaszewski, vishwa, andy.shevchenko, eajames

IBM created an implementation of the PCA9552 on a PIC16F
microcontroller. The I2C device addresses are different from the
hardware PCA9552, so add a new compatible string and associated
platform data to be able to probe this device, and document the new
string.

Changes since v1:
 - Switch the vendor part of the compatible string to ibm
 - Change the enum in the driver to be ibm_<part no>

Eddie James (2):
  dt-bindings: leds: pca955x: Add IBM implementation compatible string
  leds: pca955x: Add an IBM software implementation of the PCA9552 chip

 Documentation/devicetree/bindings/leds/leds-pca955x.txt | 1 +
 drivers/leds/leds-pca955x.c                             | 8 ++++++++
 2 files changed, 9 insertions(+)

-- 
2.24.0


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

* [PATCH v2 1/2] dt-bindings: leds: pca955x: Add IBM implementation compatible string
  2020-08-03 14:50 [PATCH v2 0/2] leds: pca955x: Add IBM software implemenation of the PCA9552 chip Eddie James
@ 2020-08-03 14:50 ` Eddie James
  2020-08-12 19:57   ` Rob Herring
  2020-08-03 14:50 ` [PATCH v2 2/2] leds: pca955x: Add an IBM software implementation of the PCA9552 chip Eddie James
  1 sibling, 1 reply; 8+ messages in thread
From: Eddie James @ 2020-08-03 14:50 UTC (permalink / raw)
  To: linux-leds
  Cc: linux-kernel, devicetree, robh+dt, dmurphy, pavel,
	jacek.anaszewski, vishwa, andy.shevchenko, eajames

IBM created an implementation of the PCA9552 on a PIC16F
microcontroller. Document the new compatible string for this device.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
 Documentation/devicetree/bindings/leds/leds-pca955x.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/leds/leds-pca955x.txt b/Documentation/devicetree/bindings/leds/leds-pca955x.txt
index 7a5830f8d5ab..817f460f3a72 100644
--- a/Documentation/devicetree/bindings/leds/leds-pca955x.txt
+++ b/Documentation/devicetree/bindings/leds/leds-pca955x.txt
@@ -9,6 +9,7 @@ Required properties:
 	"nxp,pca9550"
 	"nxp,pca9551"
 	"nxp,pca9552"
+	"ibm,pca9552"
 	"nxp,pca9553"
 - #address-cells: must be 1
 - #size-cells: must be 0
-- 
2.24.0


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

* [PATCH v2 2/2] leds: pca955x: Add an IBM software implementation of the PCA9552 chip
  2020-08-03 14:50 [PATCH v2 0/2] leds: pca955x: Add IBM software implemenation of the PCA9552 chip Eddie James
  2020-08-03 14:50 ` [PATCH v2 1/2] dt-bindings: leds: pca955x: Add IBM implementation compatible string Eddie James
@ 2020-08-03 14:50 ` Eddie James
  2020-08-03 16:42   ` Andy Shevchenko
  2020-08-07  8:15   ` Pavel Machek
  1 sibling, 2 replies; 8+ messages in thread
From: Eddie James @ 2020-08-03 14:50 UTC (permalink / raw)
  To: linux-leds
  Cc: linux-kernel, devicetree, robh+dt, dmurphy, pavel,
	jacek.anaszewski, vishwa, andy.shevchenko, eajames

IBM created an implementation of the PCA9552 on a PIC16F
microcontroller. The I2C device addresses are different from the
hardware PCA9552, so add a new compatible string and associated
platform data to be able to probe this device.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
---
 drivers/leds/leds-pca955x.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/leds/leds-pca955x.c b/drivers/leds/leds-pca955x.c
index 131f8e922ade..7087ca4592fc 100644
--- a/drivers/leds/leds-pca955x.c
+++ b/drivers/leds/leds-pca955x.c
@@ -65,6 +65,7 @@ enum pca955x_type {
 	pca9550,
 	pca9551,
 	pca9552,
+	ibm_pca9552,
 	pca9553,
 };
 
@@ -90,6 +91,11 @@ static struct pca955x_chipdef pca955x_chipdefs[] = {
 		.slv_addr	= /* 1100xxx */ 0x60,
 		.slv_addr_shift	= 3,
 	},
+	[ibm_pca9552] = {
+		.bits		= 16,
+		.slv_addr	= /* 0110xxx */ 0x30,
+		.slv_addr_shift	= 3,
+	},
 	[pca9553] = {
 		.bits		= 4,
 		.slv_addr	= /* 110001x */ 0x62,
@@ -101,6 +107,7 @@ static const struct i2c_device_id pca955x_id[] = {
 	{ "pca9550", pca9550 },
 	{ "pca9551", pca9551 },
 	{ "pca9552", pca9552 },
+	{ "ibm-pca9552", ibm_pca9552 },
 	{ "pca9553", pca9553 },
 	{ }
 };
@@ -412,6 +419,7 @@ static const struct of_device_id of_pca955x_match[] = {
 	{ .compatible = "nxp,pca9550", .data = (void *)pca9550 },
 	{ .compatible = "nxp,pca9551", .data = (void *)pca9551 },
 	{ .compatible = "nxp,pca9552", .data = (void *)pca9552 },
+	{ .compatible = "ibm,pca9552", .data = (void *)ibm_pca9552 },
 	{ .compatible = "nxp,pca9553", .data = (void *)pca9553 },
 	{},
 };
-- 
2.24.0


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

* Re: [PATCH v2 2/2] leds: pca955x: Add an IBM software implementation of the PCA9552 chip
  2020-08-03 14:50 ` [PATCH v2 2/2] leds: pca955x: Add an IBM software implementation of the PCA9552 chip Eddie James
@ 2020-08-03 16:42   ` Andy Shevchenko
  2020-08-03 20:51     ` Pavel Machek
  2020-08-07  8:15   ` Pavel Machek
  1 sibling, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2020-08-03 16:42 UTC (permalink / raw)
  To: Eddie James
  Cc: Linux LED Subsystem, Linux Kernel Mailing List, devicetree,
	Rob Herring, Dan Murphy, Pavel Machek, Jacek Anaszewski, vishwa

On Mon, Aug 3, 2020 at 5:51 PM Eddie James <eajames@linux.ibm.com> wrote:
>
> IBM created an implementation of the PCA9552 on a PIC16F
> microcontroller. The I2C device addresses are different from the
> hardware PCA9552, so add a new compatible string and associated
> platform data to be able to probe this device.

...

>         pca9550,
>         pca9551,
>         pca9552,
> +       ibm_pca9552,
>         pca9553,

I would rather not mix like this, but use alpha order, for example.
It's better to read and see which devices are supported by vendor.

...

>         },

> +       [ibm_pca9552] = {

> +       },
>         [pca9553] = {

Ditto.

...

>         { "pca9550", pca9550 },
>         { "pca9551", pca9551 },
>         { "pca9552", pca9552 },
> +       { "ibm-pca9552", ibm_pca9552 },
>         { "pca9553", pca9553 },

Ditto.

...

>         { .compatible = "nxp,pca9550", .data = (void *)pca9550 },
>         { .compatible = "nxp,pca9551", .data = (void *)pca9551 },
>         { .compatible = "nxp,pca9552", .data = (void *)pca9552 },
> +       { .compatible = "ibm,pca9552", .data = (void *)ibm_pca9552 },
>         { .compatible = "nxp,pca9553", .data = (void *)pca9553 },

Ditto.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v2 2/2] leds: pca955x: Add an IBM software implementation of the PCA9552 chip
  2020-08-03 16:42   ` Andy Shevchenko
@ 2020-08-03 20:51     ` Pavel Machek
  0 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2020-08-03 20:51 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Eddie James, Linux LED Subsystem, Linux Kernel Mailing List,
	devicetree, Rob Herring, Dan Murphy, Jacek Anaszewski, vishwa

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

On Mon 2020-08-03 19:42:17, Andy Shevchenko wrote:
> On Mon, Aug 3, 2020 at 5:51 PM Eddie James <eajames@linux.ibm.com> wrote:
> >
> > IBM created an implementation of the PCA9552 on a PIC16F
> > microcontroller. The I2C device addresses are different from the
> > hardware PCA9552, so add a new compatible string and associated
> > platform data to be able to probe this device.
> 
> ...
> 
> >         pca9550,
> >         pca9551,
> >         pca9552,
> > +       ibm_pca9552,
> >         pca9553,
> 
> I would rather not mix like this, but use alpha order, for example.
> It's better to read and see which devices are supported by vendor.

Actually I see no huge reason to change that. pca9552 and ibm_pca9552
should be very similar, so it makes sense to keep them close together.
									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] 8+ messages in thread

* Re: [PATCH v2 2/2] leds: pca955x: Add an IBM software implementation of the PCA9552 chip
  2020-08-03 14:50 ` [PATCH v2 2/2] leds: pca955x: Add an IBM software implementation of the PCA9552 chip Eddie James
  2020-08-03 16:42   ` Andy Shevchenko
@ 2020-08-07  8:15   ` Pavel Machek
  1 sibling, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2020-08-07  8:15 UTC (permalink / raw)
  To: Eddie James
  Cc: linux-leds, linux-kernel, devicetree, robh+dt, dmurphy,
	jacek.anaszewski, vishwa, andy.shevchenko

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

On Mon 2020-08-03 09:50:55, Eddie James wrote:
> IBM created an implementation of the PCA9552 on a PIC16F
> microcontroller. The I2C device addresses are different from the
> hardware PCA9552, so add a new compatible string and associated
> platform data to be able to probe this device.
> 
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> Reviewed-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>

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

This can be applied when Rob ack's the device tree change.

I'll ask you to do new patch version when that happens.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [PATCH v2 1/2] dt-bindings: leds: pca955x: Add IBM implementation compatible string
  2020-08-03 14:50 ` [PATCH v2 1/2] dt-bindings: leds: pca955x: Add IBM implementation compatible string Eddie James
@ 2020-08-12 19:57   ` Rob Herring
  2020-08-17 20:25     ` Pavel Machek
  0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2020-08-12 19:57 UTC (permalink / raw)
  To: Eddie James
  Cc: vishwa, andy.shevchenko, robh+dt, linux-leds, pavel, devicetree,
	linux-kernel, dmurphy, jacek.anaszewski

On Mon, 03 Aug 2020 09:50:54 -0500, Eddie James wrote:
> IBM created an implementation of the PCA9552 on a PIC16F
> microcontroller. Document the new compatible string for this device.
> 
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> ---
>  Documentation/devicetree/bindings/leds/leds-pca955x.txt | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v2 1/2] dt-bindings: leds: pca955x: Add IBM implementation compatible string
  2020-08-12 19:57   ` Rob Herring
@ 2020-08-17 20:25     ` Pavel Machek
  0 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2020-08-17 20:25 UTC (permalink / raw)
  To: Rob Herring
  Cc: Eddie James, vishwa, andy.shevchenko, robh+dt, linux-leds,
	devicetree, linux-kernel, dmurphy, jacek.anaszewski

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

On Wed 2020-08-12 13:57:47, Rob Herring wrote:
> On Mon, 03 Aug 2020 09:50:54 -0500, Eddie James wrote:
> > IBM created an implementation of the PCA9552 on a PIC16F
> > microcontroller. Document the new compatible string for this device.
> > 
> > Signed-off-by: Eddie James <eajames@linux.ibm.com>
> > ---
> >  Documentation/devicetree/bindings/leds/leds-pca955x.txt | 1 +
> >  1 file changed, 1 insertion(+)
> 
> Acked-by: Rob Herring <robh@kernel.org>

Thanks, I applied the series.

Best regards,
									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] 8+ messages in thread

end of thread, other threads:[~2020-08-17 20:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-03 14:50 [PATCH v2 0/2] leds: pca955x: Add IBM software implemenation of the PCA9552 chip Eddie James
2020-08-03 14:50 ` [PATCH v2 1/2] dt-bindings: leds: pca955x: Add IBM implementation compatible string Eddie James
2020-08-12 19:57   ` Rob Herring
2020-08-17 20:25     ` Pavel Machek
2020-08-03 14:50 ` [PATCH v2 2/2] leds: pca955x: Add an IBM software implementation of the PCA9552 chip Eddie James
2020-08-03 16:42   ` Andy Shevchenko
2020-08-03 20:51     ` Pavel Machek
2020-08-07  8:15   ` Pavel Machek

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).