Skip to content

Commit 7e2a60e

Browse files
rtc: rv3028: make rv3028 probeable from userspace
With this commit, it will be possible to bind a rv3028 device from userspace This is done by: echo rtc-rv3028 0x52 > /sys/bus/i2c/devices/i2c-XX/new_device Signed-off-by: Johannes Kirchmair <johannes.kirchmair@sigmatek.at> Link: https://lore.kernel.org/r/20230327085550.1721861-1-johannes.kirchmair@sigmatek.at Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent fdd63f6 commit 7e2a60e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/rtc/rtc-rv3028.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,12 +994,19 @@ static const __maybe_unused struct of_device_id rv3028_of_match[] = {
994994
};
995995
MODULE_DEVICE_TABLE(of, rv3028_of_match);
996996

997+
static const struct i2c_device_id rv3028_id_table[] = {
998+
{ .name = "rv3028", },
999+
{ }
1000+
};
1001+
MODULE_DEVICE_TABLE(i2c, rv3028_id_table);
1002+
9971003
static struct i2c_driver rv3028_driver = {
9981004
.driver = {
9991005
.name = "rtc-rv3028",
10001006
.acpi_match_table = rv3028_i2c_acpi_match,
10011007
.of_match_table = of_match_ptr(rv3028_of_match),
10021008
},
1009+
.id_table = rv3028_id_table,
10031010
.probe = rv3028_probe,
10041011
};
10051012
module_i2c_driver(rv3028_driver);

0 commit comments

Comments
 (0)