Skip to content

Commit

Permalink
mfd: tps65086: make interrupt line optional
Browse files Browse the repository at this point in the history
The BeagleV Starlight v0.9 board doesn't have the IRQB line from the
pmic routed to the SoC, so this hack is needed to allow the driver
to be loaded without it. See
beagleboard/beaglev-starlight#14

Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
  • Loading branch information
esmil authored and sarnold committed May 18, 2021
1 parent 179c397 commit 3f1a9f4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/mfd/tps65086.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,13 @@ static int tps65086_probe(struct i2c_client *client,
(char)((version & TPS65086_DEVICEID_OTP_MASK) >> 4) + 'A',
(version & TPS65086_DEVICEID_REV_MASK) >> 6);

ret = regmap_add_irq_chip(tps->regmap, tps->irq, IRQF_ONESHOT, 0,
&tps65086_irq_chip, &tps->irq_data);
if (ret) {
dev_err(tps->dev, "Failed to register IRQ chip\n");
return ret;
if (tps->irq > 0) {
ret = regmap_add_irq_chip(tps->regmap, tps->irq, IRQF_ONESHOT, 0,
&tps65086_irq_chip, &tps->irq_data);
if (ret) {
dev_err(tps->dev, "Failed to register IRQ chip\n");
return ret;
}
}

ret = mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO, tps65086_cells,
Expand Down

0 comments on commit 3f1a9f4

Please sign in to comment.