linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Anderson <dianders@chromium.org>
To: jkosina@suse.cz, benjamin.tissoires@redhat.com,
	gregkh@linuxfoundation.org
Cc: kai.heng.feng@canonical.com, linux-input@vger.kernel.org,
	hdegoede@redhat.com, andrea@borgia.bo.it, swboyd@chromium.org,
	Douglas Anderson <dianders@chromium.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] dt-bindings: HID: i2c-hid: Add the ability to control a reset GPIO
Date: Wed, 14 Oct 2020 16:42:20 -0700	[thread overview]
Message-ID: <20201014164203.1.I1c2d6236990449717b861539a2234354153b1656@changeid> (raw)

Apparently some devices connected via i2c-hid have timing requirements
around when a reset GPIO should be asserted to them.  The diagram I
have seen, which I believe is from a Goodix device, looked like this:

         +----------------------------------
         |
AVDD ----+
               +------------------------------
         | (a) |
RESET ---------+
                     +-------------
               | (b) |
I2C comm OK ---------+

Where (a) is 10 ms and (b) is 120 ms.

Let's add the ability to specify these timings to the devicetree
bindings.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
---
I notice this bindings file is still a ".txt" file.  Some searching on
The Internets(TM) shows that Rob has maybe started a conversion 5
years ago [1], but that looks ancient.  I can try to put something
together if need be, or we can just land this fix.  ;-)

Note that the .txt version of the bindings seems to indicate that
anyone using one of the optional properties is supposed to declare
their special compatible string.  I'm not sure if that's still
considered important or not?  Once you manage to get these devices
powered on and talking i2c they self-describe themselves...

[1] https://kernel.googlesource.com/pub/scm/linux/kernel/git/robh/linux/+/refs/heads/dt-yaml/Documentation/devicetree/bindings/hid/hid-over-i2c.yaml

 Documentation/devicetree/bindings/input/hid-over-i2c.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/input/hid-over-i2c.txt b/Documentation/devicetree/bindings/input/hid-over-i2c.txt
index c76bafaf98d2..6fca39aa8cc6 100644
--- a/Documentation/devicetree/bindings/input/hid-over-i2c.txt
+++ b/Documentation/devicetree/bindings/input/hid-over-i2c.txt
@@ -32,6 +32,11 @@ device-specific compatible properties, which should be used in addition to the
 - vdd-supply: phandle of the regulator that provides the supply voltage.
 - post-power-on-delay-ms: time required by the device after enabling its regulators
   or powering it on, before it is ready for communication.
+- reset-gpios: GPIOs to assert to reset the device. This GPIO is asserted when
+  the device is powered off and released post-power-on-delay-ms after
+  enabling the regulators.
+- post-gpio-reset-delay-ms: After deasserting reset we'll delay for this many
+  more milliseconds.
 
 Example:
 
-- 
2.28.0.1011.ga647a8990f-goog


             reply	other threads:[~2020-10-15  2:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 23:42 Douglas Anderson [this message]
2020-10-14 23:42 ` [PATCH 2/2] HID: i2c-hid: Add the ability to control a reset GPIO Douglas Anderson
2020-10-19 21:10 ` [PATCH 1/2] dt-bindings: " Rob Herring

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=20201014164203.1.I1c2d6236990449717b861539a2234354153b1656@changeid \
    --to=dianders@chromium.org \
    --cc=andrea@borgia.bo.it \
    --cc=benjamin.tissoires@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=jkosina@suse.cz \
    --cc=kai.heng.feng@canonical.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=swboyd@chromium.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 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).