All of lore.kernel.org
 help / color / mirror / Atom feed
From: haojian.zhuang@gmail.com (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: MMP: add 88pm860x battery-charger support
Date: Mon, 7 May 2012 09:45:27 +0800	[thread overview]
Message-ID: <CAN1soZwKnY4mTZqNKLZg5wyCtrbFB+gxgb+OxD1VyKdApkqBmg@mail.gmail.com> (raw)
In-Reply-To: <20120506022636.GA29576@lizard>

On Sun, May 6, 2012 at 10:26 AM, Anton Vorontsov
<anton.vorontsov@linaro.org> wrote:
> On Tue, Mar 27, 2012 at 01:25:46PM +0800, Jett.Zhou wrote:
>> Add 88pm860x chg_desc platform data for ttc platform.
>>
>> Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
>> ---
>
> May I have an ack from ARM/MMP folks to take this into battery tree
> with the rest of the series?
>
> Thanks!
>
>> ?arch/arm/mach-mmp/ttc_dkb.c | ? 37 +++++++++++++++++++++++++++++++++++++
>> ?1 files changed, 37 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-mmp/ttc_dkb.c b/arch/arm/mach-mmp/ttc_dkb.c
>> index 5ac5d58..4e18be7 100644
>> --- a/arch/arm/mach-mmp/ttc_dkb.c
>> +++ b/arch/arm/mach-mmp/ttc_dkb.c
>> @@ -17,6 +17,9 @@
>> ?#include <linux/interrupt.h>
>> ?#include <linux/i2c/pca953x.h>
>> ?#include <linux/gpio.h>
>> +#include <linux/mfd/88pm860x.h>
>> +#include <linux/regulator/consumer.h>
>> +#include <linux/power/charger-manager.h>
>>
>> ?#include <asm/mach-types.h>
>> ?#include <asm/mach/arch.h>
>> @@ -134,8 +137,42 @@ static struct pca953x_platform_data max7312_data[] = {
>> ? ? ? },
>> ?};
>>
>> +static char *ttc_psy_chg_stat[] = {"usb", NULL};
>> +/*
>> + * Temperature can be handled by battery monitor base on interrupt
>> + * scheme, so dummy it to make sure charger-manager initialize ok.
>> + */
>> +static int dummy_temp_out_of_range(int *mC)
>> +{
>> + ? ? *mC = 2500;
>> + ? ? return 0;
>> +}
>> +
>> +struct charger_desc chg_desc_data = {
>> + ? ? .polling_mode ? ? ? ? ? = CM_POLL_ALWAYS,
>> + ? ? .polling_interval_ms ? ?= 180000,
>> + ? ? .battery_present ? ? ? ?= CM_FUEL_GAUGE,
>> + ? ? .psy_charger_stat ? ? ? = &ttc_psy_chg_stat[0],
>> + ? ? .psy_fuel_gauge ? ? ? ? = "battery-monitor",
>> + ? ? .temperature_out_of_range ? ? ? = dummy_temp_out_of_range,
>> +};
>> +m ARM/MMP folks to take this into battery tree
with the rest of the se
>> +static struct pm860x_platform_data ttc_dkb_pm8607_info = {
>> + ? ? .chg_desc ? ? ? = &chg_desc_data,
>> + ? ? .companion_addr = 0x11,
>> + ? ? .irq_mode ? ? ? = 0,
>> + ? ? .irq_base ? ? ? = IRQ_BOARD_START,
>> + ? ? .i2c_port ? ? ? = GI2C_PORT,
>> +};
>> +
>> ?static struct i2c_board_info ttc_dkb_i2c_info[] = {
>> ? ? ? {
>> + ? ? ? ? ? ? .type ? ? ? ? ? = "88PM860x",
>> + ? ? ? ? ? ? .addr ? ? ? ? ? = 0x34,
>> + ? ? ? ? ? ? .platform_data ?= &ttc_dkb_pm8607_info,
>> + ? ? ? ? ? ? .irq ? ? ? ? ? ?= IRQ_PXA910_PMIC_INT,
>> + ? ? },
>> + ? ? {
>> ? ? ? ? ? ? ? .type ? ? ? ? ? = "max7312",
>> ? ? ? ? ? ? ? .addr ? ? ? ? ? = 0x23,m ARM/MMP folks to take this into battery tree
with the rest of the se
>> ? ? ? ? ? ? ? .irq ? ? ? ? ? ?= MMP_GPIO_TO_IRQ(80),
>> --
>> 1.7.0.4m ARM/MMP folks to take this into battery tree
with the rest of the se
>
> --
> Anton Vorontsov
> Email: cbouatmailru at gmail.com

Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>

  reply	other threads:[~2012-05-07  1:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-27  5:25 [PATCH 3/3] ARM: MMP: add 88pm860x battery-charger support Jett.Zhou
2012-05-06  2:26 ` Anton Vorontsov
2012-05-07  1:45   ` Haojian Zhuang [this message]
2012-05-07  3:32 ` Raul Xiong

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=CAN1soZwKnY4mTZqNKLZg5wyCtrbFB+gxgb+OxD1VyKdApkqBmg@mail.gmail.com \
    --to=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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.