From: Marek Belisko <marek@goldelico.com>
To: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
rob@landley.net, jdelvare@suse.de, linux@roeck-us.net,
grant.likely@linaro.org
Cc: devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org,
hns@goldelico.com, Marek Belisko <marek@goldelico.com>
Subject: [PATCH] hwmon: twl4030-madc-hwmon: Add device tree support.
Date: Fri, 14 Feb 2014 14:20:58 +0100 [thread overview]
Message-ID: <1392384058-14240-1-git-send-email-marek@goldelico.com> (raw)
Signed-off-by: Marek Belisko <marek@goldelico.com>
---
Documentation/devicetree/bindings/hwmon/twl4030-madc-hwmon.txt | 9 +++++++++
drivers/hwmon/twl4030-madc-hwmon.c | 10 ++++++++++
2 files changed, 19 insertions(+)
create mode 100644 Documentation/devicetree/bindings/hwmon/twl4030-madc-hwmon.txt
diff --git a/Documentation/devicetree/bindings/hwmon/twl4030-madc-hwmon.txt b/Documentation/devicetree/bindings/hwmon/twl4030-madc-hwmon.txt
new file mode 100644
index 0000000..e8016d1
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/twl4030-madc-hwmon.txt
@@ -0,0 +1,9 @@
+TWL4030 MADC hwmon.
+
+Required properties:
+- compatible: "ti,twl4030-madc-hwmon"
+
+Example:
+madc-hwmon {
+ compatible = "ti,twl4030-madc-hwmon";
+};
diff --git a/drivers/hwmon/twl4030-madc-hwmon.c b/drivers/hwmon/twl4030-madc-hwmon.c
index 6c6d440..05fb572 100644
--- a/drivers/hwmon/twl4030-madc-hwmon.c
+++ b/drivers/hwmon/twl4030-madc-hwmon.c
@@ -96,6 +96,15 @@ static const struct attribute_group twl4030_madc_group = {
.attrs = twl4030_madc_attributes,
};
+#ifdef CONFIG_OF
+
+static const struct of_device_id of_twl4030_madc_hwmon_match[] = {
+ { .compatible = "ti,twl4030-madc-hwmon", },
+ {},
+};
+
+#endif
+
static int twl4030_madc_hwmon_probe(struct platform_device *pdev)
{
int ret;
@@ -134,6 +143,7 @@ static struct platform_driver twl4030_madc_hwmon_driver = {
.driver = {
.name = "twl4030_madc_hwmon",
.owner = THIS_MODULE,
+ .of_match_table = of_match_ptr(of_twl4030_madc_hwmon_match),
},
};
--
1.8.3.2
next reply other threads:[~2014-02-14 13:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 13:20 Marek Belisko [this message]
2014-02-14 13:31 ` Mark Rutland
2014-02-14 14:08 ` Belisko Marek
2014-02-16 16:39 ` Guenter Roeck
2014-02-16 17:44 ` Sebastian Reichel
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=1392384058-14240-1-git-send-email-marek@goldelico.com \
--to=marek@goldelico.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=hns@goldelico.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jdelvare@suse.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lm-sensors@lm-sensors.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob@landley.net \
--cc=robh+dt@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®