Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] gpio: nomadik: silence boot log
@ 2026-07-01 16:56 Théo Lebrun
  2026-07-01 16:56 ` [PATCH 1/5] gpio: nomadik: convert nmk_gpio_populate_chip() to goto cleanup Théo Lebrun
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Théo Lebrun @ 2026-07-01 16:56 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Philipp Zabel
  Cc: Vladimir Kondratiev, Gregory CLEMENT, Benoît Monin,
	Tawfik Bayouk, Thomas Petazzoni, linux-arm-kernel, linux-gpio,
	linux-kernel, Théo Lebrun

Currently, on EyeQ5, we might get those error logs:

[    0.544230] nomadik-gpio 1400000.gpio: failed getting reset control: -EPROBE_DEFER
[    0.544274] nomadik-gpio 1400000.gpio: could not populate nmk chip struct

Then on successful probe we get:

[    0.976838] nomadik-gpio 1400000.gpio: chip registered

First line is because we don't use the appropriate dev_err_probe()
helper. Second line is redundant to populate chip dev_err() calls and
shall be dropped. Third line should be dropped.

That's done in patches 3+4+5. Patches 1+2 prepare the terrain.

Have a nice day,
Théo

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
Théo Lebrun (5):
      gpio: nomadik: convert nmk_gpio_populate_chip() to goto cleanup
      gpio: nomadik: add missing dev_err() call on chip populate failure
      gpio: nomadik: drop duplicate probe error line
      gpio: nomadik: use dev_err_probe()
      gpio: nomadik: drop "chip registered" log on probe success

 drivers/gpio/gpio-nomadik.c | 64 ++++++++++++++++++++++-----------------------
 1 file changed, 32 insertions(+), 32 deletions(-)
---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260701-gpio-nomadik-silent-678abaee1e3e

Best regards,
--  
Théo Lebrun <theo.lebrun@bootlin.com>



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

* [PATCH 1/5] gpio: nomadik: convert nmk_gpio_populate_chip() to goto cleanup
  2026-07-01 16:56 [PATCH 0/5] gpio: nomadik: silence boot log Théo Lebrun
@ 2026-07-01 16:56 ` Théo Lebrun
  2026-07-02  7:58   ` Linus Walleij
  2026-07-01 16:56 ` [PATCH 2/5] gpio: nomadik: add missing dev_err() call on chip populate failure Théo Lebrun
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Théo Lebrun @ 2026-07-01 16:56 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Philipp Zabel
  Cc: Vladimir Kondratiev, Gregory CLEMENT, Benoît Monin,
	Tawfik Bayouk, Thomas Petazzoni, linux-arm-kernel, linux-gpio,
	linux-kernel, Théo Lebrun

Remove duplicate teardown code that is found in all error if
statements. Replace by goto-based cleanup labels.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 drivers/gpio/gpio-nomadik.c | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
index e22b713166d7..f25f251f4757 100644
--- a/drivers/gpio/gpio-nomadik.c
+++ b/drivers/gpio/gpio-nomadik.c
@@ -527,15 +527,15 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 
 	if (device_property_read_u32(gpio_dev, "gpio-bank", &id)) {
 		dev_err(dev, "populate: gpio-bank property not found\n");
-		platform_device_put(gpio_pdev);
-		return ERR_PTR(-EINVAL);
+		ret = -EINVAL;
+		goto err_put_pdev;
 	}
 
 #ifdef CONFIG_PINCTRL_NOMADIK
 	if (id >= ARRAY_SIZE(nmk_gpio_chips)) {
 		dev_err(dev, "populate: invalid id: %u\n", id);
-		platform_device_put(gpio_pdev);
-		return ERR_PTR(-EINVAL);
+		ret = -EINVAL;
+		goto err_put_pdev;
 	}
 	/* Already populated? */
 	nmk_chip = nmk_gpio_chips[id];
