]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: pcf85063: add i2c_device_id name matching support
authorMarc Ferland <ferlandm@amotus.ca>
Tue, 16 Nov 2021 16:47:33 +0000 (11:47 -0500)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 30 Nov 2021 23:07:25 +0000 (00:07 +0100)
commit225c7bf017c7ba4789445c02ec20662e025b5492
tree75e1b3e4db7e414f8e84feca54a2a79412a33ec3
parentdc75ae6311678ae782cdddd74e2d4787ee6245a5
rtc: pcf85063: add i2c_device_id name matching support

The pcf85063 driver regsitration currently supports the "compatible"
property type of matching (for DT).

This patch adds "matching by name" support to the driver by defining
an i2c_device_id table and setting the id_table parameter in the
i2c_driver struct.

This will, for example, make the driver easier to instantiate on
systems where CONFIG_OF is not enabled (x86 in my case).

Signed-off-by: Marc Ferland <ferlandm@amotus.ca>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20211116164733.17149-1-ferlandm@amotus.ca
drivers/rtc/rtc-pcf85063.c