mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
charge:disable wm831x_on irq before charging display
This commit is contained in:
parent
3502a1e8c0
commit
a399aeebd4
|
|
@ -396,6 +396,15 @@ static void wm831x_irq_mask(unsigned int irq)
|
|||
//printk("%s:irq=%d\n",__FUNCTION__,irq);
|
||||
}
|
||||
|
||||
static void wm831x_irq_disable(unsigned int irq)
|
||||
{
|
||||
struct wm831x *wm831x = get_irq_chip_data(irq);
|
||||
struct wm831x_irq_data *irq_data = irq_to_wm831x_irq(wm831x, irq);
|
||||
|
||||
wm831x->irq_masks_cur[irq_data->reg - 1] |= irq_data->mask;
|
||||
//printk("%s:irq=%d\n",__FUNCTION__,irq);
|
||||
}
|
||||
|
||||
static int wm831x_irq_set_type(unsigned int irq, unsigned int type)
|
||||
{
|
||||
struct wm831x *wm831x = get_irq_chip_data(irq);
|
||||
|
|
@ -454,6 +463,7 @@ static struct irq_chip wm831x_irq_chip = {
|
|||
.name = "wm831x",
|
||||
.bus_lock = wm831x_irq_lock,
|
||||
.bus_sync_unlock = wm831x_irq_sync_unlock,
|
||||
.disable = wm831x_irq_disable,
|
||||
.mask = wm831x_irq_mask,
|
||||
.unmask = wm831x_irq_unmask,
|
||||
.set_type = wm831x_irq_set_type,
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include <linux/mfd/wm831x/auxadc.h>
|
||||
#include <linux/mfd/wm831x/pmu.h>
|
||||
#include <linux/mfd/wm831x/pdata.h>
|
||||
#include <linux/mfd/wm831x/irq.h>
|
||||
#include <linux/power_supply.h>
|
||||
|
||||
|
||||
|
|
@ -388,9 +389,9 @@ static int __devinit wm831x_chg_probe(struct platform_device *pdev)
|
|||
wm831x_chg->flag_suspend = 0;
|
||||
|
||||
platform_set_drvdata(pdev, wm831x_chg);
|
||||
|
||||
disable_irq_nosync(wm831x_chg->wm831x->irq_base + WM831X_IRQ_ON);
|
||||
ret = rk29_charger_display(wm831x_chg);
|
||||
|
||||
enable_irq(wm831x_chg->wm831x->irq_base + WM831X_IRQ_ON);
|
||||
wm831x_chg->flag_chg = 0;
|
||||
wm831x_chg->flag_bl = 1;
|
||||
wm831x_chg->cnt_on = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user