@@ -547,8 +547,8 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 
 	nmk_chip = devm_kzalloc(dev, sizeof(*nmk_chip), GFP_KERNEL);
 	if (!nmk_chip) {
-		platform_device_put(gpio_pdev);
-		return ERR_PTR(-ENOMEM);
+		ret = -ENOMEM;
+		goto err_put_pdev;
 	}
 
 	if (device_property_read_u32(gpio_dev, "ngpios", &ngpio)) {
@@ -569,16 +569,16 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 	res = platform_get_resource(gpio_pdev, IORESOURCE_MEM, 0);
 	base = devm_ioremap_resource(dev, res);
 	if (IS_ERR(base)) {
-		platform_device_put(gpio_pdev);
-		return ERR_CAST(base);
+		ret = PTR_ERR(base);
+		goto err_put_pdev;
 	}
 	nmk_chip->addr = base;
 
 	/* NOTE: do not use devm_ here! */
 	clk = clk_get_optional(gpio_dev, NULL);
 	if (IS_ERR(clk)) {
-		platform_device_put(gpio_pdev);
-		return ERR_CAST(clk);
+		ret = PTR_ERR(clk);
+		goto err_put_pdev;
 	}
 	clk_prepare(clk);
 	nmk_chip->clk = clk;
@@ -586,12 +586,9 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 	/* NOTE: do not use devm_ here! */
 	reset = reset_control_get_optional_shared(gpio_dev, NULL);
 	if (IS_ERR(reset)) {
-		clk_unprepare(clk);
-		clk_put(clk);
-		platform_device_put(gpio_pdev);
-		dev_err(dev, "failed getting reset control: %pe\n",
-			reset);
-		return ERR_CAST(reset);
+		dev_err(dev, "failed getting reset control: %pe\n", reset);
+		ret = PTR_ERR(reset);
+		goto err_unprepare_clk;
 	}
 
 	/*
@@ -601,18 +598,23 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 	 */
 	ret = reset_control_deassert(reset);
 	if (ret) {
-		reset_control_put(reset);
-		clk_unprepare(clk);
-		clk_put(clk);
-		platform_device_put(gpio_pdev);
 		dev_err(dev, "failed reset deassert: %d\n", ret);
-		return ERR_PTR(ret);
+		goto err_put_reset;
 	}
 
 #ifdef CONFIG_PINCTRL_NOMADIK
 	nmk_gpio_chips[id] = nmk_chip;
 #endif
 	return nmk_chip;
+
+err_put_reset:
+	reset_control_put(reset);
+err_unprepare_clk:
+	clk_unprepare(clk);
+	clk_put(clk);
+err_put_pdev:
+	platform_device_put(gpio_pdev);
+	return ERR_PTR(ret);
 }
 
 static void nmk_gpio_irq_print_chip(struct irq_data *d, struct seq_file *p)

-- 
2.55.0



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

* [PATCH 2/5] gpio: nomadik: add missing dev_err() call on chip populate failure
  2026-07-01 16:56 [PATCH 0/5] gpio: nomadik: silence boot log Théo Lebrun
  2026-07-01 16:56 ` [PATCH 1/5] gpio: nomadik: convert nmk_gpio_populate_chip() to goto cleanup Théo Lebrun
@ 2026-07-01 16:56 ` Théo Lebrun
  2026-07-02  7:58   ` Linus Walleij
  2026-07-01 16:57 ` [PATCH 3/5] gpio: nomadik: drop duplicate probe error line Théo Lebrun
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 12+ messages in thread
From: Théo Lebrun @ 2026-07-01 16:56 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Philipp Zabel
  Cc: Vladimir Kondratiev, Gregory CLEMENT, Benoît Monin,
	Tawfik Bayouk, Thomas Petazzoni, linux-arm-kernel, linux-gpio,
	linux-kernel, Théo Lebrun

All error paths of nmk_gpio_populate_chip() lead to logging errors but
this one (ignoring the alloc or ioremap failures that must not log).

Add the single missing dev_err() call.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 drivers/gpio/gpio-nomadik.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
index f25f251f4757..4a7db282bad8 100644
--- a/drivers/gpio/gpio-nomadik.c
+++ b/drivers/gpio/gpio-nomadik.c
@@ -578,6 +578,7 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 	clk = clk_get_optional(gpio_dev, NULL);
 	if (IS_ERR(clk)) {
 		ret = PTR_ERR(clk);
+		dev_err(dev, "failed getting clock: %d\n", ret);
 		goto err_put_pdev;
 	}
 	clk_prepare(clk);

-- 
2.55.0



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

