From: "Heiko Stübner" <heiko.stuebner@bq.com>
To: Dirk Behme <dirk.behme@de.bosch.com>
Cc: linux-input@vger.kernel.org, Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCHv v2] Input: zforce - make the interrupt GPIO optional
Date: Mon, 03 Aug 2015 09:54:49 +0200 [thread overview]
Message-ID: <1763405.uXNYd4iq17@diego> (raw)
In-Reply-To: <1438583646-14022-1-git-send-email-dirk.behme@de.bosch.com>
Hi Dirk,
Am Montag, 3. August 2015, 08:34:06 schrieb Dirk Behme:
> Add support for hardware which uses an I2C Serializer / Deserializer
> (SerDes) to communicate with the zFroce touch driver. In this case the
> SerDes will be configured as an interrupt controller and the zForce driver
> will have no access to poll the GPIO line.
>
> To support this, we add two dedicated new GPIOs in the device tree:
> reset-gpio and irq-gpio. With the irq-gpio being optional, then.
>
> To not break the existing device trees, the index based 'gpios' entries
> are still supported, but marked as deprecated.
>
> With this, if the interrupt GPIO is available, either via the old or new
> device tree style, the while loop will read and handle the packets as long
> as the GPIO indicates that the interrupt is asserted (existing, unchanged
> driver behavior).
>
> If the interrupt GPIO isn't available, i.e. not configured via the new
> device tree style, we are falling back to one read per ISR invocation
> (new behavior to support the SerDes).
>
> Note that the gpiod functions help to handle the optional GPIO:
> devm_gpiod_get_index_optional() will return NULL in case the interrupt
> GPIO isn't available. And gpiod_get_value_cansleep() does cover this, too,
> by returning 0 in this case.
>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
looks nice now in v2, thanks :-)
Reviewed-by: Heiko Stuebner <heiko.stuebner@bq.com>
next prev parent reply other threads:[~2015-08-03 7:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 6:34 [PATCHv v2] Input: zforce - make the interrupt GPIO optional Dirk Behme
2015-08-03 7:54 ` Heiko Stübner [this message]
2015-08-03 20:05 ` Dmitry Torokhov
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=1763405.uXNYd4iq17@diego \
--to=heiko.stuebner@bq.com \
--cc=dirk.behme@de.bosch.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.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).