All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: linux-kernel@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>, Sebastian Reichel <sre@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH v2 0/3] bq24735-charger: allow gpio polling and sharing
Date: Wed, 14 Dec 2016 00:56:42 +0100	[thread overview]
Message-ID: <1481673405-4547-1-git-send-email-peda@axentia.se> (raw)

Hi!

v1 -> v2 changes:
- use poll-interval instead of ti,poll-interval-ms in the bindings
- properly initialize the shared_lock mutex
- don't share gpios on active low/high mismatch
- don't regress users specifying the old ti,ac-detect-gpio form (without
  the trailing s)

I have a board that features a couple of parallel bq24735 chargers.
However, only one of the chargers has its ACOK pin wired to a gpio,
the other parallel chargers are expected to just behave the same
as the charger that has been singled out like this. Another thing
with the board is that the gpio is not capable of generating an
interrupt.

This series fixes things for me (ok, the first patch was just a
fix for a thing that initially had me confused for a bit, and is
totally unrelated. Ignore if you want to, it's basically just churn).

One thing that I wonder about is if anything should be done to
prevent unloading of the instance that shares its gpio? I thought
about adding a device_link_add() call, but am unsure if that would
be approprite? I'm not unloading drivers at all so it's a total
non-issue for me...

Cheers,
peda

Peter Rosin (3):
  power: supply: bq24735-charger: simplify register update to stop
    charging
  power: supply: bq24735-charger: optionally poll the ac-detect gpio
  power: supply: bq24735-charger: allow chargers to share the ac-detect
    gpio

 .../bindings/power/supply/ti,bq24735.txt           |   2 +
 drivers/power/supply/bq24735-charger.c             | 164 ++++++++++++++++++---
 2 files changed, 148 insertions(+), 18 deletions(-)

-- 
2.1.4

             reply	other threads:[~2016-12-14  0:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-13 23:56 Peter Rosin [this message]
2016-12-13 23:56 ` [PATCH v2 1/3] power: supply: bq24735-charger: simplify register update to stop charging Peter Rosin
2016-12-14 16:41   ` Sebastian Reichel
2016-12-13 23:56 ` [PATCH v2 2/3] power: supply: bq24735-charger: optionally poll the ac-detect gpio Peter Rosin
2016-12-14 15:10   ` Sebastian Reichel
2016-12-15  9:28     ` [PATCH v3] " Peter Rosin
2016-12-15  9:28       ` Peter Rosin
2016-12-17 15:04       ` Sebastian Reichel
2016-12-17 15:04         ` Sebastian Reichel
2016-12-19 22:16       ` Rob Herring
2016-12-13 23:56 ` [PATCH v2 3/3] power: supply: bq24735-charger: allow chargers to share " Peter Rosin
2016-12-14 16:59   ` Sebastian Reichel
2016-12-14 17:01     ` Sebastian Reichel
2016-12-14 17:41       ` Peter Rosin
2016-12-14 17:41         ` Peter Rosin
2016-12-30  7:49         ` Linus Walleij
2017-01-02  8:31           ` Peter Rosin
2017-01-09 18:55             ` Linus Walleij

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=1481673405-4547-1-git-send-email-peda@axentia.se \
    --to=peda@axentia.se \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.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 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.