* [PATCH 3/5] gpio: nomadik: drop duplicate probe error line
  2026-07-01 16:56 [PATCH 0/5] gpio: nomadik: silence boot log Théo Lebrun
  2026-07-01 16:56 ` [PATCH 1/5] gpio: nomadik: convert nmk_gpio_populate_chip() to goto cleanup Théo Lebrun
  2026-07-01 16:56 ` [PATCH 2/5] gpio: nomadik: add missing dev_err() call on chip populate failure Théo Lebrun
@ 2026-07-01 16:57 ` Théo Lebrun
  2026-07-02  7:59   ` Linus Walleij
  2026-07-01 16:57 ` [PATCH 4/5] gpio: nomadik: use dev_err_probe() Théo Lebrun
  2026-07-01 16:57 ` [PATCH 5/5] gpio: nomadik: drop "chip registered" log on probe success Théo Lebrun
  4 siblings, 1 reply; 12+ messages in thread
From: Théo Lebrun @ 2026-07-01 16:57 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Philipp Zabel
  Cc: Vladimir Kondratiev, Gregory CLEMENT, Benoît Monin,
	Tawfik Bayouk, Thomas Petazzoni, linux-arm-kernel, linux-gpio,
	linux-kernel, Théo Lebrun

Now that all error codepaths in nmk_gpio_populate_chip() log an error,
drop dev_err() call that is made on nmk_gpio_populate_chip() failure.

Current boot log:

[    0.544230] nomadik-gpio 1400000.gpio: failed getting reset control: -EPROBE_DEFER
[    0.544274] nomadik-gpio 1400000.gpio: could not populate nmk chip struct

The second line is always redundant (or is logged when we shouldn't log,
like ioremap or alloc failures).

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 drivers/gpio/gpio-nomadik.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
index 4a7db282bad8..eba095eeb3d6 100644
--- a/drivers/gpio/gpio-nomadik.c
+++ b/drivers/gpio/gpio-nomadik.c
@@ -651,10 +651,8 @@ static int nmk_gpio_probe(struct platform_device *pdev)
 	int ret;
 
 	nmk_chip = nmk_gpio_populate_chip(dev_fwnode(dev), pdev);
-	if (IS_ERR(nmk_chip)) {
-		dev_err(dev, "could not populate nmk chip struct\n");
+	if (IS_ERR(nmk_chip))
 		return PTR_ERR(nmk_chip);
-	}
 
 	supports_sleepmode =
 		device_property_read_bool(dev, "st,supports-sleepmode");

-- 
2.55.0



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

* [PATCH 4/5] gpio: nomadik: use dev_err_probe()
  2026-07-01 16:56 [PATCH 0/5] gpio: nomadik: silence boot log Théo Lebrun
                   ` (2 preceding siblings ...)
  2026-07-01 16:57 ` [PATCH 3/5] gpio: nomadik: drop duplicate probe error line Théo Lebrun
