Skip to contentSkip to conversation

drivers/mfd: simple-mfd-i2c: Add generic compatible

PATCH In review Jesse Taube 3 participants 9 messages Dec 2, 2022 – Jan 26, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drivers/mfd: simple-mfd-i2c: Add generic compatible

Some devices may want to use this driver without having a specific compatible string. Add a generic compatible string to allow this.

---
 drivers/mfd/simple-mfd-i2c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/simple-mfd-i2c.c +1 -0
index f4c8fc3ee463..0bda0dd9276e 100644
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
 };
 
 static const struct of_device_id simple_mfd_i2c_of_match[] = {
+	{ .compatible = "simple-mfd-i2c-generic" },
 	{ .compatible = "kontron,sl28cpld" },
 	{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
 	{}
Signature · 1 line
2.38.1
#1 lore raw

Are there any updates?

Quoted 20 lines · Jesse Taube

Some devices may want to use this driver without having a specific compatible string. Add a generic compatible string to allow this.

---
  drivers/mfd/simple-mfd-i2c.c | 1 +
  1 file changed, 1 insertion(+)
drivers/mfd/simple-mfd-i2c.c +1 -0
index f4c8fc3ee463..0bda0dd9276e 100644
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
  };
 
  static const struct of_device_id simple_mfd_i2c_of_match[] = {
+	{ .compatible = "simple-mfd-i2c-generic" },
  	{ .compatible = "kontron,sl28cpld" },
  	{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
  	{}
maintainer
#2 lore raw
Quoted 1 line · Jesse Taube

Are there any updates?

Please refrain from top-posting.

I'll get around to it after the merge-window has closed.

Quoted 20 lines · Jesse Taube
Quoted 19 lines

Some devices may want to use this driver without having a specific compatible string. Add a generic compatible string to allow this.

---
  drivers/mfd/simple-mfd-i2c.c | 1 +
  1 file changed, 1 insertion(+)
drivers/mfd/simple-mfd-i2c.c +1 -0
index f4c8fc3ee463..0bda0dd9276e 100644
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
  };
  static const struct of_device_id simple_mfd_i2c_of_match[] = {
+	{ .compatible = "simple-mfd-i2c-generic" },
  	{ .compatible = "kontron,sl28cpld" },
  	{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
  	{}
Signature · 1 line
Lee Jones [李琼斯]
maintainer
#3 lore raw
In reply to Jesse Taube
Quoted 7 lines · Jesse Taube

Some devices may want to use this driver without having a specific compatible string. Add a generic compatible string to allow this.

---
 drivers/mfd/simple-mfd-i2c.c | 1 +
 1 file changed, 1 insertion(+)

Sounds like a good idea. I've changed the subject line a little (no need to say 'drivers') and applied the patch, thanks.

Quoted 15 lines
drivers/mfd/simple-mfd-i2c.c +1 -0
index f4c8fc3ee463..0bda0dd9276e 100644
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
 };
 
 static const struct of_device_id simple_mfd_i2c_of_match[] = {
+	{ .compatible = "simple-mfd-i2c-generic" },
 	{ .compatible = "kontron,sl28cpld" },
 	{ .compatible = "silergy,sy7636a", .data = &silergy_sy7636a},
 	{}
Signature · 1 line
2.38.1
Signature · 1 line
Lee Jones [李琼斯]
#4 lore raw
In reply to Jesse Taube
Quoted 2 lines · Jesse Taube

Some devices may want to use this driver without having a specific compatible string. Add a generic compatible string to allow this.

What devices need this?

Is that no specific compatible string at all or just in the kernel? Because the former definitely goes against DT requirements. The latter enables the former without a schema.

Quoted 11 lines
---
 drivers/mfd/simple-mfd-i2c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/simple-mfd-i2c.c +0 -0
index f4c8fc3ee463..0bda0dd9276e 100644

drivers/mfd/simple-mfd-i2c.c static const struct simple_mfd_data silergy_sy7636a = { · line 76

Quoted 4 lines
drivers/mfd/simple-mfd-i2c.c +1 -0
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
 };
 
 static const struct of_device_id simple_mfd_i2c_of_match[] = {
+	{ .compatible = "simple-mfd-i2c-generic" },

Simple and generic? There is no such device. Anywhere.

This is also not documented which is how I found it (make dt_compatible_check). But this should be reverted or dropped rather than documented IMO.

Rob

maintainer
#5 lore raw
Quoted 23 lines · Rob Herring
Quoted 2 lines · Jesse Taube

Some devices may want to use this driver without having a specific compatible string. Add a generic compatible string to allow this.

What devices need this?

Is that no specific compatible string at all or just in the kernel? Because the former definitely goes against DT requirements. The latter enables the former without a schema.

Quoted 13 lines
---
 drivers/mfd/simple-mfd-i2c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/simple-mfd-i2c.c +0 -0
index f4c8fc3ee463..0bda0dd9276e 100644
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
 };
 
Quoted 8 lines

drivers/mfd/simple-mfd-i2c.c static const struct simple_mfd_data silergy_sy7636a = { · line 76

Quoted 2 lines
drivers/mfd/simple-mfd-i2c.c +1 -0
 static const struct of_device_id simple_mfd_i2c_of_match[] = {
+	{ .compatible = "simple-mfd-i2c-generic" },

Simple and generic? There is no such device. Anywhere.

This is also not documented which is how I found it (make dt_compatible_check). But this should be reverted or dropped rather than documented IMO.

I thought it would be better than having a huge list here.

Devices should *also* be allocated a specific compatible string.

$ git grep simple-mfd -- arch
Signature · 1 line
Lee Jones [李琼斯]
#6 lore raw
Quoted 25 lines · Lee Jones
Quoted 23 lines · Rob Herring
Quoted 2 lines · Jesse Taube

Some devices may want to use this driver without having a specific compatible string. Add a generic compatible string to allow this.

What devices need this?

Is that no specific compatible string at all or just in the kernel? Because the former definitely goes against DT requirements. The latter enables the former without a schema.

Quoted 13 lines
---
  drivers/mfd/simple-mfd-i2c.c | 1 +
  1 file changed, 1 insertion(+)
drivers/mfd/simple-mfd-i2c.c +0 -0
index f4c8fc3ee463..0bda0dd9276e 100644
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
  };
 
Quoted 7 lines
Quoted 7 lines

drivers/mfd/simple-mfd-i2c.c static const struct simple_mfd_data silergy_sy7636a = { · line 76

Quoted 2 lines
drivers/mfd/simple-mfd-i2c.c +1 -0
  static const struct of_device_id simple_mfd_i2c_of_match[] = {
+	{ .compatible = "simple-mfd-i2c-generic" },

Simple and generic? There is no such device. Anywhere.

This is also not documented which is how I found it (make dt_compatible_check).

I will write docs if needed.
But this should be reverted or dropped rather than

Quoted 1 line
Quoted 1 line

documented IMO.

Hi Rob, sorry for the disturbance. The reason I submitted this patch is this driver is generic and can be used by many different devices. Adding a generic compatible handle allows device tree writers avoid editing the
C source. I also will be submitting device trees that use this in the
future if added.
Thanks,
Jesse Taube

Quoted 7 lines

I thought it would be better than having a huge list here.

Devices should *also* be allocated a specific compatible string.

$ git grep simple-mfd -- arch
#7 lore raw
In reply to Lee Jones
Quoted 31 lines · Lee Jones
Quoted 28 lines · Rob Herring
Quoted 2 lines · Jesse Taube

Some devices may want to use this driver without having a specific compatible string. Add a generic compatible string to allow this.

What devices need this?

Is that no specific compatible string at all or just in the kernel? Because the former definitely goes against DT requirements. The latter enables the former without a schema.

Quoted 11 lines
---
 drivers/mfd/simple-mfd-i2c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/simple-mfd-i2c.c +0 -0
index f4c8fc3ee463..0bda0dd9276e 100644

drivers/mfd/simple-mfd-i2c.c static const struct simple_mfd_data silergy_sy7636a = { · line 76

Quoted 4 lines
drivers/mfd/simple-mfd-i2c.c +1 -0
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
 };
 
 static const struct of_device_id simple_mfd_i2c_of_match[] = {
+   { .compatible = "simple-mfd-i2c-generic" },

Simple and generic? There is no such device. Anywhere.

Quoted 5 lines
Quoted 3 lines

This is also not documented which is how I found it (make dt_compatible_check). But this should be reverted or dropped rather than documented IMO.

I thought it would be better than having a huge list here.

What indication is there that the list would be huge? We have 2 out of 137 MFD bindings. Usually if the MFD is simple, we'd make it a single node. It just needs to be clear what the conditions are for using it.

Quoted 3 lines

Devices should *also* be allocated a specific compatible string.

$ git grep simple-mfd -- arch

Why can't simple-mfd be used here?

Rob

maintainer
#8 lore raw
Quoted 42 lines · Rob Herring
Quoted 31 lines · Lee Jones
Quoted 28 lines · Rob Herring
Quoted 2 lines · Jesse Taube

Some devices may want to use this driver without having a specific compatible string. Add a generic compatible string to allow this.

What devices need this?

Is that no specific compatible string at all or just in the kernel? Because the former definitely goes against DT requirements. The latter enables the former without a schema.

Quoted 11 lines
---
 drivers/mfd/simple-mfd-i2c.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mfd/simple-mfd-i2c.c +0 -0
index f4c8fc3ee463..0bda0dd9276e 100644

drivers/mfd/simple-mfd-i2c.c static const struct simple_mfd_data silergy_sy7636a = { · line 76

Quoted 4 lines
drivers/mfd/simple-mfd-i2c.c +1 -0
@@ -73,6 +73,7 @@ static const struct simple_mfd_data silergy_sy7636a = {
 };
 
 static const struct of_device_id simple_mfd_i2c_of_match[] = {
+   { .compatible = "simple-mfd-i2c-generic" },

Simple and generic? There is no such device. Anywhere.

Quoted 5 lines
Quoted 3 lines

This is also not documented which is how I found it (make dt_compatible_check). But this should be reverted or dropped rather than documented IMO.

I thought it would be better than having a huge list here.

What indication is there that the list would be huge? We have 2 out of 137 MFD bindings. Usually if the MFD is simple, we'd make it a single node. It just needs to be clear what the conditions are for using it.

Quoted 5 lines
Quoted 3 lines

Devices should *also* be allocated a specific compatible string.

$ git grep simple-mfd -- arch

Why can't simple-mfd be used here?

Until this is clarified, agreed and documented, I'm dropping the patch.

Signature · 1 line
Lee Jones [李琼斯]