Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308701
b: refs/heads/master
c: 44f72e5
h: refs/heads/master
i:
  308699: b4b94dc
v: v3
  • Loading branch information
Virupax Sadashivpetimath authored and Samuel Ortiz committed May 1, 2012
1 parent de2e404 commit 9467229
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 8 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: df3df6469fd1e59284d6b5d4dd9dbe1bd7861040
refs/heads/master: 44f72e53382c9c673fd54c3bab67a6b9a2d4526e
60 changes: 55 additions & 5 deletions trunk/drivers/mfd/ab8500-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,39 @@ static struct resource __devinitdata ab8500_usb_resources[] = {
},
};

static struct resource __devinitdata ab8505_iddet_resources[] = {
{
.name = "KeyDeglitch",
.start = AB8505_INT_KEYDEGLITCH,
.end = AB8505_INT_KEYDEGLITCH,
.flags = IORESOURCE_IRQ,
},
{
.name = "KP",
.start = AB8505_INT_KP,
.end = AB8505_INT_KP,
.flags = IORESOURCE_IRQ,
},
{
.name = "IKP",
.start = AB8505_INT_IKP,
.end = AB8505_INT_IKP,
.flags = IORESOURCE_IRQ,
},
{
.name = "IKR",
.start = AB8505_INT_IKR,
.end = AB8505_INT_IKR,
.flags = IORESOURCE_IRQ,
},
{
.name = "KeyStuck",
.start = AB8505_INT_KEYSTUCK,
.end = AB8505_INT_KEYSTUCK,
.flags = IORESOURCE_IRQ,
},
};

static struct resource __devinitdata ab8500_temp_resources[] = {
{
.name = "AB8500_TEMP_WARM",
Expand Down Expand Up @@ -802,10 +835,6 @@ static struct mfd_cell __devinitdata abx500_common_devs[] = {
.num_resources = ARRAY_SIZE(ab8500_av_acc_detect_resources),
.resources = ab8500_av_acc_detect_resources,
},
{
.name = "ab8500-codec",
},

{
.name = "ab8500-poweron-key",
.num_resources = ARRAY_SIZE(ab8500_poweronkey_db_resources),
Expand Down Expand Up @@ -845,6 +874,9 @@ static struct mfd_cell __devinitdata ab8500_devs[] = {
.num_resources = ARRAY_SIZE(ab8500_usb_resources),
.resources = ab8500_usb_resources,
},
{
.name = "ab8500-codec",
},
};

static struct mfd_cell __devinitdata ab9540_devs[] = {
Expand All @@ -858,6 +890,18 @@ static struct mfd_cell __devinitdata ab9540_devs[] = {
.num_resources = ARRAY_SIZE(ab8500_usb_resources),
.resources = ab8500_usb_resources,
},
{
.name = "ab9540-codec",
},
};

/* Device list common to ab9540 and ab8505 */
static struct mfd_cell __devinitdata ab9540_ab8505_devs[] = {
{
.name = "ab-iddet",
.num_resources = ARRAY_SIZE(ab8505_iddet_resources),
.resources = ab8505_iddet_resources,
},
};

static ssize_t show_chip_id(struct device *dev,
Expand Down Expand Up @@ -1125,8 +1169,14 @@ int __devinit ab8500_init(struct ab8500 *ab8500, enum ab8500_version version)
ab8500->irq_base);
else
ret = mfd_add_devices(ab8500->dev, 0, ab8500_devs,
ARRAY_SIZE(ab9540_devs), NULL,
ARRAY_SIZE(ab8500_devs), NULL,
ab8500->irq_base);

if (is_ab9540(ab8500) || is_ab8505(ab8500))
ret = mfd_add_devices(ab8500->dev, 0, ab9540_ab8505_devs,
ARRAY_SIZE(ab9540_ab8505_devs), NULL,
ab8500->irq_base);

if (ret)
goto out_freeirq;

Expand Down
12 changes: 10 additions & 2 deletions trunk/include/linux/mfd/abx500/ab8500.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,14 @@ enum ab8500_version {
#define AB9540_INT_GPIO52F 123
#define AB9540_INT_GPIO53F 124
#define AB9540_INT_GPIO54F 125 /* not 8505 */
/* ab8500_irq_regoffset[16] -> IT[Source|Latch|Mask]25 */
#define AB8505_INT_KEYSTUCK 128
#define AB8505_INT_IKR 129
#define AB8505_INT_IKP 130
#define AB8505_INT_KP 131
#define AB8505_INT_KEYDEGLITCH 132
#define AB8505_INT_MODPWRSTATUSF 134
#define AB8505_INT_MODPWRSTATUSR 135

/*
* AB8500_AB9540_NR_IRQS is used when configuring the IRQ numbers for the
Expand All @@ -203,8 +211,8 @@ enum ab8500_version {
* which is larger.
*/
#define AB8500_NR_IRQS 112
#define AB8505_NR_IRQS 128
#define AB9540_NR_IRQS 128
#define AB8505_NR_IRQS 136
#define AB9540_NR_IRQS 136
/* This is set to the roof of any AB8500 chip variant IRQ counts */
#define AB8500_MAX_NR_IRQS AB9540_NR_IRQS

Expand Down

0 comments on commit 9467229

Please sign in to comment.