@ 2026-07-01 16:57 ` Théo Lebrun
  2026-07-02  7:59   ` Linus Walleij
  2026-07-01 16:57 ` [PATCH 5/5] gpio: nomadik: drop "chip registered" log on probe success Théo Lebrun
  4 siblings, 1 reply; 12+ messages in thread
From: Théo Lebrun @ 2026-07-01 16:57 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Philipp Zabel
  Cc: Vladimir Kondratiev, Gregory CLEMENT, Benoît Monin,
	Tawfik Bayouk, Thomas Petazzoni, linux-arm-kernel, linux-gpio,
	linux-kernel, Théo Lebrun

gpio-nomadik depends on a few resources. In one case the reset is taking
time to show up leading to a boot log containing:

[    0.544230] nomadik-gpio 1400000.gpio: failed getting reset control: -EPROBE_DEFER

Fix by replacing all dev_err() calls that might be made at probe with
dev_err_probe().

On nomadik platforms, the nmk_gpio_populate_chip() log calls might
attach their reasons to the gpio or pinctrl device depending on boot
order.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 drivers/gpio/gpio-nomadik.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
index eba095eeb3d6..1ee46f59d708 100644
--- a/drivers/gpio/gpio-nomadik.c
+++ b/drivers/gpio/gpio-nomadik.c
@@ -520,21 +520,22 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 
 	gpio_dev = bus_find_device_by_fwnode(&platform_bus_type, fwnode);
 	if (!gpio_dev) {
-		dev_err(dev, "populate \"%pfwP\": device not found\n", fwnode);
-		return ERR_PTR(-ENODEV);
+		ret = -ENODEV;
+		dev_err_probe(dev, ret, "populate \"%pfwP\": device not found\n", fwnode);
+		return ERR_PTR(ret);
 	}
 	gpio_pdev = to_platform_device(gpio_dev);
 
 	if (device_property_read_u32(gpio_dev, "gpio-bank", &id)) {
-		dev_err(dev, "populate: gpio-bank property not found\n");
 		ret = -EINVAL;
+		dev_err_probe(dev, ret, "populate: gpio-bank property not found\n");
 		goto err_put_pdev;
 	}
 
 #ifdef CONFIG_PINCTRL_NOMADIK
 	if (id >= ARRAY_SIZE(nmk_gpio_chips)) {
-		dev_err(dev, "populate: invalid id: %u\n", id);
 		ret = -EINVAL;
+		dev_err_probe(dev, ret, "populate: invalid id: %u\n", id);
 		goto err_put_pdev;
 	}
 	/* Already populated? */
@@ -578,7 +579,7 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 	clk = clk_get_optional(gpio_dev, NULL);
 	if (IS_ERR(clk)) {
 		ret = PTR_ERR(clk);
-		dev_err(dev, "failed getting clock: %d\n", ret);
+		dev_err_probe(dev, ret, "failed getting clock\n");
 		goto err_put_pdev;
 	}
 	clk_prepare(clk);
@@ -587,8 +588,8 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 	/* NOTE: do not use devm_ here! */
 	reset = reset_control_get_optional_shared(gpio_dev, NULL);
 	if (IS_ERR(reset)) {
-		dev_err(dev, "failed getting reset control: %pe\n", reset);
 		ret = PTR_ERR(reset);
+		dev_err_probe(dev, ret, "failed getting reset control\n");
 		goto err_unprepare_clk;
 	}
 
@@ -599,7 +600,7 @@ struct nmk_gpio_chip *nmk_gpio_populate_chip(struct fwnode_handle *fwnode,
 	 */
 	ret = reset_control_deassert(reset);
 	if (ret) {
-		dev_err(dev, "failed reset deassert: %d\n", ret);
+		dev_err_probe(dev, ret, "failed reset deassert\n");
 		goto err_put_reset;
 	}
 
@@ -695,7 +696,7 @@ static int nmk_gpio_probe(struct platform_device *pdev)
 	ret = devm_request_irq(dev, irq, nmk_gpio_irq_handler, IRQF_SHARED,
 			       dev_name(dev), nmk_chip);
 	if (ret) {
-		dev_err(dev, "failed requesting IRQ\n");
+		dev_err_probe(dev, ret, "failed requesting IRQ\n");
 		return ret;
 	}
 

-- 
2.55.0



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

* [PATCH 5/5] gpio: nomadik: drop "chip registered" log on probe success
  2026-07-01 16:56 [PATCH 0/5] gpio: nomadik: silence boot log Théo Lebrun
                   ` (3 preceding siblings ...)
  2026-07-01 16:57 ` [PATCH 4/5] gpio: nomadik: use dev_err_probe() Théo Lebrun
@ 2026-07-01 16:57 ` Théo Lebrun
  2026-07-02  8:00   ` Linus Walleij
  4 siblings, 1 reply; 12+ messages in thread
From: Théo Lebrun @ 2026-07-01 16:57 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Philipp Zabel
  Cc: Vladimir Kondratiev, Gregory CLEMENT, Benoît Monin,
	Tawfik Bayouk, Thomas Petazzoni, linux-arm-kernel, linux-gpio,
	linux-kernel, Théo Lebrun

Successful driver probing should be silent. Drop unconditional
dev_info() call that is done at nmk_gpio_probe() exit.

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
 drivers/gpio/gpio-nomadik.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
index 1ee46f59d708..244331f468cc 100644
--- a/drivers/gpio/gpio-nomadik.c
+++ b/drivers/gpio/gpio-nomadik.c
@@ -712,8 +712,6 @@ static int nmk_gpio_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, nmk_chip);
 
-	dev_info(dev, "chip registered\n");
-
 	return 0;
 }
 

-- 
2.55.0



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

* Re: [PATCH 1/5] gpio: nomadik: convert nmk_gpio_populate_chip() to goto cleanup
  2026-07-01 16:56 ` [PATCH 1/5] gpio: nomadik: convert nmk_gpio_populate_chip() to goto cleanup Théo Lebrun
