* [PATCH] rtc: rv3028: make rv3028 probeable from userspace
@ 2023-03-27 8:55 Johannes Kirchmair
2023-05-04 8:37 ` Johannes Kirchmair
2023-06-25 23:11 ` Alexandre Belloni
0 siblings, 2 replies; 3+ messages in thread
From: Johannes Kirchmair @ 2023-03-27 8:55 UTC (permalink / raw)
To: linux-rtc; +Cc: johannes.kirchmair
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>
---
drivers/rtc/rtc-rv3028.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
index ec5d7a614e2d..35fb27c11979 100644
--- a/drivers/rtc/rtc-rv3028.c
+++ b/drivers/rtc/rtc-rv3028.c
@@ -994,12 +994,19 @@ static const __maybe_unused struct of_device_id rv3028_of_match[] = {
};
MODULE_DEVICE_TABLE(of, rv3028_of_match);
+static const struct i2c_device_id rv3028_id_table[] = {
+ { .name = "rtc-rv3028", },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, rv3028_id_table);
+
static struct i2c_driver rv3028_driver = {
.driver = {
.name = "rtc-rv3028",
.acpi_match_table = rv3028_i2c_acpi_match,
.of_match_table = of_match_ptr(rv3028_of_match),
},
+ .id_table = rv3028_id_table,
.probe_new = rv3028_probe,
};
module_i2c_driver(rv3028_driver);
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] rtc: rv3028: make rv3028 probeable from userspace
2023-03-27 8:55 [PATCH] rtc: rv3028: make rv3028 probeable from userspace Johannes Kirchmair
@ 2023-05-04 8:37 ` Johannes Kirchmair
2023-06-25 23:11 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Kirchmair @ 2023-05-04 8:37 UTC (permalink / raw)
To: linux-rtc@vger.kernel.org; +Cc: Johannes Kirchmair
Just a kind ping.
Best regards
Johannes
> -----Original Message-----
> From: Johannes Kirchmair <johannes.kirchmair@sigmatek.at>
> Sent: Montag, 27. März 2023 10:56
> To: linux-rtc@vger.kernel.org
> Cc: Johannes Kirchmair <johannes.kirchmair@sigmatek.at>
> Subject: [PATCH] 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>
> ---
> drivers/rtc/rtc-rv3028.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/rtc/rtc-rv3028.c b/drivers/rtc/rtc-rv3028.c
> index ec5d7a614e2d..35fb27c11979 100644
> --- a/drivers/rtc/rtc-rv3028.c
> +++ b/drivers/rtc/rtc-rv3028.c
> @@ -994,12 +994,19 @@ static const __maybe_unused struct of_device_id
> rv3028_of_match[] = {
> };
> MODULE_DEVICE_TABLE(of, rv3028_of_match);
>
> +static const struct i2c_device_id rv3028_id_table[] = {
> + { .name = "rtc-rv3028", },
> + { }
> +};
> +MODULE_DEVICE_TABLE(i2c, rv3028_id_table);
> +
> static struct i2c_driver rv3028_driver = {
> .driver = {
> .name = "rtc-rv3028",
> .acpi_match_table = rv3028_i2c_acpi_match,
> .of_match_table = of_match_ptr(rv3028_of_match),
> },
> + .id_table = rv3028_id_table,
> .probe_new = rv3028_probe,
> };
> module_i2c_driver(rv3028_driver);
> --
> 2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rtc: rv3028: make rv3028 probeable from userspace
2023-03-27 8:55 [PATCH] rtc: rv3028: make rv3028 probeable from userspace Johannes Kirchmair
2023-05-04 8:37 ` Johannes Kirchmair
@ 2023-06-25 23:11 ` Alexandre Belloni
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2023-06-25 23:11 UTC (permalink / raw)
To: Johannes Kirchmair; +Cc: linux-rtc
On 27/03/2023 10:55:50+0200, Johannes Kirchmair wrote:
> 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>
> ---
> drivers/rtc/rtc-rv3028.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
I applied it after fixing a merge issue and removing the rtc- prefix
from the i2c_device_id.
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-25 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-27 8:55 [PATCH] rtc: rv3028: make rv3028 probeable from userspace Johannes Kirchmair
2023-05-04 8:37 ` Johannes Kirchmair
2023-06-25 23:11 ` Alexandre Belloni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).