summary refs log tree commit diff stats
path: root/hw/nseries.c
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2009-05-14 22:35:08 +0100
committerPaul Brook <paul@codesourcery.com>2009-05-14 22:35:08 +0100
commit697454eb8e2335c21e07b8cd0a7468d1c53bed08 (patch)
tree2afa62a2e1142e9d7d5049489f0d0047d9dfe249 /hw/nseries.c
parente3b425361b3787ac1bfc6fec8f7ebae8c37d5d13 (diff)
downloadfocaccia-qemu-697454eb8e2335c21e07b8cd0a7468d1c53bed08.tar.gz
focaccia-qemu-697454eb8e2335c21e07b8cd0a7468d1c53bed08.zip
TMP105 qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/nseries.c')
-rw-r--r--hw/nseries.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/nseries.c b/hw/nseries.c
index bd904c7ddb..b7a1c6be56 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -179,6 +179,7 @@ static void n8x0_nand_setup(struct n800_s *s)
 
 static void n8x0_i2c_setup(struct n800_s *s)
 {
+    DeviceState *dev;
     qemu_irq tmp_irq = omap2_gpio_in_get(s->cpu->gpif, N8X0_TMP105_GPIO)[0];
 
     /* Attach the CPU on one end of our I2C bus.  */
@@ -191,7 +192,8 @@ static void n8x0_i2c_setup(struct n800_s *s)
                     N8X0_MENELAUS_ADDR);
 
     /* Attach a TMP105 PM chip (A0 wired to ground) */
-    i2c_set_slave_address(tmp105_init(s->i2c, tmp_irq), N8X0_TMP105_ADDR);
+    dev = i2c_create_slave(s->i2c, "tmp105", N8X0_TMP105_ADDR);
+    qdev_connect_gpio_out(dev, 0, tmp_irq);
 }
 
 /* Touchscreen and keypad controller */