* [PATCH] i2c: gpio: suppress error on probe defer
@ 2020-03-09 21:16 Hamish Martin
2020-03-10 8:13 ` Linus Walleij
2020-03-10 11:29 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Hamish Martin @ 2020-03-09 21:16 UTC (permalink / raw)
To: wsa+renesas; +Cc: linus.walleij, linux-i2c, Hamish Martin
If a GPIO we are trying to use is not available and we are deferring
the probe, don't output an error message.
This seems to have been the intent of commit 05c74778858d
("i2c: gpio: Add support for named gpios in DT") but the error was
still output due to not checking the updated 'retdesc'.
Fixes: 05c74778858d ("i2c: gpio: Add support for named gpios in DT")
Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
---
drivers/i2c/busses/i2c-gpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 3a9e840a3546..a4a6825c8758 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -348,7 +348,7 @@ static struct gpio_desc *i2c_gpio_get_desc(struct device *dev,
if (ret == -ENOENT)
retdesc = ERR_PTR(-EPROBE_DEFER);
- if (ret != -EPROBE_DEFER)
+ if (PTR_ERR(retdesc) != -EPROBE_DEFER)
dev_err(dev, "error trying to get descriptor: %d\n", ret);
return retdesc;
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: gpio: suppress error on probe defer
2020-03-09 21:16 [PATCH] i2c: gpio: suppress error on probe defer Hamish Martin
@ 2020-03-10 8:13 ` Linus Walleij
2020-03-10 11:29 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2020-03-10 8:13 UTC (permalink / raw)
To: Hamish Martin; +Cc: Wolfram Sang, linux-i2c
On Mon, Mar 9, 2020 at 10:16 PM Hamish Martin
<hamish.martin@alliedtelesis.co.nz> wrote:
> If a GPIO we are trying to use is not available and we are deferring
> the probe, don't output an error message.
> This seems to have been the intent of commit 05c74778858d
> ("i2c: gpio: Add support for named gpios in DT") but the error was
> still output due to not checking the updated 'retdesc'.
>
> Fixes: 05c74778858d ("i2c: gpio: Add support for named gpios in DT")
> Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Maintainers have varied opinions about this. Some think
it is a stopgap problem until we get probes ordered by other
measures, others think developers should simply learn
the meaning of error -517 and realize it is no error.
But this is fine with me.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: gpio: suppress error on probe defer
2020-03-09 21:16 [PATCH] i2c: gpio: suppress error on probe defer Hamish Martin
2020-03-10 8:13 ` Linus Walleij
@ 2020-03-10 11:29 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2020-03-10 11:29 UTC (permalink / raw)
To: Hamish Martin; +Cc: wsa+renesas, linus.walleij, linux-i2c
[-- Attachment #1: Type: text/plain, Size: 552 bytes --]
On Tue, Mar 10, 2020 at 10:16:18AM +1300, Hamish Martin wrote:
> If a GPIO we are trying to use is not available and we are deferring
> the probe, don't output an error message.
> This seems to have been the intent of commit 05c74778858d
> ("i2c: gpio: Add support for named gpios in DT") but the error was
> still output due to not checking the updated 'retdesc'.
>
> Fixes: 05c74778858d ("i2c: gpio: Add support for named gpios in DT")
> Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
Applied to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-10 11:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-09 21:16 [PATCH] i2c: gpio: suppress error on probe defer Hamish Martin
2020-03-10 8:13 ` Linus Walleij
2020-03-10 11:29 ` Wolfram Sang
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).