Skip to contentSkip to conversation

i2c: qup: use generic device property accessors

PATCH Applied Bartosz Golaszewski 5 participants 12 messages Oct 8, 2024 – Dec 3, 2024

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

PATCH 1/1 i2c: qup: use generic device property accessors

From: Bartosz Golaszewski <[email protected]>

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

---
 drivers/i2c/busses/i2c-qup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-qup.c +2 -2
index 86ec391616b0..da20b4487c9a 100644
@@ -17,9 +17,9 @@
 #include <linux/interrupt.h>
 #include <linux/io.h>
 #include <linux/module.h>
-#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
+#include <linux/property.h>
 #include <linux/scatterlist.h>
 
 /* QUP Registers */
@@ -1683,7 +1683,7 @@ static int qup_i2c_probe(struct platform_device *pdev)
 		}
 	}
 
-	if (of_device_is_compatible(pdev->dev.of_node, "qcom,i2c-qup-v1.1.1")) {
+	if (device_is_compatible(&pdev->dev, "qcom,i2c-qup-v1.1.1")) {
 		qup->adap.algo = &qup_i2c_algo;
 		qup->adap.quirks = &qup_i2c_quirks;
 		is_qup_v1 = true;
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#2 lore raw
In reply to Bartosz Golaszewski
Quoted 27 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

---
  drivers/i2c/busses/i2c-qup.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-qup.c +1 -1
index 86ec391616b0..da20b4487c9a 100644
@@ -17,9 +17,9 @@
  #include <linux/interrupt.h>
  #include <linux/io.h>
  #include <linux/module.h>
-#include <linux/of.h>
  #include <linux/platform_device.h>
  #include <linux/pm_runtime.h>
+#include <linux/property.h>
  #include <linux/scatterlist.h>
 
  /* QUP Registers */

drivers/i2c/busses/i2c-qup.c static int qup_i2c_probe(struct platform_device *pdev) · line 1689

Quoted 8 lines
drivers/i2c/busses/i2c-qup.c +1 -1
@@ -1683,7 +1683,7 @@ static int qup_i2c_probe(struct platform_device *pdev)
  		}
  	}
 
-	if (of_device_is_compatible(pdev->dev.of_node, "qcom,i2c-qup-v1.1.1")) {
+	if (device_is_compatible(&pdev->dev, "qcom,i2c-qup-v1.1.1")) {
  		qup->adap.algo = &qup_i2c_algo;
  		qup->adap.quirks = &qup_i2c_quirks;
  		is_qup_v1 = true;

LGTM

#3 lore raw
Quoted 8 lines · On Tue, Oct 22, 2024 at 2:05 PM <[email protected]> wrote:
Quoted 6 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

Quoted 5 lines
Quoted 1 line

LGTM

Andi, can you pick this up, please?

Bart

#4 lore raw
Quoted 12 lines · Bartosz Golaszewski
Quoted 10 lines · On Tue, Oct 22, 2024 at 2:05 PM <[email protected]> wrote:
Quoted 7 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

Quoted 7 lines
Quoted 3 lines

LGTM

Andi, can you pick this up, please?

Bart

Any reason why this simple change cannot be picked up?

Bartosz

#5 lore raw
Quoted 18 lines · Bartosz Golaszewski
Quoted 16 lines · Bartosz Golaszewski
Quoted 13 lines · On Tue, Oct 22, 2024 at 2:05 PM <[email protected]> wrote:
Quoted 7 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

LGTM

Quoted 7 lines
Quoted 3 lines

Andi, can you pick this up, please?

Bart

Any reason why this simple change cannot be picked up?

Bartosz

I'll take it through my tree for v6.13 if there's no response in the following days.

Bart

author Applied
#6 lore raw
In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Quoted 5 lines · Bartosz Golaszewski

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

Applied, to the GPIO tree as the maintainer has been unresposive for two months and the change is trivial.

[1/1] i2c: qup: use generic device property accessors

      commit: 400913bd4edd76ef1775bfd95543846bd6f5ed71

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>
#7 lore raw
Quoted 10 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Quoted 5 lines · Bartosz Golaszewski

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

Quoted 5 lines

Applied, to the GPIO tree as the maintainer has been unresposive for two months and the change is trivial.

[1/1] i2c: qup: use generic device property accessors

      commit: 400913bd4edd76ef1775bfd95543846bd6f5ed71

I think it's a bad idea to pull unrelated patches just because you have a GPIO tree.

Signature · 2 lines
With best wishes
Dmitry
#8 lore raw
Quoted 12 lines · Dmitry Baryshkov
Quoted 10 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Quoted 5 lines · Bartosz Golaszewski

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

Quoted 9 lines
Quoted 5 lines

Applied, to the GPIO tree as the maintainer has been unresposive for two months and the change is trivial.

[1/1] i2c: qup: use generic device property accessors

      commit: 400913bd4edd76ef1775bfd95543846bd6f5ed71

I think it's a bad idea to pull unrelated patches just because you have a GPIO tree.

I know. I dropped it. But I have no idea what the recourse is if you have reviewed trivial refactorings that get stuck on the list forever because the maintainer whose address otherwise doesn't bounce and who is active on the list just chooses not to respond for weeks. There don't seem to be written rules on this.

Greg: Can you take it instead?

Bart

#9 lore raw
Quoted 2 lines

Greg: Can you take it instead?

I pinged Andi also. If not, I will take it. Don't take it personally. Simply patches overload.

maintainer Applied
#10 lore raw
In reply to Bartosz Golaszewski

Hi Bartosz,

Quoted 7 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

this whole thread has gone off my radar, I'm sorry to have missed this. Thanks Wolfram for bringing this to my attention.

Merged to i2c/i2c-host.

Andi

#11 lore raw
Quoted 10 lines · Andi Shyti

Hi Bartosz,

Quoted 6 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

There's no reason for this driver to use OF-specific property helpers. Drop the last one in favor of the generic variant and no longer include of.h.

Quoted 8 lines
Quoted 1 line

this whole thread has gone off my radar, I'm sorry to have missed this. Thanks Wolfram for bringing this to my attention.

Merged to i2c/i2c-host.

Andi

Hi Andi,

This now shows up in mainline as commit 50b9d43e6ceaa ("i2c: qup: use generic device property accessors") and in next there's a duplicate commit 6f5f581b577b4 ("i2c: qup: use generic device property accessors"). I think you should drop the latter from your branch.

Bart