@ 2026-07-02  7:58   ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2026-07-02  7:58 UTC (permalink / raw)
  To: Théo Lebrun
  Cc: Bartosz Golaszewski, Philipp Zabel, Vladimir Kondratiev,
	Gregory CLEMENT, Benoît Monin, Tawfik Bayouk,
	Thomas Petazzoni, linux-arm-kernel, linux-gpio, linux-kernel

On Wed, Jul 1, 2026 at 6:57 PM Théo Lebrun <theo.lebrun@bootlin.com> wrote:

> Remove duplicate teardown code that is found in all error if
> statements. Replace by goto-based cleanup labels.
>
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>

Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij


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

* Re: [PATCH 2/5] gpio: nomadik: add missing dev_err() call on chip populate failure
  2026-07-01 16:56 ` [PATCH 2/5] gpio: nomadik: add missing dev_err() call on chip populate failure Théo Lebrun
@ 2026-07-02  7:58   ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2026-07-02  7:58 UTC (permalink / raw)
  To: Théo Lebrun
  Cc: Bartosz Golaszewski, Philipp Zabel, Vladimir Kondratiev,
	Gregory CLEMENT, Benoît Monin, Tawfik Bayouk,
	Thomas Petazzoni, linux-arm-kernel, linux-gpio, linux-kernel

On Wed, Jul 1, 2026 at 6:57 PM Théo Lebrun <theo.lebrun@bootlin.com> wrote:

> All error paths of nmk_gpio_populate_chip() lead to logging errors but
> this one (ignoring the alloc or ioremap failures that must not log).
>
> Add the single missing dev_err() call.
>
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>

Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij


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

* Re: [PATCH 3/5] gpio: nomadik: drop duplicate probe error line
  2026-07-01 16:57 ` [PATCH 3/5] gpio: nomadik: drop duplicate probe error line Théo Lebrun
@ 2026-07-02  7:59   ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2026-07-02  7:59 UTC (permalink / raw)
  To: Théo Lebrun
  Cc: Bartosz Golaszewski, Philipp Zabel, Vladimir Kondratiev,
	Gregory CLEMENT, Benoît Monin, Tawfik Bayouk,
	Thomas Petazzoni, linux-arm-kernel, linux-gpio, linux-kernel

On Wed, Jul 1, 2026 at 6:57 PM Théo Lebrun <theo.lebrun@bootlin.com> wrote:

> Now that all error codepaths in nmk_gpio_populate_chip() log an error,
> drop dev_err() call that is made on nmk_gpio_populate_chip() failure.
>
> Current boot log:
>
> [    0.544230] nomadik-gpio 1400000.gpio: failed getting reset control: -EPROBE_DEFER
> [    0.544274] nomadik-gpio 1400000.gpio: could not populate nmk chip struct
>
> The second line is always redundant (or is logged when we shouldn't log,
> like ioremap or alloc failures).
>
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>

Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij


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

* Re: [PATCH 4/5] gpio: nomadik: use dev_err_probe()
  2026-07-01 16:57 ` [PATCH 4/5] gpio: nomadik: use dev_err_probe() Théo Lebrun
@ 2026-07-02  7:59   ` Linus Walleij
  0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2026-07-02  7:59 UTC (permalink / raw)
  To: Théo Lebrun
  Cc: Bartosz Golaszewski, Philipp Zabel, Vladimir Kondratiev,
	Gregory CLEMENT, Benoît Monin, Tawfik Bayouk,
	Thomas Petazzoni, linux-arm-kernel, linux-gpio, linux-kernel

On Wed, Jul 1, 2026 at 6:57 PM Théo Lebrun <theo.lebrun@bootlin.com> wrote:

