From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Doug Anderson <dianders@chromium.org>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Sebastian Reichel <sre@kernel.org>
Cc: olof@lixom.net, Sachin Kamat <sachin.kamat@linaro.org>,
ajaykumar.rs@samsung.com, linux-samsung-soc@vger.kernel.org,
broonie@kernel.org, lee.jones@linaro.org,
Anton Vorontsov <anton@enomsg.org>,
linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH v3] charger: tps65090: Allow charger module to be used when no irq
Date: Thu, 17 Jul 2014 17:40:09 +0200 [thread overview]
Message-ID: <53C7EE59.1050102@collabora.co.uk> (raw)
In-Reply-To: <1403300523-17310-1-git-send-email-dianders@chromium.org>
Hello Doug,
On 06/20/2014 11:42 PM, Doug Anderson wrote:
> On the ARM Chromebook tps65090 has two masters: the AP (the main
> processor running linux) and the EC (the embedded controller). The AP
> is allowed to mess with FETs but the EC is in charge of charge control.
>
> The tps65090 interupt line is routed to both the AP and the EC, which
> can cause quite a headache. Having two people adjusting masks and
> acking interrupts is a recipe for disaster.
>
> In the shipping kernel we had a hack to have the AP pay attention to
> the IRQ but not to ack it. It also wasn't supposed to configure the
> IRQ in any way. That hack allowed us to detect when the device was
> charging without messing with the EC's state.
>
> The current tps65090 infrastructure makes the above difficult, and it
> was a bit of a hack to begin with. Rather than uglify the driver to
> support it, just extend the driver's existing notion of "no irq" to
> the charger. This makes the charger code poll every 2 seconds for AC
> detect, which is sufficient.
>
> For proper functioning, requires (mfd: tps65090: Don't tell child
> devices we have an IRQ if we don't). If we don't have that patch
> we'll simply fail to probe on devices without an interrupt (just like
> we did before this patch).
>
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
> Changes in v2:
> - Split noirq (polling mode) changes into MFD and charger
>
> This patch has been sent up a number of times with no response. It's
> needed to make the charger work on exynos5250-snow,
> exynos5420-peach-pit, and exynos5800-peach-pi. It was originally part
> of a series as <https://patchwork.kernel.org/patch/4042751/> and the
> rest of the series has long since landed.
>
Looks good to me. Also since this patch makes optional to get an IRQ, the
following annoying message is not shown anymore:
[ 2.132944] tps65090-charger tps65090-charger: Unable to get charger irq = -6
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
next prev parent reply other threads:[~2014-07-17 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-20 21:42 [RESEND PATCH v3] charger: tps65090: Allow charger module to be used when no irq Doug Anderson
2014-07-17 15:40 ` Javier Martinez Canillas [this message]
2014-07-17 20:43 ` Sebastian Reichel
-- strict thread matches above, loose matches on Subject: below --
2014-05-29 21:33 Doug Anderson
2014-05-20 17:00 Doug Anderson
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=53C7EE59.1050102@collabora.co.uk \
--to=javier.martinez@collabora.co.uk \
--cc=ajaykumar.rs@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=anton@enomsg.org \
--cc=broonie@kernel.org \
--cc=dbaryshkov@gmail.com \
--cc=dianders@chromium.org \
--cc=dwmw2@infradead.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=sachin.kamat@linaro.org \
--cc=sre@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