mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 23:23:03 +00:00
regulator: pca9450: Make IRQ optional
The IRQ line might not be connected on some boards. Allow the driver to be probed without it. Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Link: https://patch.msgid.link/20240708084107.38986-5-frieder@fris.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6070471088
commit
83808c5406
@ -891,11 +891,6 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
|
||||
unsigned int reset_ctrl;
|
||||
int ret;
|
||||
|
||||
if (!i2c->irq) {
|
||||
dev_err(&i2c->dev, "No IRQ configured?\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pca9450 = devm_kzalloc(&i2c->dev, sizeof(struct pca9450), GFP_KERNEL);
|
||||
if (!pca9450)
|
||||
return -ENOMEM;
|
||||
@ -967,6 +962,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
|
||||
}
|
||||
}
|
||||
|
||||
if (pca9450->irq) {
|
||||
ret = devm_request_threaded_irq(pca9450->dev, pca9450->irq, NULL,
|
||||
pca9450_irq_handler,
|
||||
(IRQF_TRIGGER_FALLING | IRQF_ONESHOT),
|
||||
@ -985,6 +981,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
|
||||
dev_err(&i2c->dev, "Unmask irq error\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear PRESET_EN bit in BUCK123_DVS to use DVS registers */
|
||||
ret = regmap_clear_bits(pca9450->regmap, PCA9450_REG_BUCK123_DVS,
|
||||
|
Loading…
Reference in New Issue
Block a user