[<prev] [next>] [day] [month] [year] [list]
Message-ID: <A874F61F95741C4A9BA573A70FE3998FD793@DQHE02.ent.ti.com>
Date: Wed, 18 Jul 2012 14:32:26 +0000
From: "Kim, Milo" <Milo.Kim@...com>
To: "sameo@...ux.intel.com" <sameo@...ux.intel.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Girdwood, Liam" <lrg@...com>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Anton Vorontsov <cbouatmailru@...il.com>,
"dwmw2@...radead.org" <dwmw2@...radead.org>,
"a.zummo@...ertech.it" <a.zummo@...ertech.it>,
Andrew Morton <akpm@...ux-foundation.org>,
Richard Purdie <rpurdie@...ys.net>,
Bryan Wu <bryan.wu@...onical.com>
Subject: [PATCH 0/6] mfd: add lp8788 mfd driver
Device driver for TI LP8788 Power Management Unit
(Description)
The LP8788 has multiple functions.
(a) The I2C Interface
Access registers through the I2C
(b) Regulator Driver
4 BUCKs, 12 Digital LDOs and 10 Analog LDOs
(c) Battery Charger
Configurable charging parameters
(d) Real Time Clock with programmable alarm
Time counting and calendar for years 2000 - 2099
(e) Backlight Driver
Brightness can be controlled by the pwm input or the i2c command
(f) Current Sinks
3 current sinks are provided.
Each current sink can be used for keyboard LED or vibrator.
(g) A/D Converter
ADC results from registers
(e.g. measuring battery voltage, temperature and so on)
(Driver architecture)
/ regulator drivers : ldos/bucks
/ power supply driver : charger
i2c - mfd - rtc driver : rtc and alarm
(regmap) \ backlight driver : brightness
\ led : keyboard led
(Interrupt handling)
24 interrupts are used for the lp8788.
If the interrupt occurs, then each IRQ is handled in the irq threads.
Charger and RTC IRQs are passed from the main IRQ thread.
* Why don't use the regmap-irq interface
Rather than using the regmap-irq interface, LP8788 irq domain is allocated and
irq threads are created when lp8788_irq_init() is called.
(a) Interrupt enable registers vs Interrupt mask registers
LP8788 has interrupt enable registers - not masked registers.
If the bit is 1, then the IRQ can be generated by LP8788.
Otherwise, the IRQ is ignored (masked)
The bit operation of lp8788 is different from regmap-irq.
For example, to enable bit0 interrupt, the mask and value are set as following.
<lp8788> bit mask = 0xfe, value = 0x01
<regmap-irq> bit mask = 0xfe, value = 0xfe
So regmap-irq is not appropriate in lp8788 irq enable scheme.
(b) Debounce time
To guarantee latest updated interrupt information, debounce timer is required.
In the lp8788 driver, work queue is used for the delayed processing.
There is no option in the reqmap-irq.
Best Regards,
Milo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists