From: Bastien Nocera <hadess@hadess.net>
To: "Tirdea, Irina" <irina.tirdea@intel.com>,
"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
"Purdila, Octavian" <octavian.purdila@intel.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Mark Rutland <mark.rutland@arm.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at init
Date: Fri, 25 Sep 2015 16:44:11 +0200 [thread overview]
Message-ID: <1443192251.17020.29.camel@hadess.net> (raw)
In-Reply-To: <1F3AC3675D538145B1661F571FE1805F2F0C9F85@irsmsx105.ger.corp.intel.com>
On Thu, 2015-09-10 at 14:04 +0000, Tirdea, Irina wrote:
>
> > -----Original Message-----
> > From: Bastien Nocera [mailto:hadess@hadess.net]
> > Sent: 09 September, 2015 20:03
> > To: Tirdea, Irina; linux-input@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org; Rob Herring; Pawel Moll; Ian
> > Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark
> > Rutland; devicetree@vger.kernel.org
> > Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at init
> >
> > On Thu, 2015-07-30 at 11:27 +0000, Tirdea, Irina wrote:
> > > I can send some additional patches that will simplify testing the
> > > configuration update to the Goodix device. I think this feature
> > > is
> > > the easiest
> > > to test so we can determine if writing to the interrupt pin
> > > actually
> > > works.
> > > However, even if it is a BIOS problem and the code will work, the
> > > warning
> > > will still be printed in dmesg.
> >
> >
> > Somehow missed this mail before replying to the current patchset.
> > I'd
> > be fine with that, though it's still not clear to me whether the
> > BIOS/hardware is at fault, or the code that's being added to the
> > driver
> > ;)
> >
>
> The reset procedure is described in the Goodix GT911 datasheet [1]
> and is
> used for power-on reset and power management. The power-on sequence
> is described in chapter 6.1. I2C Timing, in the Power-on Timing
> diagram.
> The sequence for putting the device to sleep is described in chapter
> 7.1. Operating Modes, c) Sleep mode. These sequences use the
> interrupt
> pin as output.
>
> The warning you mentioned comes from the following code in the goodix
> driver, which sets the interrupt to be used as output:
>
> + error = gpiod_direction_output(ts->gpiod_int, ts->client-
> >addr == 0x14);
>
> The gpiod_direction_output() call ends up in
> drivers/pinctrl/intel/pinctrl-baytrail.c:
> /*
> * Before making any direction modifications, do a check if gpio
> * is set for direct IRQ. On baytrail, setting GPIO to output does
> * not make sense, so let's at least warn the caller before they
> shoot
> * themselves in the foot.
> */
> WARN(readl(conf_reg) & BYT_DIRECT_IRQ_EN,
> "Potential Error: Setting GPIO with direct_irq_en to output");
>
> So the problem comes from using the gpio interrupt pin as output,
> which
> should not work on Baytrail if BYT_DIRECT_IRQ_EN is set by BIOS.
> The above warning is introduced and discussed in [2] and [3]. As I
> mentioned,
> this could be a real HW issue or the BIOS sets BYT_DIRECT_IRQ_EN when
> it should not. I have also tested these patches on a Baytrail
> plarform
> (that uses the same pinctrl driver), but I did not see any issues
> since
> BYT_DIRECT_IRQ_EN is not set in my case for the interrupt gpio pin.
Do we have a way to work-around this in the GPIO driver?
> To determine if using the interrupt pin as output works, you can test
> updating
> the goodix configuration [4].
Right, the problem being that it's a later patch in the branch, and
that the driver will fail to probe if there's an error from the GPIO
call.
Would you have a patch for me to test that would bypass this error, or
at least fallback gracefully to not resetting, not probing GPIOs if
they're badly setup?
Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-09-25 14:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 16:28 [PATCH v3 0/5] Goodix touchscreen enhancements Irina Tirdea
2015-06-29 16:28 ` [PATCH v3 1/5] Input: goodix - reset device at init Irina Tirdea
2015-06-30 15:56 ` Bastien Nocera
2015-07-30 11:27 ` Tirdea, Irina
[not found] ` <1F3AC3675D538145B1661F571FE1805F2F0AC0D3-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-09-09 17:02 ` Bastien Nocera
2015-09-10 14:04 ` Tirdea, Irina
2015-09-25 14:44 ` Bastien Nocera [this message]
2015-09-25 21:04 ` Tirdea, Irina
[not found] ` <1F3AC3675D538145B1661F571FE1805F2F0E98FC-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-09-29 2:04 ` Bastien Nocera
2015-09-29 17:47 ` Tirdea, Irina
[not found] ` <1F3AC3675D538145B1661F571FE1805F2F0EBB24-pww93C2UFcwu0RiL9chJVbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-09-30 11:15 ` Bastien Nocera
[not found] ` <1443611739.5056.8.camel-0MeiytkfxGOsTnJN9+BGXg@public.gmane.org>
2015-09-30 14:01 ` Carlos Garnacho
2015-10-01 14:42 ` Tirdea, Irina
2015-06-29 16:28 ` [PATCH v3 2/5] Input: goodix - write configuration data to device Irina Tirdea
2015-06-29 16:28 ` [PATCH v3 3/5] Input: goodix - add power management support Irina Tirdea
2015-06-30 15:56 ` Bastien Nocera
2015-07-30 11:32 ` Tirdea, Irina
[not found] ` <1435595304-4840-1-git-send-email-irina.tirdea-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-06-29 16:28 ` [PATCH v3 4/5] Input: goodix - use goodix_i2c_write_u8 instead of i2c_master_send Irina Tirdea
2015-06-29 16:28 ` [PATCH v3 5/5] Input: goodix - add support for ESD Irina Tirdea
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=1443192251.17020.29.camel@hadess.net \
--to=hadess@hadess.net \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=irina.tirdea@intel.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=octavian.purdila@intel.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@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).