mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Anton Vorontsov <anton@enomsg.org>,
	Olof Johansson <olof@lixom.net>,
	Sachin Kamat <sachin.kamat@linaro.org>,
	AJAY KUMAR RAMAKRISHNA SHYMALAMMA <ajaykumar.rs@samsung.com>,
	linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
	David Woodhouse <dwmw2@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] mfd: tps65090: Allow charger module to be used when no irq
Date: Wed, 16 Apr 2014 20:03:36 +0100	[thread overview]
Message-ID: <20140416190336.GB28725@lee--X1> (raw)
In-Reply-To: <CAD=FV=Vh=Ej3znMmQDfWyLbhhzZh424Kx8BA=86qcwp+AmMqBw@mail.gmail.com>


> >> >> 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.
> >> >>
> >> >> Signed-off-by: Doug Anderson <dianders@chromium.org>
> >> >> ---
> >> >>  drivers/mfd/tps65090.c           | 14 ++++++--
> >> >>  drivers/power/tps65090-charger.c | 76 +++++++++++++++++++++++++++++++---------
> >> >>  2 files changed, 70 insertions(+), 20 deletions(-)
> >> >
> >> > For the MFD part:
> >> >   Acked-by: Lee Jones <lee.jones@linaro.org>
> >> >
> >> > Anton,
> >> >   If you are okay with this patch I'd be happy to create an immutable
> >> > branch for you to pull from?
> >> >
> >> > Doug,
> >> >   What is the relationship (dependencies) between this and the other
> >> > patches in the set?
> >>
> >> This patch can be applied irrespective of other others in the series.
> >
> > What about the files in the patch? Could you make two separate patches
> > from this one patch and it would still compile okay? I'm _guessing_
> > the answer is yes?
> 
> Yes, they'll compile and even boot on their own.  I just tested it.
> 
> If I put only the MFD part in, then at boot I see:
>   tps65090-charger tps65090-charger: Unable to get charger irq = -6
> ...but otherwise the system functions.
> 
> If I put only the charger part in, then at boot:
>   tps65090-charger tps65090-charger: Unable to register irq 1 err -22
>   tps65090-charger: probe of tps65090-charger failed with error -22
> 
> ...so you need both patches in order to make things function, but they
> can be applied separately.  I'll assume it will make your life easier
> if I split this into two patches so I'll do that.

Yes please.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2014-04-16 19:03 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 20:14 [PATCH 0/3] Fixes for tps65090 for Samsung ARM Chromebook Doug Anderson
2014-04-15 20:14 ` [PATCH 1/3] mfd: tps65090: Allow charger module to be used when no irq Doug Anderson
2014-04-16  9:52   ` Lee Jones
2014-04-16 15:42     ` Doug Anderson
2014-04-16 16:26       ` Lee Jones
2014-04-16 17:45         ` Doug Anderson
2014-04-16 19:03           ` Lee Jones [this message]
2014-04-15 20:14 ` [PATCH 2/3] mfd: tps65090: Stop caching registers Doug Anderson
2014-04-16  9:59   ` Lee Jones
2014-04-16 10:13     ` Mark Brown
2014-04-16 18:27       ` Doug Anderson
2014-04-15 20:14 ` [PATCH 3/3] regulator: tps65090: Make FETs more reliable Doug Anderson
2014-04-15 22:52   ` Mark Brown
2014-04-16 18:28     ` Doug Anderson
2014-04-16 18:25 ` [PATCH v2 0/5] Fixes for tps65090 for Samsung ARM Chromebook Doug Anderson
2014-04-16 18:25   ` [PATCH v2 1/5] mfd: tps65090: Don't tell child devices we have an IRQ if we don't Doug Anderson
2014-04-16 18:25   ` [PATCH v2 2/5] charger: tps65090: Allow charger module to be used when no irq Doug Anderson
2014-04-16 18:25   ` [PATCH v2 3/5] mfd: tps65090: Stop caching most registers Doug Anderson
2014-04-16 18:25   ` [PATCH v2 4/5] regulator: tps65090: Allow setting the overcurrent wait time Doug Anderson
2014-04-16 20:33     ` Randy Dunlap
2014-04-16 23:12       ` Doug Anderson
2014-04-16 18:25   ` [PATCH v2 5/5] regulator: tps65090: Make FETs more reliable by adding retries Doug Anderson
2014-04-16 20:50     ` Simon Glass
2014-04-16 21:25       ` Doug Anderson
2014-04-16 23:24         ` Simon Glass
2014-04-16 20:51     ` Mark Brown
2014-04-16 21:34       ` Doug Anderson
2014-04-16 21:54         ` Mark Brown
2014-04-16 22:59           ` 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=20140416190336.GB28725@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=ajaykumar.rs@samsung.com \
    --cc=anton@enomsg.org \
    --cc=dbaryshkov@gmail.com \
    --cc=dianders@chromium.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=sachin.kamat@linaro.org \
    --cc=sameo@linux.intel.com \
    /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

all inboxes | Powered by JetHome®