rtc: rx8581: adding Device Tree support
PATCH 1/1 rtc: rx8581: adding Device Tree support
Signed-off-by Piotr Stankiewicz <[email protected]>
--- drivers/rtc/rtc-rx8581.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/rtc/rtc-rx8581.c +9 -0
@@ -312,9 +312,18 @@ static const struct i2c_device_id rx8581_id[] = { };MODULE_DEVICE_TABLE (i2c, rx8581_id); +#ifdef CONFIG_OF +static const struct of_device_id rx8581_of_match[] = { + { .compatible ="epson,rx8581" }, + {} +}; +MODULE_DEVICE_TABLE (of, rx8581_of_match); +#endif +static struct i2c_driver rx8581_driver = { .driver = { .name ="rtc-rx8581" , + .of_match_table =of_match_ptr (rx8581_of_match), }, .probe = rx8581_probe, .id_table = rx8581_id,
Signature · 12 lines
1.7.10.4 -- -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
Hi,
Quoted 11 lines · Piotr Stankiewicz
Signed-off-by Piotr Stankiewicz <[email protected]>--- drivers/rtc/rtc-rx8581.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/rtc/rtc-rx8581.c +0
-0@@ -312,9 +312,18 @@ static const struct i2c_device_id rx8581_id[] = { };
drivers/rtc/rtc-rx8581.c static const struct i2c_device_id rx8581_id[] = { · line 322
Quoted 10 lines
drivers/rtc/rtc-rx8581.c +8
-0MODULE_DEVICE_TABLE (i2c, rx8581_id); +#ifdef CONFIG_OF +static const struct of_device_id rx8581_of_match[] = { + { .compatible ="epson,rx8581" }, + {} +}; +MODULE_DEVICE_TABLE (of, rx8581_of_match); +#endif +
Is that necessary? epson,rx8581 is already matching the only i2c_device_id of this driver.
Signature · 14 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
On Thu, Nov 26, 2015 at 11:16:34AM +0100, Alexandre Belloni wrote:
Hi,
Quoted 16 lines
Hi,
Quoted 13 lines · Piotr Stankiewicz
Signed-off-by Piotr Stankiewicz <[email protected]>--- drivers/rtc/rtc-rx8581.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/rtc/rtc-rx8581.c +0
-0@@ -312,9 +312,18 @@ static const struct i2c_device_id rx8581_id[] = { };MODULE_DEVICE_TABLE (i2c, rx8581_id);
Quoted 11 lines
drivers/rtc/rtc-rx8581.c static const struct i2c_device_id rx8581_id[] = { · line 322
Quoted 8 lines
drivers/rtc/rtc-rx8581.c +8
-0+#ifdef CONFIG_OF +static const struct of_device_id rx8581_of_match[] = { + { .compatible ="epson,rx8581" }, + {} +}; +MODULE_DEVICE_TABLE (of, rx8581_of_match); +#endif +Is that necessary? epson,rx8581 is already matching the only
i2c_device_idof this driver.
It seems it is not necessary indeed, I just did a full clean build without my patch and my clock works correctly. I guess my original issue must have been caused by a dodgy defconfig/device tree.
Sorry for the confusion.
Greetings,
Piotr
Signature · 9 lines
-- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.