Thread (11 messages) 11 messages, 3 authors, 2016-08-16

Re: [PATCH v2 4/4] power: sbs-battery: Use gpio_desc and sleeping calls for battery detect

From: Sebastian Reichel <sre@kernel.org>
Date: 2016-08-16 10:26:39

Hi Phil,

On Tue, Aug 16, 2016 at 05:35:09PM +0800, Phil Reid wrote:
On 16/08/2016 05:08, Sebastian Reichel wrote:
quoted
Hi Phil,

On Mon, Jul 25, 2016 at 10:43:00AM +0800, Phil Reid wrote:
quoted
Switch to using new gpio_desc interface and devm gpio get calls to
automatically manage gpio resource. Use gpiod_get_value which handles
active high / low calls.

If gpio_detect is set then force loading of the driver as it is
reasonable to assume that the battery may not be present.

Update the is_present flag immediately in the IRQ.
I queued PATCH 1-3. Please send a new revision for PATCH 4 (this
one) with the following changes:

 * add the correct gpiod include: <include/linux/gpio/consumer.h>
 * rebase on power-supply's next branch
 * remove battery_detect and battery_detect_present from the
   struct sbs_platform_data and always use the gpiod API. It's
   data can also come from platform data, see
   Documentation/gpio/board.txt and Documentation/gpio/consumer.txt

-- Sebastian
G'day Sebastian,

Thanks, I'll have a look at how that works.
I wasn't sure it was acceptable to change the interface to
sbs_platform_data.
Yes, that API is not exposed by the kernel, so it can be changed.
Since there are no users as far as I can see, changing it should
be quite simple. Thanks for the driver cleanup.

-- Sebastian

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help