Re: [PATCH] power: max8925. remove support for irq bits that do notexist

From: Anton Vorontsov
Date: Fri Nov 25 2011 - 14:11:23 EST


MFD guys: OK to go through battery GIT tree?

On Sat, Aug 27, 2011 at 07:16:30AM +0800, Haojian Zhuang wrote:
> On Sat, Aug 27, 2011 at 6:27 AM, Philip Rakity <prakity@xxxxxxxxxxx> wrote:
> >
> > The max8925 cannot return usb status. ÂThe bits
> > - Â Â Â [MAX8925_IRQ_VCHG_USB_OVP] = {
> > -        .reg      Â= MAX8925_CHG_IRQ1,
> > -        .mask_reg    = MAX8925_CHG_IRQ1_MASK,
> > -        .offs      = 1 << 3,
> > - Â Â Â },
> > - Â Â Â [MAX8925_IRQ_VCHG_USB_F] = Â{
> > -        .reg      Â= MAX8925_CHG_IRQ1,
> > -        .mask_reg    = MAX8925_CHG_IRQ1_MASK,
> > -        .offs      = 1 << 4,
> > - Â Â Â },
> > - Â Â Â [MAX8925_IRQ_VCHG_USB_R] = {
> > -        .reg      Â= MAX8925_CHG_IRQ1,
> > -        .mask_reg    = MAX8925_CHG_IRQ1_MASK,
> > -        .offs      = 1 << 5,
> > - Â Â Â },
> >
> > do not exist in the irq register.
> >
> > Signed-off-by: Philip Rakity <prakity@xxxxxxxxxxx>
> > ---
> > Âdrivers/mfd/max8925-core.c  Â|  15 ---------------
> > Âdrivers/power/max8925_power.c | Â 13 -------------
> > Âinclude/linux/mfd/max8925.h  |  Â3 ---
> > Â3 files changed, 0 insertions(+), 31 deletions(-)
> >
> > diff --git a/drivers/mfd/max8925-core.c b/drivers/mfd/max8925-core.c
> > index e1e59c9..ca881ef 100644
> > --- a/drivers/mfd/max8925-core.c
> > +++ b/drivers/mfd/max8925-core.c
> > @@ -210,21 +210,6 @@ static struct max8925_irq_data max8925_irqs[] = {
> >        Â.mask_reg    = MAX8925_CHG_IRQ1_MASK,
> >        Â.offs      = 1 << 2,
> > Â Â Â Â},
> > - Â Â Â [MAX8925_IRQ_VCHG_USB_OVP] = {
> > -        .reg      Â= MAX8925_CHG_IRQ1,
> > -        .mask_reg    = MAX8925_CHG_IRQ1_MASK,
> > -        .offs      = 1 << 3,
> > - Â Â Â },
> > - Â Â Â [MAX8925_IRQ_VCHG_USB_F] = Â{
> > -        .reg      Â= MAX8925_CHG_IRQ1,
> > -        .mask_reg    = MAX8925_CHG_IRQ1_MASK,
> > -        .offs      = 1 << 4,
> > - Â Â Â },
> > - Â Â Â [MAX8925_IRQ_VCHG_USB_R] = {
> > -        .reg      Â= MAX8925_CHG_IRQ1,
> > -        .mask_reg    = MAX8925_CHG_IRQ1_MASK,
> > -        .offs      = 1 << 5,
> > - Â Â Â },
> > Â Â Â Â[MAX8925_IRQ_VCHG_THM_OK_R] = {
> >        Â.reg      Â= MAX8925_CHG_IRQ2,
> >        Â.mask_reg    = MAX8925_CHG_IRQ2_MASK,
> > diff --git a/drivers/power/max8925_power.c b/drivers/power/max8925_power.c
> > index 5e4e046..377d1e6 100644
> > --- a/drivers/power/max8925_power.c
> > +++ b/drivers/power/max8925_power.c
> > @@ -120,16 +120,6 @@ static irqreturn_t max8925_charger_handler(int irq, void *data)
> > Â Â Â Â Â Â Â Â__set_charger(info, 0);
> > Â Â Â Â Â Â Â Âdev_dbg(chip->dev, "Adapter removed\n");
> > Â Â Â Â Â Â Â Âbreak;
> > - Â Â Â case MAX8925_IRQ_VCHG_USB_R:
> > - Â Â Â Â Â Â Â info->usb_online = 1;
> > - Â Â Â Â Â Â Â __set_charger(info, 1);
> > - Â Â Â Â Â Â Â dev_dbg(chip->dev, "USB inserted\n");
> > - Â Â Â Â Â Â Â break;
> > - Â Â Â case MAX8925_IRQ_VCHG_USB_F:
> > - Â Â Â Â Â Â Â info->usb_online = 0;
> > - Â Â Â Â Â Â Â __set_charger(info, 0);
> > - Â Â Â Â Â Â Â dev_dbg(chip->dev, "USB removed\n");
> > - Â Â Â Â Â Â Â break;
> > Â Â Â Âcase MAX8925_IRQ_VCHG_THM_OK_F:
> > Â Â Â Â Â Â Â Â/* Battery is not ready yet */
> > Â Â Â Â Â Â Â Âdev_dbg(chip->dev, "Battery temperature is out of range\n");
> > @@ -370,9 +360,6 @@ static __devinit int max8925_init_charger(struct max8925_chip *chip,
> > Â Â Â Â Â Â Â ÂREQUEST_IRQ(MAX8925_IRQ_VCHG_DC_F, "ac-remove");
> > Â Â Â Â Â Â Â ÂREQUEST_IRQ(MAX8925_IRQ_VCHG_DC_R, "ac-insert");
> > Â Â Â Â}
> > - Â Â Â REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_OVP, "usb-ovp");
> > - Â Â Â REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_F, "usb-remove");
> > - Â Â Â REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_R, "usb-insert");
> > Â Â Â Âif (!info->no_temp_support) {
> > Â Â Â Â Â Â Â ÂREQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_R, "batt-temp-in-range");
> > Â Â Â Â Â Â Â ÂREQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_F, "batt-temp-out-range");
> > diff --git a/include/linux/mfd/max8925.h b/include/linux/mfd/max8925.h
> > index 008f807..b8e6d94 100644
> > --- a/include/linux/mfd/max8925.h
> > +++ b/include/linux/mfd/max8925.h
> > @@ -167,9 +167,6 @@ enum {
> > Â Â Â ÂMAX8925_IRQ_VCHG_DC_OVP,
> > Â Â Â ÂMAX8925_IRQ_VCHG_DC_F,
> > Â Â Â ÂMAX8925_IRQ_VCHG_DC_R,
> > - Â Â Â MAX8925_IRQ_VCHG_USB_OVP,
> > - Â Â Â MAX8925_IRQ_VCHG_USB_F,
> > - Â Â Â MAX8925_IRQ_VCHG_USB_R,
> > Â Â Â ÂMAX8925_IRQ_VCHG_THM_OK_R,
> > Â Â Â ÂMAX8925_IRQ_VCHG_THM_OK_F,
> > Â Â Â ÂMAX8925_IRQ_VCHG_SYSLOW_F,
> > --
> > 1.7.6
> >
> >
> >
>
> Loop maintainer

--
Anton Vorontsov
Email: cbouatmailru@xxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/