Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319752
b: refs/heads/master
c: 2b40459
h: refs/heads/master
v: v3
  • Loading branch information
Yadwinder Singh Brar authored and Samuel Ortiz committed Jul 9, 2012
1 parent af68f46 commit 730f094
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 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: 9bdf9b4ec7c8b707cd0d9109d576c4eb69cd84bb
refs/heads/master: 2b40459b7ee502c970d9f1dcf94dfa4d58ec1d85
33 changes: 20 additions & 13 deletions trunk/drivers/mfd/max77686-irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,21 +252,28 @@ int max77686_irq_init(struct max77686_dev *max77686)

mutex_init(&max77686->irqlock);

max77686->irq = gpio_to_irq(max77686->irq_gpio);

if (debug_mask & MAX77686_DEBUG_IRQ_INT) {
ret = gpio_request(max77686->irq_gpio, "pmic_irq");
if (ret < 0) {
dev_err(max77686->dev,
"Failed to request gpio %d with ret: %d\n",
max77686->irq_gpio, ret);
return IRQ_NONE;
if (max77686->irq_gpio && !max77686->irq) {
max77686->irq = gpio_to_irq(max77686->irq_gpio);

if (debug_mask & MAX77686_DEBUG_IRQ_INT) {
ret = gpio_request(max77686->irq_gpio, "pmic_irq");
if (ret < 0) {
dev_err(max77686->dev,
"Failed to request gpio %d with ret:"
"%d\n", max77686->irq_gpio, ret);
return IRQ_NONE;
}

gpio_direction_input(max77686->irq_gpio);
val = gpio_get_value(max77686->irq_gpio);
gpio_free(max77686->irq_gpio);
pr_info("%s: gpio_irq=%x\n", __func__, val);
}
}

gpio_direction_input(max77686->irq_gpio);
val = gpio_get_value(max77686->irq_gpio);
gpio_free(max77686->irq_gpio);
pr_info("%s: gpio_irq=%x\n", __func__, val);
if (!max77686->irq) {
dev_err(max77686->dev, "irq is not specified\n");
return -ENODEV;
}

/* Mask individual interrupt sources */
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/mfd/max77686.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c,

max77686->wakeup = pdata->wakeup;
max77686->irq_gpio = pdata->irq_gpio;
max77686->irq = i2c->irq;

if (regmap_read(max77686->regmap,
MAX77686_REG_DEVICE_ID, &data) < 0) {
Expand Down

0 comments on commit 730f094

Please sign in to comment.