summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmil Renner Berthing <kernel@esmil.dk>2021-05-03 13:09:04 +0300
committerEmil Renner Berthing <kernel@esmil.dk>2021-06-07 02:11:18 +0300
commit560bb032fe5d0d4f29387c21293c55dd144c8b9b (patch)
treec19369b5a48ba3600a6828179fdb2d75315ff812
parent1494f04dd187ebda9a5b0a4782acd4b790c8a88b (diff)
downloadlinux-560bb032fe5d0d4f29387c21293c55dd144c8b9b.tar.xz
[HACK] mfd: tps65086: make interrupt line optional
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 https://github.com/beagleboard/beaglev-starlight/issues/14 Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
-rw-r--r--drivers/mfd/tps65086.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/mfd/tps65086.c b/drivers/mfd/tps65086.c
index 341466ef20cc..2e51170d4767 100644
--- a/drivers/mfd/tps65086.c
+++ b/drivers/mfd/tps65086.c
@@ -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,