[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-rtc
Subject: Re: [PATCH 2/2] rtc: x1205: Add DT probing support
From: Alexandre Belloni <alexandre.belloni () bootlin ! com>
Date: 2019-01-31 15:30:12
Message-ID: 20190131153012.GA15115 () piout ! net
[Download RAW message or body]
Hi Linus,
On 31/01/2019 16:06:42+0100, Linus Walleij wrote:
> This makes it possible to probe the X1205 RTC from the
> device tree. This is needed when adding device tree boot
> support for the IXP4xx-based NSLU2 which has this RTC.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/rtc/rtc-x1205.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/rtc/rtc-x1205.c b/drivers/rtc/rtc-x1205.c
> index f08f18e4fcdf..c2b64c9363da 100644
> --- a/drivers/rtc/rtc-x1205.c
> +++ b/drivers/rtc/rtc-x1205.c
> @@ -673,9 +673,15 @@ static const struct i2c_device_id x1205_id[] = {
> };
> MODULE_DEVICE_TABLE(i2c, x1205_id);
>
> +static const struct of_device_id x1205_dt_ids[] = {
> + { .compatible = "xircom,x1205", },
> +};
> +MODULE_DEVICE_TABLE(of, x1205_dt_ids);
> +
I think this is not necessary and this will probe without the
of_match_table but it doesn't hurt either.
> static struct i2c_driver x1205_driver = {
> .driver = {
> .name = "rtc-x1205",
> + .of_match_table = x1205_dt_ids,
> },
> .probe = x1205_probe,
> .remove = x1205_remove,
> --
> 2.20.1
>
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic