From: Jamie Lentin <jm@lentin.co.uk>
To: Andrew Lunn <andrew@lunn.ch>, Jason <jason@lakedaemon.net>
Cc: devicetree-discuss@lists.ozlabs.org,
Jamie Lentin <jm@lentin.co.uk>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
Date: Thu, 19 Jul 2012 21:30:57 +0100 [thread overview]
Message-ID: <1342729860-14647-2-git-send-email-jm@lentin.co.uk> (raw)
In-Reply-To: <1342729860-14647-1-git-send-email-jm@lentin.co.uk>
From: Andrew Lunn <andrew@lunn.ch>
Now that we have I2C support in DT, describe the LM75 in
the DT file for the DNS325.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jamie Lentin <jm@lentin.co.uk>
---
arch/arm/boot/dts/kirkwood-dns325.dts | 8 ++++++++
arch/arm/mach-kirkwood/board-dnskw.c | 15 ++-------------
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index 10bc819..e040d6c 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -16,6 +16,14 @@
};
ocp@f1000000 {
+ i2c@11000 {
+ status = "okay";
+
+ lm75: lm75@48 {
+ compatible = "national,lm75";
+ reg = <0x48>;
+ };
+ };
serial@12000 {
clock-frequency = <200000000>;
status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 179f4b3..1c97efa 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -14,7 +14,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/i2c.h>
#include <linux/ata_platform.h>
#include <linux/mv643xx_eth.h>
#include <linux/of.h>
@@ -153,13 +152,6 @@ static struct platform_device dns320_led_device = {
},
};
-static struct i2c_board_info dns325_i2c_board_info[] __initdata = {
- {
- I2C_BOARD_INFO("lm75", 0x48),
- },
- /* Something at 0x0c also */
-};
-
static struct gpio_keys_button dnskw_button_pins[] = {
{
.code = KEY_POWER,
@@ -241,17 +233,14 @@ void __init dnskw_init(void)
kirkwood_ehci_init();
kirkwood_ge00_init(&dnskw_ge00_data);
- kirkwood_i2c_init();
platform_device_register(&dnskw_button_device);
platform_device_register(&dnskw_fan_device);
- if (of_machine_is_compatible("dlink,dns-325")) {
- i2c_register_board_info(0, dns325_i2c_board_info,
- ARRAY_SIZE(dns325_i2c_board_info));
+ if (of_machine_is_compatible("dlink,dns-325"))
platform_device_register(&dns325_led_device);
- } else if (of_machine_is_compatible("dlink,dns-320"))
+ else if (of_machine_is_compatible("dlink,dns-320"))
platform_device_register(&dns320_led_device);
/* Register power-off GPIO. */
--
1.7.10.4
next prev parent reply other threads:[~2012-07-19 20:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 20:30 [PATCH 0/4] Use DT to define more of the DNS320 & DNS325 Jamie Lentin
2012-07-19 20:30 ` Jamie Lentin [this message]
2012-07-19 20:30 ` [PATCH 2/4] kirkwood: Replace DNS-320/DNS-325 leds with dt bindings Jamie Lentin
2012-07-19 20:30 ` [PATCH 3/4] ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi Jamie Lentin
2012-07-19 20:31 ` [PATCH 4/4] ARM: Kirkwood: Describe DNS32? gpio-keys in DT Jamie Lentin
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=1342729860-14647-2-git-send-email-jm@lentin.co.uk \
--to=jm@lentin.co.uk \
--cc=andrew@lunn.ch \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).