All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Misc qcom geni i2c driver fixes
@ 2020-02-04 19:31 Stephen Boyd
  2020-02-04 19:31 ` [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags Stephen Boyd
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Stephen Boyd @ 2020-02-04 19:31 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Andy Gross, Bjorn Andersson, linux-i2c, linux-arm-msm

Here's a small collection of qcom geni i2c driver fixes that
simplify the code and aid debugging.

Stephen Boyd (3):
  i2c: qcom-geni: Let firmware specify irq trigger flags
  i2c: qcom-geni: Grow a dev pointer to simplify code
  i2c: qcom-geni: Drop of_platform.h include

 drivers/i2c/busses/i2c-qcom-geni.c | 54 ++++++++++++++----------------
 1 file changed, 25 insertions(+), 29 deletions(-)

-- 
Sent by a computer, using git, on the internet


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

* [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags
  2020-02-04 19:31 [PATCH 0/3] Misc qcom geni i2c driver fixes Stephen Boyd
@ 2020-02-04 19:31 ` Stephen Boyd
  2020-02-04 21:05   ` Brendan Higgins
                     ` (2 more replies)
  2020-02-04 19:31 ` [PATCH 2/3] i2c: qcom-geni: Grow a dev pointer to simplify code Stephen Boyd
  2020-02-04 19:31 ` [PATCH 3/3] i2c: qcom-geni: Drop of_platform.h include Stephen Boyd
  2 siblings, 3 replies; 12+ messages in thread
From: Stephen Boyd @ 2020-02-04 19:31 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Andy Gross, Bjorn Andersson, linux-i2c,
	linux-arm-msm, Girish Mahadevan, Dilip Kota, Alok Chauhan,
	Douglas Anderson

We don't need to force IRQF_TRIGGER_HIGH here as the DT or ACPI tables
should take care of this for us. Just use 0 instead so that we use the
flags from the firmware. Also, remove specify dev_name() for the irq
name so that we can get better information in /proc/interrupts about
which device is generating interrupts.

Cc: Girish Mahadevan <girishm@codeaurora.org>
Cc: Dilip Kota <dkota@codeaurora.org>
Cc: Alok Chauhan <alokc@codeaurora.org>
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/i2c/busses/i2c-qcom-geni.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index 17abf60c94ae..3e13b54ce3f8 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -549,8 +549,8 @@ static int geni_i2c_probe(struct platform_device *pdev)
 	init_completion(&gi2c->done);
 	spin_lock_init(&gi2c->lock);
 	platform_set_drvdata(pdev, gi2c);
