Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251945
b: refs/heads/master
c: 863dde5
h: refs/heads/master
i:
  251943: f1f4126
v: v3
  • Loading branch information
Linus Walleij authored and Samuel Ortiz committed May 26, 2011
1 parent 0b73830 commit 758a377
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eac78a21017f5beefa75f88b966950cd89caac37
refs/heads/master: 863dde5bfa3c48f459c6302daf64f94a11c7c1e5
32 changes: 16 additions & 16 deletions trunk/drivers/mfd/ab8500-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ static void ab8500_irq_sync_unlock(struct irq_data *data)
if (new == old)
continue;

/* Interrupt register 12 does'nt exist prior to version 0x20 */
if (ab8500_irq_regoffset[i] == 11 && ab8500->chip_id < 0x20)
/* Interrupt register 12 doesn't exist prior to version 2.0 */
if (ab8500_irq_regoffset[i] == 11 &&
ab8500->chip_id < AB8500_CUT2P0)
continue;

ab8500->oldmask[i] = new;
Expand Down Expand Up @@ -307,8 +308,8 @@ static irqreturn_t ab8500_irq(int irq, void *dev)
int status;
u8 value;

/* Interrupt register 12 does'nt exist prior to version 0x20 */
if (regoffset == 11 && ab8500->chip_id < 0x20)
/* Interrupt register 12 doesn't exist prior to version 2.0 */
if (regoffset == 11 && ab8500->chip_id < AB8500_CUT2P0)
continue;

status = get_register_interruptible(ab8500, AB8500_INTERRUPT,
Expand Down Expand Up @@ -724,17 +725,15 @@ int __devinit ab8500_init(struct ab8500 *ab8500)
if (ret < 0)
return ret;

/*
* 0x0 - Early Drop
* 0x10 - Cut 1.0
* 0x11 - Cut 1.1
* 0x20 - Cut 2.0
* 0x30 - Cut 3.0
*/
if (value == 0x0 || value == 0x10 || value == 0x11 || value == 0x20 ||
value == 0x30) {
switch (value) {
case AB8500_CUTEARLY:
case AB8500_CUT1P0:
case AB8500_CUT1P1:
case AB8500_CUT2P0:
case AB8500_CUT3P0:
dev_info(ab8500->dev, "detected chip, revision: %#x\n", value);
} else {
break;
default:
dev_err(ab8500->dev, "unknown chip, revision: %#x\n", value);
return -EINVAL;
}
Expand Down Expand Up @@ -763,8 +762,9 @@ int __devinit ab8500_init(struct ab8500 *ab8500)

/* Clear and mask all interrupts */
for (i = 0; i < AB8500_NUM_IRQ_REGS; i++) {
/* Interrupt register 12 does'nt exist prior to version 0x20 */
if (ab8500_irq_regoffset[i] == 11 && ab8500->chip_id < 0x20)
/* Interrupt register 12 doesn't exist prior to version 2.0 */
if (ab8500_irq_regoffset[i] == 11 &&
ab8500->chip_id < AB8500_CUT2P0)
continue;

get_register_interruptible(ab8500, AB8500_INTERRUPT,
Expand Down
7 changes: 7 additions & 0 deletions trunk/include/linux/mfd/abx500.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
#define AB5500_2_0 0x21
#define AB5500_2_1 0x22

/* AB8500 CIDs*/
#define AB8500_CUTEARLY 0x00
#define AB8500_CUT1P0 0x10
#define AB8500_CUT1P1 0x11
#define AB8500_CUT2P0 0x20
#define AB8500_CUT3P0 0x30

/*
* AB3100, EVENTA1, A2 and A3 event register flags
* these are catenated into a single 32-bit flag in the code
Expand Down

0 comments on commit 758a377

Please sign in to comment.