mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Claudius Heine <ch@denx.de>
To: Alessandro Zummo <a.zummo@towertech.it>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Henning Schild <henning.schild@siemens.com>,
	Johannes Hahn <johannes-hahn@siemens.com>,
	Claudius Heine <ch@denx.de>
Subject: [PATCH 2/2] rtc: rx6110: add ACPI bindings to I2C
Date: Wed,  4 Nov 2020 11:26:29 +0100	[thread overview]
Message-ID: <20201104102629.3422048-3-ch@denx.de> (raw)
In-Reply-To: <20201104102629.3422048-1-ch@denx.de>

From: Johannes Hahn <johannes-hahn@siemens.com>

This allows the RX6110 driver to be automatically assigned to the right
device on the I2C bus.

Signed-off-by: Johannes Hahn <johannes-hahn@siemens.com>
Signed-off-by: Claudius Heine <ch@denx.de>
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 drivers/rtc/rtc-rx6110.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/rtc/rtc-rx6110.c b/drivers/rtc/rtc-rx6110.c
index ca9f486236d4..6c0c7e5a7065 100644
--- a/drivers/rtc/rtc-rx6110.c
+++ b/drivers/rtc/rtc-rx6110.c
@@ -13,6 +13,7 @@
 #include <linux/of_gpio.h>
 #include <linux/regmap.h>
 #include <linux/rtc.h>
+#include <linux/acpi.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
 #include <linux/spi/spi.h>
@@ -455,6 +456,14 @@ static int rx6110_i2c_probe(struct i2c_client *client,
 	return 0;
 }
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id rx6110_i2c_acpi_match[] = {
+	{ "RX6110SA", },
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, rx6110_i2c_acpi_match);
+#endif
+
 static const struct i2c_device_id rx6110_i2c_id[] = {
 	{ "rx6110", 0 },
 	{ }
@@ -464,6 +473,9 @@ MODULE_DEVICE_TABLE(i2c, rx6110_i2c_id);
 static struct i2c_driver rx6110_i2c_driver = {
 	.driver = {
 		.name = RX6110_DRIVER_NAME,
+#ifdef CONFIG_ACPI
+		.acpi_match_table = ACPI_PTR(rx6110_i2c_acpi_match),
+#endif
 	},
 	.probe		= rx6110_i2c_probe,
 	.id_table	= rx6110_i2c_id,
-- 
2.20.1


  parent reply	other threads:[~2020-11-04 10:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 10:26 [PATCH 0/2] Adding I2C support to RX6110 RTC Claudius Heine
2020-11-04 10:26 ` [PATCH 1/2] rtc: rx6110: add i2c support Claudius Heine
2020-11-05 22:19   ` Alexandre Belloni
2020-11-04 10:26 ` Claudius Heine [this message]
2020-11-05 22:14 ` [PATCH 0/2] Adding I2C support to RX6110 RTC Alexandre Belloni
2020-11-06  7:40   ` Henning Schild
2020-11-06  7:59     ` Alexandre Belloni
2020-11-06  8:57       ` Henning Schild
2020-11-06  9:08         ` Alexandre Belloni
2020-11-06  7:51   ` Claudius Heine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201104102629.3422048-3-ch@denx.de \
    --to=ch@denx.de \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=henning.schild@siemens.com \
    --cc=johannes-hahn@siemens.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®