[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <88bd6668-7e67-42c7-97b6-d7029f371349@linaro.org>
Date: Thu, 4 Jan 2024 09:57:21 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Sean Anderson <sean.anderson@...o.com>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Banajit Goswami <bgoswami@...cinc.com>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Philipp Zabel <p.zabel@...gutronix.de>,
Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
linux-arm-msm@...r.kernel.org, alsa-devel@...a-project.org,
linux-sound@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Bartosz Golaszewski <brgl@...ev.pl>
Subject: Re: [PATCH 2/4] reset: add GPIO-based reset controller
On 28/12/2023 17:05, Sean Anderson wrote:
> On 12/22/23 10:01, Krzysztof Kozlowski wrote:
>> Add simple driver to control GPIO-based resets using the reset
>> controller API for the cases when the GPIOs are shared and reset should
>> be coordinated. The driver is expected to be used by reset core
>> framework for ad-hoc reset controllers.
>
> How do we handle power sequencing? Often GPIOs need some pre/post delay in
> order to ensure proper power sequencing. For regular reset drivers, this is
> internal to the driver.
It's not part of this patchset. Power sequencing is an old topic and
generic solutions were failing, rejected, did not solve the problems,
etc (choose your reason).
Delays are device specific, so they go to drivers (depending on the
compatible). Complex power sequencing is way too much for simplified
reset-framework handling, so anyway it is expected you do it in your driver.
>
> Maybe something like
>
> my-device {
> reset-gpios = <&gpio 555 GPIO_ACTIVE_LOW>;
> reset-gpios-post-deassert-us = <100>;
Feel free to add it later. This patchset, and actually all patches
should, solves one problem while allowing you to extend it later.
If there is a architectural problem in my approach not allowing you to
extend it later, then we should discuss it.
> };
>
> Of course, this is a bit ambiguous if you have multiple devices using the same
> GPIO with different delays. Maybe we take the max? But the driver below seems
> to only have access to one device. Which I suppose begs the question: how do
> we know when it's safe to deassert the reset (e.g. we've gotten to the point
> where all devices using this reset gpio have gotten far enough to detect that
> they use it)?
The driver (reset consumer) knows when it is safe or not. You must
implement proper reset handling in your driver.
Best regards,
Krzysztof
Powered by blists - more mailing lists