aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2012-07-16 06:19:34 -0400
committerAndrew Lunn <andrew@lunn.ch>2012-07-27 10:49:36 -0400
commit55650d4e5b0b8de785e4682f4149951e2ce0e731 (patch)
tree6a5a21b3c8fa5d91827ad59dab2baf6adddddb5f
parent2cef1a2853aece830586453296e413240961a42b (diff)
ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
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>
-rw-r--r--arch/arm/boot/dts/kirkwood-dns325.dts8
-rw-r--r--arch/arm/mach-kirkwood/board-dnskw.c15
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 17895d92d4ba..debb3703dfe7 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -16,6 +16,14 @@
16 }; 16 };
17 17
18 ocp@f1000000 { 18 ocp@f1000000 {
19 i2c@11000 {
20 status = "okay";
21
22 lm75: lm75@48 {
23 compatible = "national,lm75";
24 reg = <0x48>;
25 };
26 };
19 serial@12000 { 27 serial@12000 {
20 clock-frequency = <200000000>; 28 clock-frequency = <200000000>;
21 status = "okay"; 29 status = "okay";
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 179f4b363d77..1c97efa7705e 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -14,7 +14,6 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/i2c.h>
18#include <linux/ata_platform.h> 17#include <linux/ata_platform.h>
19#include <linux/mv643xx_eth.h> 18#include <linux/mv643xx_eth.h>
20#include <linux/of.h> 19#include <linux/of.h>
@@ -153,13 +152,6 @@ static struct platform_device dns320_led_device = {
153 }, 152 },
154}; 153};
155 154
156static struct i2c_board_info dns325_i2c_board_info[] __initdata = {
157 {
158 I2C_BOARD_INFO("lm75", 0x48),
159 },
160 /* Something at 0x0c also */
161};
162
163static struct gpio_keys_button dnskw_button_pins[] = { 155static struct gpio_keys_button dnskw_button_pins[] = {
164 { 156 {
165 .code = KEY_POWER, 157 .code = KEY_POWER,
@@ -241,17 +233,14 @@ void __init dnskw_init(void)
241 233
242 kirkwood_ehci_init(); 234 kirkwood_ehci_init();
243 kirkwood_ge00_init(&dnskw_ge00_data); 235 kirkwood_ge00_init(&dnskw_ge00_data);
244 kirkwood_i2c_init();
245 236
246 platform_device_register(&dnskw_button_device); 237 platform_device_register(&dnskw_button_device);
247 platform_device_register(&dnskw_fan_device); 238 platform_device_register(&dnskw_fan_device);
248 239
249 if (of_machine_is_compatible("dlink,dns-325")) { 240 if (of_machine_is_compatible("dlink,dns-325"))
250 i2c_register_board_info(0, dns325_i2c_board_info,
251 ARRAY_SIZE(dns325_i2c_board_info));
252 platform_device_register(&dns325_led_device); 241 platform_device_register(&dns325_led_device);
253 242
254 } else if (of_machine_is_compatible("dlink,dns-320")) 243 else if (of_machine_is_compatible("dlink,dns-320"))
255 platform_device_register(&dns320_led_device); 244 platform_device_register(&dns320_led_device);
256 245
257 /* Register power-off GPIO. */ 246 /* Register power-off GPIO. */