-	ret = devm_request_irq(&pdev->dev, gi2c->irq, geni_i2c_irq,
-			       IRQF_TRIGGER_HIGH, "i2c_geni", gi2c);
+	ret = devm_request_irq(dev, gi2c->irq, geni_i2c_irq, 0,
+			       dev_name(&pdev->dev), gi2c);
 	if (ret) {
 		dev_err(&pdev->dev, "Request_irq failed:%d: err:%d\n",
 			gi2c->irq, ret);
-- 
Sent by a computer, using git, on the internet


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

* [PATCH 2/3] i2c: qcom-geni: Grow a dev pointer to simplify code
  2020-02-04 19:31 [PATCH 0/3] Misc qcom geni i2c driver fixes Stephen Boyd
  2020-02-04 19:31 ` [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags Stephen Boyd
@ 2020-02-04 19:31 ` Stephen Boyd
  2020-02-04 21:14   ` Brendan Higgins
  2020-02-04 21:18   ` Doug Anderson
  2020-02-04 19:31 ` [PATCH 3/3] i2c: qcom-geni: Drop of_platform.h include Stephen Boyd
  2 siblings, 2 replies; 12+ messages in thread
From: Stephen Boyd @ 2020-02-04 19:31 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Andy Gross, Bjorn Andersson, linux-i2c,
	linux-arm-msm, Girish Mahadevan, Dilip Kota, Alok Chauhan,
	Douglas Anderson

Some lines are long here. Use a struct dev pointer to shorten lines and
simplify code. The clk_get() call can fail because of EPROBE_DEFER
problems too, so just remove the error print message because it isn't
useful.

Cc: Girish Mahadevan <girishm@codeaurora.org>
Cc: Dilip Kota <dkota@codeaurora.org>
Cc: Alok Chauhan <alokc@codeaurora.org>
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/i2c/busses/i2c-qcom-geni.c | 51 ++++++++++++++----------------
 1 file changed, 24 insertions(+), 27 deletions(-)

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index 3e13b54ce3f8..192a8f622f3d 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -502,45 +502,42 @@ static int geni_i2c_probe(struct platform_device *pdev)
 	struct resource *res;
 	u32 proto, tx_depth;
 	int ret;
+	struct device *dev = &pdev->dev;
 
-	gi2c = devm_kzalloc(&pdev->dev, sizeof(*gi2c), GFP_KERNEL);
+	gi2c = devm_kzalloc(dev, sizeof(*gi2c), GFP_KERNEL);
 	if (!gi2c)
 		return -ENOMEM;
 
-	gi2c->se.dev = &pdev->dev;
-	gi2c->se.wrapper = dev_get_drvdata(pdev->dev.parent);
+	gi2c->se.dev = dev;
+	gi2c->se.wrapper = dev_get_drvdata(dev->parent);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	gi2c->se.base = devm_ioremap_resource(&pdev->dev, res);
+	gi2c->se.base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(gi2c->se.base))
 		return PTR_ERR(gi2c->se.base);
 
-	gi2c->se.clk = devm_clk_get(&pdev->dev, "se");
-	if (IS_ERR(gi2c->se.clk) && !has_acpi_companion(&pdev->dev)) {
+	gi2c->se.clk = devm_clk_get(dev, "se");
+	if (IS_ERR(gi2c->se.clk) && !has_acpi_companion(dev)) {
 		ret = PTR_ERR(gi2c->se.clk);
-		dev_err(&pdev->dev, "Err getting SE Core clk %d\n", ret);
 		return ret;
 	}
 
-	ret = device_property_read_u32(&pdev->dev, "clock-frequency",
-							&gi2c->clk_freq_out);
+	ret = device_property_read_u32(dev, "clock-frequency",
+				       &gi2c->clk_freq_out);
 	if (ret) {
-		dev_info(&pdev->dev,
-			"Bus frequency not specified, default to 100kHz.\n");
+		dev_info(dev, "Bus frequency not specified, default to 100kHz.\n");
 		gi2c->clk_freq_out = KHZ(100);
 	}
 
-	if (has_acpi_companion(&pdev->dev))
-		ACPI_COMPANION_SET(&gi2c->adap.dev, ACPI_COMPANION(&pdev->dev));
+	if (has_acpi_companion(dev))
+		ACPI_COMPANION_SET(&gi2c->adap.dev, ACPI_COMPANION(dev));
 
 	gi2c->irq = platform_get_irq(pdev, 0);
-	if (gi2c->irq < 0) {
-		dev_err(&pdev->dev, "IRQ error for i2c-geni\n");
+	if (gi2c->irq < 0)
 		return gi2c->irq;
-	}
 
 	ret = geni_i2c_clk_map_idx(gi2c);
 	if (ret) {
-		dev_err(&pdev->dev, "Invalid clk frequency %d Hz: %d\n",
+		dev_err(dev, "Invalid clk frequency %d Hz: %d\n",
 			gi2c->clk_freq_out, ret);
 		return ret;
 	}
@@ -550,28 +547,28 @@ static int geni_i2c_probe(struct platform_device *pdev)
 	spin_lock_init(&gi2c->lock);
 	platform_set_drvdata(pdev, gi2c);
 	ret = devm_request_irq(dev, gi2c->irq, geni_i2c_irq, 0,
-			       dev_name(&pdev->dev), gi2c);
+			       dev_name(dev), gi2c);
 	if (ret) {
-		dev_err(&pdev->dev, "Request_irq failed:%d: err:%d\n",
+		dev_err(dev, "Request_irq failed:%d: err:%d\n",
 			gi2c->irq, ret);
 		return ret;
 	}
 	/* Disable the interrupt so that the system can enter low-power mode */
 	disable_irq(gi2c->irq);
 	i2c_set_adapdata(&gi2c->adap, gi2c);
-	gi2c->adap.dev.parent = &pdev->dev;
-	gi2c->adap.dev.of_node = pdev->dev.of_node;
+	gi2c->adap.dev.parent = dev;
+	gi2c->adap.dev.of_node = dev->of_node;
 	strlcpy(gi2c->adap.name, "Geni-I2C", sizeof(gi2c->adap.name));
 
 	ret = geni_se_resources_on(&gi2c->se);
 	if (ret) {
-		dev_err(&pdev->dev, "Error turning on resources %d\n", ret);
+		dev_err(dev, "Error turning on resources %d\n", ret);
 		return ret;
 	}
 	proto = geni_se_read_proto(&gi2c->se);
 	tx_depth = geni_se_get_tx_fifo_depth(&gi2c->se);
 	if (proto != GENI_SE_I2C) {
-		dev_err(&pdev->dev, "Invalid proto %d\n", proto);
+		dev_err(dev, "Invalid proto %d\n", proto);
 		geni_se_resources_off(&gi2c->se);
 		return -ENXIO;
 	}
@@ -581,11 +578,11 @@ static int geni_i2c_probe(struct platform_device *pdev)
 							true, true, true);
 	ret = geni_se_resources_off(&gi2c->se);
 	if (ret) {
-		dev_err(&pdev->dev, "Error turning off resources %d\n", ret);
+		dev_err(dev, "Error turning off resources %d\n", ret);
 		return ret;
 	}
 
-	dev_dbg(&pdev->dev, "i2c fifo/se-dma mode. fifo depth:%d\n", tx_depth);
+	dev_dbg(dev, "i2c fifo/se-dma mode. fifo depth:%d\n", tx_depth);
 
 	gi2c->suspended = 1;
 	pm_runtime_set_suspended(gi2c->se.dev);
@@ -595,12 +592,12 @@ static int geni_i2c_probe(struct platform_device *pdev)
 
 	ret = i2c_add_adapter(&gi2c->adap);
 	if (ret) {
-		dev_err(&pdev->dev, "Error adding i2c adapter %d\n", ret);
+		dev_err(dev, "Error adding i2c adapter %d\n", ret);
 		pm_runtime_disable(gi2c->se.dev);
 		return ret;
 	}
 
-	dev_dbg(&pdev->dev, "Geni-I2C adaptor successfully added\n");
+	dev_dbg(dev, "Geni-I2C adaptor successfully added\n");
 
 	return 0;
 }
-- 
Sent by a computer, using git, on the internet


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

* [PATCH 3/3] i2c: qcom-geni: Drop of_platform.h include
  2020-02-04 19:31 [PATCH 0/3] Misc qcom geni i2c driver fixes Stephen Boyd
  2020-02-04 19:31 ` [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags Stephen Boyd
  2020-02-04 19:31 ` [PATCH 2/3] i2c: qcom-geni: Grow a dev pointer to simplify code Stephen Boyd
@ 2020-02-04 19:31 ` Stephen Boyd
  2020-02-04 21:18   ` Doug Anderson
  2020-02-04 21:20   ` Brendan Higgins
  2 siblings, 2 replies; 12+ messages in thread
From: Stephen Boyd @ 2020-02-04 19:31 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Andy Gross, Bjorn Andersson, linux-i2c,
	linux-arm-msm, Girish Mahadevan, Dilip Kota, Alok Chauhan,
	Douglas Anderson

This driver doesn't call any DT platform functions like of_platform_*().
Remove the include as it isn't used.

Cc: Girish Mahadevan <girishm@codeaurora.org>
Cc: Dilip Kota <dkota@codeaurora.org>
Cc: Alok Chauhan <alokc@codeaurora.org>
Cc: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 drivers/i2c/busses/i2c-qcom-geni.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
index 192a8f622f3d..4378eb7b6633 100644
--- a/drivers/i2c/busses/i2c-qcom-geni.c
+++ b/drivers/i2c/busses/i2c-qcom-geni.c
@@ -10,7 +10,6 @@
 #include <linux/io.h>
 #include <linux/module.h>
 #include <linux/of.h>
-#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/qcom-geni-se.h>
-- 
Sent by a computer, using git, on the internet


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

* Re: [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags
  2020-02-04 19:31 ` [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags Stephen Boyd
@ 2020-02-04 21:05   ` Brendan Higgins
  2020-02-04 21:17   ` Doug Anderson
  2020-03-10  9:42   ` Wolfram Sang
  2 siblings, 0 replies; 12+ messages in thread
From: Brendan Higgins @ 2020-02-04 21:05 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Wolfram Sang, Linux Kernel Mailing List, Andy Gross,
	Bjorn Andersson, linux-i2c, linux-arm-msm, Girish Mahadevan,
	Dilip Kota, Alok Chauhan, Douglas Anderson

On Tue, Feb 4, 2020 at 11:32 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> We don't need to force IRQF_TRIGGER_HIGH here as the DT or ACPI tables
> should take care of this for us. Just use 0 instead so that we use the
> flags from the firmware. Also, remove specify dev_name() for the irq
> name so that we can get better information in /proc/interrupts about
> which device is generating interrupts.
>
> Cc: Girish Mahadevan <girishm@codeaurora.org>
> Cc: Dilip Kota <dkota@codeaurora.org>
> Cc: Alok Chauhan <alokc@codeaurora.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>

Seems pretty straightforward to me.

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

* Re: [PATCH 2/3] i2c: qcom-geni: Grow a dev pointer to simplify code
  2020-02-04 19:31 ` [PATCH 2/3] i2c: qcom-geni: Grow a dev pointer to simplify code Stephen Boyd
@ 2020-02-04 21:14   ` Brendan Higgins
  2020-02-04 21:18   ` Doug Anderson
  1 sibling, 0 replies; 12+ messages in thread
From: Brendan Higgins @ 2020-02-04 21:14 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Wolfram Sang, Linux Kernel Mailing List, Andy Gross,
	Bjorn Andersson, linux-i2c, linux-arm-msm, Girish Mahadevan,
	Dilip Kota, Alok Chauhan, Douglas Anderson

On Tue, Feb 4, 2020 at 11:32 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> Some lines are long here. Use a struct dev pointer to shorten lines and
> simplify code. The clk_get() call can fail because of EPROBE_DEFER
> problems too, so just remove the error print message because it isn't
> useful.
>
> Cc: Girish Mahadevan <girishm@codeaurora.org>
> Cc: Dilip Kota <dkota@codeaurora.org>
> Cc: Alok Chauhan <alokc@codeaurora.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>

I personally am indifferent to &pdev->dev vs. just dev, but not
printing an error in the case of a defer is a definite improvement.

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>

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

* Re: [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags
  2020-02-04 19:31 ` [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags Stephen Boyd
  2020-02-04 21:05   ` Brendan Higgins
@ 2020-02-04 21:17   ` Doug Anderson
  2020-03-10  9:42   ` Wolfram Sang
  2 siblings, 0 replies; 12+ messages in thread
From: Doug Anderson @ 2020-02-04 21:17 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Wolfram Sang, LKML, Andy Gross, Bjorn Andersson, linux-i2c,
	linux-arm-msm, Girish Mahadevan, Dilip Kota, Alok Chauhan

Hi,

On Tue, Feb 4, 2020 at 11:31 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> We don't need to force IRQF_TRIGGER_HIGH here as the DT or ACPI tables
> should take care of this for us. Just use 0 instead so that we use the
> flags from the firmware. Also, remove specify dev_name() for the irq
> name so that we can get better information in /proc/interrupts about
> which device is generating interrupts.
>
> Cc: Girish Mahadevan <girishm@codeaurora.org>
> Cc: Dilip Kota <dkota@codeaurora.org>
> Cc: Alok Chauhan <alokc@codeaurora.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
>  drivers/i2c/busses/i2c-qcom-geni.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

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

* Re: [PATCH 2/3] i2c: qcom-geni: Grow a dev pointer to simplify code
  2020-02-04 19:31 ` [PATCH 2/3] i2c: qcom-geni: Grow a dev pointer to simplify code Stephen Boyd
  2020-02-04 21:14   ` Brendan Higgins
@ 2020-02-04 21:18   ` Doug Anderson
  1 sibling, 0 replies; 12+ messages in thread
From: Doug Anderson @ 2020-02-04 21:18 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Wolfram Sang, LKML, Andy Gross, Bjorn Andersson, linux-i2c,
	linux-arm-msm, Girish Mahadevan, Dilip Kota, Alok Chauhan

Hi,

On Tue, Feb 4, 2020 at 11:31 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> Some lines are long here. Use a struct dev pointer to shorten lines and
> simplify code. The clk_get() call can fail because of EPROBE_DEFER
> problems too, so just remove the error print message because it isn't
> useful.
>
> Cc: Girish Mahadevan <girishm@codeaurora.org>
> Cc: Dilip Kota <dkota@codeaurora.org>
> Cc: Alok Chauhan <alokc@codeaurora.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
>  drivers/i2c/busses/i2c-qcom-geni.c | 51 ++++++++++++++----------------
>  1 file changed, 24 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index 3e13b54ce3f8..192a8f622f3d 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -502,45 +502,42 @@ static int geni_i2c_probe(struct platform_device *pdev)
>         struct resource *res;
>         u32 proto, tx_depth;
>         int ret;
> +       struct device *dev = &pdev->dev;
>
> -       gi2c = devm_kzalloc(&pdev->dev, sizeof(*gi2c), GFP_KERNEL);
> +       gi2c = devm_kzalloc(dev, sizeof(*gi2c), GFP_KERNEL);
>         if (!gi2c)
>                 return -ENOMEM;
>
> -       gi2c->se.dev = &pdev->dev;
> -       gi2c->se.wrapper = dev_get_drvdata(pdev->dev.parent);
> +       gi2c->se.dev = dev;
> +       gi2c->se.wrapper = dev_get_drvdata(dev->parent);
>         res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       gi2c->se.base = devm_ioremap_resource(&pdev->dev, res);
> +       gi2c->se.base = devm_ioremap_resource(dev, res);
>         if (IS_ERR(gi2c->se.base))
>                 return PTR_ERR(gi2c->se.base);
>
> -       gi2c->se.clk = devm_clk_get(&pdev->dev, "se");
> -       if (IS_ERR(gi2c->se.clk) && !has_acpi_companion(&pdev->dev)) {
> +       gi2c->se.clk = devm_clk_get(dev, "se");
> +       if (IS_ERR(gi2c->se.clk) && !has_acpi_companion(dev)) {
>                 ret = PTR_ERR(gi2c->se.clk);
> -               dev_err(&pdev->dev, "Err getting SE Core clk %d\n", ret);
>                 return ret;
>         }

As with my response to your similar SPI change [1], there are cases
where this print could have informed us about other errors besides
EPROBE_DEFER, but it does seem rather unlikely so I'm OK w/ your
change.

I'm wondering why you didn't further clean this up, though.  You could
have fully gotten rid of the braces by just doing:

return PTR_ERR(gi2c->se.clk);


> -       ret = device_property_read_u32(&pdev->dev, "clock-frequency",
> -                                                       &gi2c->clk_freq_out);
> +       ret = device_property_read_u32(dev, "clock-frequency",
> +                                      &gi2c->clk_freq_out);
>         if (ret) {
> -               dev_info(&pdev->dev,
> -                       "Bus frequency not specified, default to 100kHz.\n");
> +               dev_info(dev, "Bus frequency not specified, default to 100kHz.\n");
>                 gi2c->clk_freq_out = KHZ(100);
>         }
>
> -       if (has_acpi_companion(&pdev->dev))
> -               ACPI_COMPANION_SET(&gi2c->adap.dev, ACPI_COMPANION(&pdev->dev));
> +       if (has_acpi_companion(dev))
> +               ACPI_COMPANION_SET(&gi2c->adap.dev, ACPI_COMPANION(dev));
>
>         gi2c->irq = platform_get_irq(pdev, 0);
> -       if (gi2c->irq < 0) {
> -               dev_err(&pdev->dev, "IRQ error for i2c-geni\n");
> +       if (gi2c->irq < 0)

Commit message doesn't mention removing this print, though checking
platform_get_irq() it looks like it already spams in the case where a
non-EPROBE_DEFER error is returned so I think you're good.

[1] https://lore.kernel.org/r/CAD=FV=U6Yiv5i4PdDFqNhp0STqAvVi_=F_iuKyonx=MsOQFABQ@mail.gmail.com


In any case above things aren't terribly important, so:

Reviewed-by: Douglas Anderson <dianders@chromium.org>

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

* Re: [PATCH 3/3] i2c: qcom-geni: Drop of_platform.h include
  2020-02-04 19:31 ` [PATCH 3/3] i2c: qcom-geni: Drop of_platform.h include Stephen Boyd
@ 2020-02-04 21:18   ` Doug Anderson
  2020-02-04 21:20   ` Brendan Higgins
  1 sibling, 0 replies; 12+ messages in thread
From: Doug Anderson @ 2020-02-04 21:18 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Wolfram Sang, LKML, Andy Gross, Bjorn Andersson, linux-i2c,
	linux-arm-msm, Girish Mahadevan, Dilip Kota, Alok Chauhan

Hi,

On Tue, Feb 4, 2020 at 11:31 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> This driver doesn't call any DT platform functions like of_platform_*().
> Remove the include as it isn't used.
>
> Cc: Girish Mahadevan <girishm@codeaurora.org>
> Cc: Dilip Kota <dkota@codeaurora.org>
> Cc: Alok Chauhan <alokc@codeaurora.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
>  drivers/i2c/busses/i2c-qcom-geni.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

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

* Re: [PATCH 3/3] i2c: qcom-geni: Drop of_platform.h include
  2020-02-04 19:31 ` [PATCH 3/3] i2c: qcom-geni: Drop of_platform.h include Stephen Boyd
  2020-02-04 21:18   ` Doug Anderson
@ 2020-02-04 21:20   ` Brendan Higgins
  1 sibling, 0 replies; 12+ messages in thread
From: Brendan Higgins @ 2020-02-04 21:20 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Wolfram Sang, Linux Kernel Mailing List, Andy Gross,
	Bjorn Andersson, linux-i2c, linux-arm-msm, Girish Mahadevan,
	Dilip Kota, Alok Chauhan, Douglas Anderson

On Tue, Feb 4, 2020 at 11:32 AM Stephen Boyd <swboyd@chromium.org> wrote:
>
> This driver doesn't call any DT platform functions like of_platform_*().
> Remove the include as it isn't used.
>
> Cc: Girish Mahadevan <girishm@codeaurora.org>
> Cc: Dilip Kota <dkota@codeaurora.org>
> Cc: Alok Chauhan <alokc@codeaurora.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>

Reviewed-by: Brendan Higgins <brendanhiggins@google.com>

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

* Re: [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags
  2020-02-04 19:31 ` [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags Stephen Boyd
  2020-02-04 21:05   ` Brendan Higgins
  2020-02-04 21:17   ` Doug Anderson
@ 2020-03-10  9:42   ` Wolfram Sang
  2020-03-10 15:35     ` Stephen Boyd
  2 siblings, 1 reply; 12+ messages in thread
From: Wolfram Sang @ 2020-03-10  9:42 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: linux-kernel, Andy Gross, Bjorn Andersson, linux-i2c,
	linux-arm-msm, Girish Mahadevan, Dilip Kota, Alok Chauhan,
	Douglas Anderson

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

On Tue, Feb 04, 2020 at 11:31:50AM -0800, Stephen Boyd wrote:
> We don't need to force IRQF_TRIGGER_HIGH here as the DT or ACPI tables
> should take care of this for us. Just use 0 instead so that we use the
> flags from the firmware. Also, remove specify dev_name() for the irq
> name so that we can get better information in /proc/interrupts about
> which device is generating interrupts.
> 
> Cc: Girish Mahadevan <girishm@codeaurora.org>
> Cc: Dilip Kota <dkota@codeaurora.org>
> Cc: Alok Chauhan <alokc@codeaurora.org>
> Cc: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>

All patches look good, but this one doesn't build because dev is defined
in the next patch only. I also can't apply patch 2 before 1, so please
rebase and resend.

> ---
>  drivers/i2c/busses/i2c-qcom-geni.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c
> index 17abf60c94ae..3e13b54ce3f8 100644
> --- a/drivers/i2c/busses/i2c-qcom-geni.c
> +++ b/drivers/i2c/busses/i2c-qcom-geni.c
> @@ -549,8 +549,8 @@ static int geni_i2c_probe(struct platform_device *pdev)
>  	init_completion(&gi2c->done);
>  	spin_lock_init(&gi2c->lock);
>  	platform_set_drvdata(pdev, gi2c);
> -	ret = devm_request_irq(&pdev->dev, gi2c->irq, geni_i2c_irq,
> -			       IRQF_TRIGGER_HIGH, "i2c_geni", gi2c);
> +	ret = devm_request_irq(dev, gi2c->irq, geni_i2c_irq, 0,
> +			       dev_name(&pdev->dev), gi2c);
>  	if (ret) {
>  		dev_err(&pdev->dev, "Request_irq failed:%d: err:%d\n",
>  			gi2c->irq, ret);
> -- 
> Sent by a computer, using git, on the internet
> 

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

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

* Re: [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags
  2020-03-10  9:42   ` Wolfram Sang
@ 2020-03-10 15:35     ` Stephen Boyd
  0 siblings, 0 replies; 12+ messages in thread
From: Stephen Boyd @ 2020-03-10 15:35 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-kernel, Andy Gross, Bjorn Andersson, linux-i2c,
	linux-arm-msm, Girish Mahadevan, Dilip Kota, Alok Chauhan,
	Douglas Anderson

Quoting Wolfram Sang (2020-03-10 02:42:00)
> On Tue, Feb 04, 2020 at 11:31:50AM -0800, Stephen Boyd wrote:
> > We don't need to force IRQF_TRIGGER_HIGH here as the DT or ACPI tables
> > should take care of this for us. Just use 0 instead so that we use the
> > flags from the firmware. Also, remove specify dev_name() for the irq
> > name so that we can get better information in /proc/interrupts about
> > which device is generating interrupts.
> > 
> > Cc: Girish Mahadevan <girishm@codeaurora.org>
> > Cc: Dilip Kota <dkota@codeaurora.org>
> > Cc: Alok Chauhan <alokc@codeaurora.org>
> > Cc: Douglas Anderson <dianders@chromium.org>
> > Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> 
> All patches look good, but this one doesn't build because dev is defined
> in the next patch only. I also can't apply patch 2 before 1, so please
> rebase and resend.

Ok.

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

end of thread, other threads:[~2020-03-10 15:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04 19:31 [PATCH 0/3] Misc qcom geni i2c driver fixes Stephen Boyd
2020-02-04 19:31 ` [PATCH 1/3] i2c: qcom-geni: Let firmware specify irq trigger flags Stephen Boyd
2020-02-04 21:05   ` Brendan Higgins
2020-02-04 21:17   ` Doug Anderson
2020-03-10  9:42   ` Wolfram Sang
2020-03-10 15:35     ` Stephen Boyd
2020-02-04 19:31 ` [PATCH 2/3] i2c: qcom-geni: Grow a dev pointer to simplify code Stephen Boyd
2020-02-04 21:14   ` Brendan Higgins
2020-02-04 21:18   ` Doug Anderson
2020-02-04 19:31 ` [PATCH 3/3] i2c: qcom-geni: Drop of_platform.h include Stephen Boyd
2020-02-04 21:18   ` Doug Anderson
2020-02-04 21:20   ` Brendan Higgins

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.