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)
commit1c1b3098ae1e0d9725d0d4d49986e0edebba443a
tree75e1b3e4db7e414f8e84feca54a2a79412a33ec3
parentf601aa7930669439623dd266fc9e90b0218b42c1
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