From: Matthias Kaehlcke <mka@chromium.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: Bjorn Andersson <andersson@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>,
linux-input@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
devicetree@vger.kernel.org, Stephen Kitt <steve@sk2.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/7] HID: i2c-hid: goodix: Stop tying the reset line to the regulator
Date: Tue, 7 Feb 2023 18:31:47 +0000 [thread overview]
Message-ID: <Y+KZE1tqTH3lqafJ@google.com> (raw)
In-Reply-To: <20230206184744.4.I085b32b6140c7d1ac4e7e97b712bff9dd5962b62@changeid>
On Mon, Feb 06, 2023 at 06:48:13PM -0800, Douglas Anderson wrote:
> In commit 18eeef46d359 ("HID: i2c-hid: goodix: Tie the reset line to
> true state of the regulator"), we started tying the reset line of
> Goodix touchscreens to the regulator.
>
> The primary motivation for that patch was some pre-production hardware
> (specifically sc7180-trogdor-homestar) where it was proposed to hook
> the touchscreen's main 3.3V power rail to an always-on supply. In such
> a case, when we turned "off" the touchscreen in Linux it was bad to
> assert the "reset" GPIO because that was causing a power drain. The
> patch accomplished that goal and did it in a general sort of way that
> didn't require special properties to be added in the device tree for
> homestar.
>
> It turns out that the design of using an always-on power rail for the
> touchscreen was rejected soon after the patch was written and long
> before sc7180-trogdor-homestar went into production. The final design
> of homestar actually fully separates the rail for the touchscreen and
> the display panel and both can be powered off and on. That means that
> the original motivation for the feature is gone.
>
> There are 3 other users of the goodix i2c-hid driver in mainline.
>
> I'll first talk about 2 of the other users in mainline: coachz and
> mrbland. On both coachz and mrbland the touchscreen power and panel
> power _are_ shared. That means that the patch to tie the reset line to
> the true state of the regulator _is_ doing something on those
> boards. Specifically, the patch reduced power consumption by tens of
> mA in the case where we turned the touchscreen off but left the panel
> on. Other than saving a small bit of power, the patch wasn't truly
> necessary. That being said, even though a small bit of power was saved
> in the state of "panel on + touchscreen off", that's not actually a
> state we ever expect to be in, except perhaps for very short periods
> of time at boot or during suspend/resume. Thus, the patch is truly not
> necessary. It should be further noted that, as documented in the
> original patch, the current code still didn't optimize power for every
> corner case of the "shared rail" situation.
>
> The last user in mainline was very recently added: evoker. Evoker is
> actually the motivation for me removing this bit of code. It turns out
> that for evoker we need to manage a second power rail for IO to the
> touchscreen. Trying to fit the management of this IO rail into the
> regulator notifiers turns out to be extremely hard. To avoid lockdep
> splats you shouldn't enable/disable other regulators in regulator
> notifiers and trying to find a way around this was going to be fairly
> difficult.
>
> Given the lack of any true motivation to tie the reset line to the
> regulator, lets go back to the simpler days and remove the code. This
> is, effectively, a revert of commit bdbc65eb77ee ("HID: i2c-hid:
> goodix: Fix a lockdep splat"), commit 25ddd7cfc582 ("HID: i2c-hid:
> goodix: Use the devm variant of regulator_register_notifier()"), and
> commit 18eeef46d359 ("HID: i2c-hid: goodix: Tie the reset line to true
> state of the regulator").
>
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
next prev parent reply other threads:[~2023-02-07 18:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 2:48 [PATCH 0/7] arm: qcom: Fix touchscreen voltage for sc7280-herobrine boards Douglas Anderson
2023-02-07 2:48 ` [PATCH 1/7] arm64: dts: qcom: sc7280: On QCard, regulator L3C should be 1.8V Douglas Anderson
2023-02-07 18:12 ` Matthias Kaehlcke
2023-02-07 2:48 ` [PATCH 2/7] arm64: dts: qcom: sc7280: Add 3ms ramp to herobrine's pp3300_left_in_mlb Douglas Anderson
2023-02-07 18:15 ` Matthias Kaehlcke
2023-02-07 2:48 ` [PATCH 3/7] arm64: dts: qcom: sc7280: Hook up the touchscreen IO rail on villager Douglas Anderson
2023-02-07 18:18 ` Matthias Kaehlcke
2023-02-07 2:48 ` [PATCH 4/7] HID: i2c-hid: goodix: Stop tying the reset line to the regulator Douglas Anderson
2023-02-07 3:58 ` Dmitry Torokhov
2023-02-07 18:31 ` Matthias Kaehlcke [this message]
2023-02-07 2:48 ` [PATCH 5/7] dt-bindings: HID: i2c-hid: goodix: Add mainboard-vddio-supply Douglas Anderson
2023-02-07 4:01 ` Dmitry Torokhov
2023-02-07 21:19 ` Rob Herring
2023-02-07 2:48 ` [PATCH 6/7] " Douglas Anderson
2023-02-07 4:02 ` Dmitry Torokhov
2023-02-07 18:46 ` Matthias Kaehlcke
2023-02-07 2:48 ` [PATCH 7/7] arm64: dts: qcom: sc7280: Hook up the touchscreen IO rail on evoker Douglas Anderson
2023-02-07 18:47 ` Matthias Kaehlcke
2023-02-09 4:22 ` (subset) [PATCH 0/7] arm: qcom: Fix touchscreen voltage for sc7280-herobrine boards Bjorn Andersson
2023-02-09 13:50 ` Benjamin Tissoires
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=Y+KZE1tqTH3lqafJ@google.com \
--to=mka@chromium.org \
--cc=andersson@kernel.org \
--cc=benjamin.tissoires@redhat.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=steve@sk2.org \
/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 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.