[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ? |
Date: |
Mon, 17 Feb 2014 17:11:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Il 17/02/2014 16:33, Alex David ha scritto:
If you need more than one bus, you need a new device exposing the
I2C bus, besides the new sensor devices. USB-I2C could be one such
device.
So let me see if I understood well. USB-I2C (host QEMU device) seems a
good idea, I could normally do : qemu-system-i386 -device
usb-I2c,chardev=foo -device usb-i2c,chardev=bar -chardev
socket,path=/tmp/test0,server,nowait,id=foo -chardev
socket,path=/tmp/test1,server,nowait,id=bar.
Almost. For QOM:
-device usb-i2c,id=usb-i2c-0
-device i2c-my-sensor,address=0x48,bus=usb-i2c-0.0
For chardev:
-device usb-i2c,id=usb-i2c-0
-chardev socket,path=/tmp/test0,server,nowait,id=chr-foo-0
-device i2c-my-sensor,address=0x48,bus=usb-i2c-0.0,chardev=chr-foo-0
Repeat for the other buses, replacing -0 with -1 and -2.
I need a "USB-I2C guest kernel driver" that would register a bus (i2c-1
for chardev foo, i2c-2 for chardev bar etc...), I guess ?
It exists already, drivers/i2c/busses/i2c-tiny-usb.c.
Paolo
- Re: [Qemu-devel] Trying to write a new device / virtio-i2c ?, (continued)
- Re: [Qemu-devel] Trying to write a new device / virtio-i2c ?, Paolo Bonzini, 2014/02/17
- Message not available
- [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Alex David, 2014/02/17
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Paolo Bonzini, 2014/02/17
- Message not available
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Paolo Bonzini, 2014/02/17
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Alex David, 2014/02/17
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Alex David, 2014/02/17
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Paolo Bonzini, 2014/02/17
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Alex David, 2014/02/17
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Paolo Bonzini, 2014/02/17
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Alex David, 2014/02/17
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?,
Paolo Bonzini <=
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Alex David, 2014/02/18
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Paolo Bonzini, 2014/02/18
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Alex David, 2014/02/18
- Re: [Qemu-devel] Fwd: Trying to write a new device / virtio-i2c ?, Paolo Bonzini, 2014/02/18