From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI / PMIC: xpower: Do pinswitch magic when reading GPADC
Date: Sat, 08 Jul 2017 16:58:03 +0300 [thread overview]
Message-ID: <1499522283.22624.309.camel@linux.intel.com> (raw)
In-Reply-To: <20170708134008.13930-1-hdegoede@redhat.com>
On Sat, 2017-07-08 at 15:40 +0200, Hans de Goede wrote:
> Testing has shown that the TS-pin's bias-current needs to be disabled
> when reading the GPIO0 pin in GPADC mode.
>
> It seems that there is only 1 bias current source and to be able to
> use it
> for the GPIO0 pin in GPADC mode it must be temporarily turned off for
> the
> TS pin, but the datasheet does not mention this.
>
> This commit adds the necessary writes to turn the TS pin BIAS current
> off before and back on after reading the GPADC. This fixes the GPADC
> always returning a reading of 0.
>
>
> + /* After switching to the GPADC pin give things some time to
> settle */
> + usleep_range(6000, 10000);
msleep(6); ?
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2017-07-08 14:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-08 13:40 [PATCH] ACPI / PMIC: xpower: Do pinswitch magic when reading GPADC Hans de Goede
2017-07-08 13:58 ` Andy Shevchenko [this message]
2017-07-09 18:16 ` Hans de Goede
2017-07-21 21:12 ` Rafael J. Wysocki
2017-07-23 12:28 ` Andy Shevchenko
2017-07-26 18:45 ` Rafael J. Wysocki
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=1499522283.22624.309.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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.