Commit 4be1f6bb authored by Heiko Stübner's avatar Heiko Stübner Committed by Alexandre Belloni

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: default avatarHeiko Stuebner <heiko@sntech.de>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent 45b4c85b
...@@ -6,11 +6,11 @@ as well as a clock output of up to 32kHz. ...@@ -6,11 +6,11 @@ as well as a clock output of up to 32kHz.
Required properties: Required properties:
- compatible: should be: "haoyu,hym8563" - compatible: should be: "haoyu,hym8563"
- reg: i2c address - reg: i2c address
- interrupts: rtc alarm/event interrupt
- #clock-cells: the value should be 0 - #clock-cells: the value should be 0
Optional properties: Optional properties:
- clock-output-names: From common clock binding - clock-output-names: From common clock binding
- interrupts: rtc alarm/event interrupt
Example: Example:
......
...@@ -548,14 +548,16 @@ static int hym8563_probe(struct i2c_client *client, ...@@ -548,14 +548,16 @@ static int hym8563_probe(struct i2c_client *client,
return ret; return ret;
} }
ret = devm_request_threaded_irq(&client->dev, client->irq, if (client->irq > 0) {
NULL, hym8563_irq, ret = devm_request_threaded_irq(&client->dev, client->irq,
IRQF_TRIGGER_LOW | IRQF_ONESHOT, NULL, hym8563_irq,
client->name, hym8563); IRQF_TRIGGER_LOW | IRQF_ONESHOT,
if (ret < 0) { client->name, hym8563);
dev_err(&client->dev, "irq %d request failed, %d\n", if (ret < 0) {
client->irq, ret); dev_err(&client->dev, "irq %d request failed, %d\n",
return ret; client->irq, ret);
return ret;
}
} }
/* check state of calendar information */ /* check state of calendar information */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment