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 <heiko@sntech.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:
parent
45b4c85b71
commit
4be1f6bbd1
@ -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,6 +548,7 @@ static int hym8563_probe(struct i2c_client *client,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (client->irq > 0) {
|
||||||
ret = devm_request_threaded_irq(&client->dev, client->irq,
|
ret = devm_request_threaded_irq(&client->dev, client->irq,
|
||||||
NULL, hym8563_irq,
|
NULL, hym8563_irq,
|
||||||
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
IRQF_TRIGGER_LOW | IRQF_ONESHOT,
|
||||||
@ -557,6 +558,7 @@ static int hym8563_probe(struct i2c_client *client,
|
|||||||
client->irq, ret);
|
client->irq, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* check state of calendar information */
|
/* check state of calendar information */
|
||||||
ret = i2c_smbus_read_byte_data(client, HYM8563_SEC);
|
ret = i2c_smbus_read_byte_data(client, HYM8563_SEC);
|
||||||
|
Loading…
Reference in New Issue
Block a user