> gpio-nomadik depends on a few resources. In one case the reset is taking
> time to show up leading to a boot log containing:
>
> [    0.544230] nomadik-gpio 1400000.gpio: failed getting reset control: -EPROBE_DEFER
>
> Fix by replacing all dev_err() calls that might be made at probe with
> dev_err_probe().
>
> On nomadik platforms, the nmk_gpio_populate_chip() log calls might
> attach their reasons to the gpio or pinctrl device depending on boot
> order.
>
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>

Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij


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

* Re: [PATCH 5/5] gpio: nomadik: drop "chip registered" log on probe success
  2026-07-01 16:57 ` [PATCH 5/5] gpio: nomadik: drop "chip registered" log on probe success Théo Lebrun
@ 2026-07-02  8:00   ` Linus Walleij
  2026-07-02  8:34     ` Théo Lebrun
  0 siblings, 1 reply; 12+ messages in thread
From: Linus Walleij @ 2026-07-02  8:00 UTC (permalink / raw)
  To: Théo Lebrun
  Cc: Bartosz Golaszewski, Philipp Zabel, Vladimir Kondratiev,
	Gregory CLEMENT, Benoît Monin, Tawfik Bayouk,
	Thomas Petazzoni, linux-arm-kernel, linux-gpio, linux-kernel

On Wed, Jul 1, 2026 at 6:57 PM Théo Lebrun <theo.lebrun@bootlin.com> wrote:

> Successful driver probing should be silent. Drop unconditional
> dev_info() call that is done at nmk_gpio_probe() exit.
>
> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>

I actually don't generally agree, but you are using this driver more than
me now so let's go with your minimalist dmesg style for this driver.

Reviewed-by: Linus Walleij <linusw@kernel.org>

Yours,
Linus Walleij


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

* Re: [PATCH 5/5] gpio: nomadik: drop "chip registered" log on probe success
  2026-07-02  8:00   ` Linus Walleij
@ 2026-07-02  8:34     ` Théo Lebrun
  0 siblings, 0 replies; 12+ messages in thread
From: Théo Lebrun @ 2026-07-02  8:34 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Bartosz Golaszewski, Philipp Zabel, Vladimir Kondratiev,
	Gregory CLEMENT, Benoît Monin, Tawfik Bayouk,
	Thomas Petazzoni, linux-arm-kernel, linux-gpio, linux-kernel

Hello Linus,

On Thu Jul 2, 2026 at 10:00 AM CEST, Linus Walleij wrote:
> On Wed, Jul 1, 2026 at 6:57 PM Théo Lebrun <theo.lebrun@bootlin.com> wrote:
>
>> Successful driver probing should be silent. Drop unconditional
>> dev_info() call that is done at nmk_gpio_probe() exit.
>>
>> Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
>
> I actually don't generally agree, but you are using this driver more than
> me now so let's go with your minimalist dmesg style for this driver.

I get from where you stand, but the info level is somewhat strong.
Documentation/process/coding-style.rst agrees ("When drivers are
working properly they are quiet").

If you like this log line we can turn it into a lower debug level?

> Reviewed-by: Linus Walleij <linusw@kernel.org>

Thanks for the reviews Linus!

--
Théo Lebrun, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



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

end of thread, other threads:[~2026-07-02  8:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 16:56 [PATCH 0/5] gpio: nomadik: silence boot log Théo Lebrun
2026-07-01 16:56 ` [PATCH 1/5] gpio: nomadik: convert nmk_gpio_populate_chip() to goto cleanup Théo Lebrun
2026-07-02  7:58   ` Linus Walleij
2026-07-01 16:56 ` [PATCH 2/5] gpio: nomadik: add missing dev_err() call on chip populate failure Théo Lebrun
2026-07-02  7:58   ` Linus Walleij
2026-07-01 16:57 ` [PATCH 3/5] gpio: nomadik: drop duplicate probe error line Théo Lebrun
2026-07-02  7:59   ` Linus Walleij
2026-07-01 16:57 ` [PATCH 4/5] gpio: nomadik: use dev_err_probe() Théo Lebrun
2026-07-02  7:59   ` Linus Walleij
2026-07-01 16:57 ` [PATCH 5/5] gpio: nomadik: drop "chip registered" log on probe success Théo Lebrun
2026-07-02  8:00   ` Linus Walleij
2026-07-02  8:34     ` Théo Lebrun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox