From: <Codrin.Ciubotariu@microchip.com>
To: <wsa@the-dreams.de>
Cc: <linux-gpio@vger.kernel.org>, <linux-i2c@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <Ludovic.Desroches@microchip.com>,
<Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>,
<kamel.bouhara@bootlin.com>, <linux@armlinux.org.uk>,
<linus.walleij@linaro.org>, <alan@softiron.com>
Subject: Re: Re: Re: [RFC PATCH] i2c: at91: Fix pinmux after devm_gpiod_get() for bus recovery
Date: Tue, 9 Jun 2020 11:43:10 +0000 [thread overview]
Message-ID: <e08c1cb7-351a-8874-44fc-2e44752b170f@microchip.com> (raw)
In-Reply-To: <20200520162724.GG5759@ninjato>
On 20.05.2020 19:27, Wolfram Sang wrote:
>
>>> This will do for 5.7. For 5.8 or 5.9, I can imagine to take the two
>>> pinctrl_state pointers into bus_recovery_info and handle all this in the
>>> core. I will try this later this week if noone is super-eager to try it
>>> out before.
>>>
>>
>> By 'all this' you mean to move the entire function in the core, right?
>> Having just these two pointers bus_recinovery_info won't help much. I
>> can try it, if you haven't already started...
>
> I mean to add those two pointers to bus_recinovery_info and if they are
> populated, then the I2C core is doing the necessary magic (or maybe just
> the pinctrl handle and assume the states have fixed names?). Russell
> just sent patches to add it to the PXA driver, so we could now double
> check how much could be factored out.
>
> I haven't started yet, let's keep in touch who started first :)
>
I started working at this. I added the pinctrl state initialization at
the beginning of the i2c_init_recovery(). Due to the pinmux state issue
with the GPIOs, the GPIO part needs to be also moved. The problem I ran
in to now is the fact that, even if we can ignore if the GPIOs are not
available, we should at least treat EPROBE_DEFER error. To do this, the
I2C bus drivers should take into account the fact that
i2c_register_adapter() can return -EPROBE_DEFER. Is this something to
consider?
Thanks and best regards,
Codrin
prev parent reply other threads:[~2020-06-09 11:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 7:06 [RFC PATCH] i2c: at91: Fix pinmux after devm_gpiod_get() for bus recovery Codrin Ciubotariu
2020-04-19 12:50 ` ludovic.desroches
2020-05-05 15:12 ` Wolfram Sang
2020-05-13 11:07 ` Codrin.Ciubotariu
2020-05-20 16:27 ` Wolfram Sang
2020-06-09 11:43 ` Codrin.Ciubotariu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e08c1cb7-351a-8874-44fc-2e44752b170f@microchip.com \
--to=codrin.ciubotariu@microchip.com \
--cc=Ludovic.Desroches@microchip.com \
--cc=Nicolas.Ferre@microchip.com \
--cc=alan@softiron.com \
--cc=alexandre.belloni@bootlin.com \
--cc=kamel.bouhara@bootlin.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).