mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
rtc: hym8563: make the irq optional
Sometimes the irq line is not connected to any soc-pin. This does not hinder basic timekeeping functionality of the rtc, so probe should not fail in this case. Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
This commit is contained in:
parent
45b4c85b71
commit
4be1f6bbd1
2 changed files with 11 additions and 9 deletions
|
|
@ -548,14 +548,16 @@ static int hym8563_probe(struct i2c_client *client,
|
|||
return ret;
|
||||
}
|
||||
|
||||
ret = devm_request_threaded_irq(&client->dev, client->irq,
|
||||
NULL, hym8563_irq,
|
||||
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
||||
client->name, hym8563);
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev, "irq %d request failed, %d\n",
|
||||
client->irq, ret);
|
||||
return ret;
|
||||
if (client->irq > 0) {
|
||||
ret = devm_request_threaded_irq(&client->dev, client->irq,
|
||||
NULL, hym8563_irq,
|
||||
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
||||
client->name, hym8563);
|
||||
if (ret < 0) {
|
||||
dev_err(&client->dev, "irq %d request failed, %d\n",
|
||||
client->irq, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/* check state of calendar information */
|
||||
|
|
|
|||
Loading…
Reference in a new issue