Statistics
| Branch: | Revision:

root / hw / i2c.c @ d7331bed

History | View | Annotate | Download (5.2 kB)

# Date Author Comment
0d936928 06/18/2012 04:14 pm Anthony Liguori

qdev: Convert busses to QEMU Object Model

This is far less interesting than it sounds. We simply add an Object to each
BusState and then register the types appropriately. Most of the interesting
refactoring will follow in the next patches.

Since we're changing fundamental type names (BusInfo -> BusClass), it all needs...

0866aca1 06/18/2012 04:14 pm Anthony Liguori

qbus: Make child devices links

Make qbus children show up as link<> properties. There is no stable
addressing for qbus children so we use an unstable naming convention.

This is okay in QOM though because the composition name is expected to
be what's stable....

3cb75a7c 06/18/2012 04:14 pm Paolo Bonzini

qdev: Move bus properties to a separate global

Simple code movement in order to simplify future refactoring.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

bce54474 06/18/2012 04:14 pm Paolo Bonzini

qdev: Move bus properties to abstract superclasses

In qdev, each bus in practice identified an abstract superclass, but
this was mostly hidden. In QOM, instead, these abstract classes are
explicit so we can move bus properties there.

All bus property walks are removed, and all device property walks...

83f7d43a 02/15/2012 05:39 pm Andreas Färber

qom: Unify type registration

Replace device_init() with generalized type_init().

While at it, unify naming convention: type_init([$prefix_]register_types)
Also, type_init() is a function, so add preceding blank line where
necessary and don't put a semicolon after the closing brace....

39bffca2 02/03/2012 06:41 pm Anthony Liguori

qdev: register all types natively through QEMU Object Model

This was done in a mostly automated fashion. I did it in three steps and then
rebased it into a single step which avoids repeatedly touching every file in
the tree.

The first step was a sed-based addition of the parent type to the subclass...

d307af79 02/03/2012 06:41 pm Anthony Liguori

qdev: kill off DeviceInfo

It is no longer used in the tree since everything is done natively through
QEMU Object Model.

Signed-off-by: Anthony Liguori <>

9e07bdf8 01/27/2012 06:50 pm Anthony Liguori

i2c: rename i2c_slave -> I2CSlave

Signed-off-by: Anthony Liguori <>

b5ea9327 01/27/2012 06:50 pm Anthony Liguori

i2c: smbus: convert to QEMU Object Model

This converts two types because smbus is implemented as a subclass of i2c. It's
extremely difficult to convert these two independently.

Signed-off-by: Anthony Liguori <>

d8bb00d6 10/28/2011 08:25 pm Paolo Bonzini

qdev: switch children device list to QTAILQ

SCSI buses will need to read the children list first-to-last. This
requires using a QTAILQ, because hell breaks loose if you just try
inserting at the tail (thus reversing the order of all existing
visits from last-to-first to first-to-tail)....

8e31bf38 07/23/2011 07:26 pm Matthew Fernandez

Correct spelling of licensed

Correct typos of "licenced" to "licensed".

Reviewed-by: Stefan Weil <>
Reviewed-by: Andreas F=E4rber <>
Signed-off-by: Matthew Fernandez <>
Signed-off-by: Anthony Liguori <>

0be71e32 07/06/2010 06:36 pm Alex Williamson

savevm: Add DeviceState param

When available, we'd like to be able to access the DeviceState
when registering a savevm. For buses with a get_dev_path()
function, this will allow us to create more unique savevm
id strings.

Signed-off-by: Alex Williamson <>...

b3a21988 12/02/2009 06:26 pm Juha Riihimäki

fix I2C slave addressing

With the recent device handling changes the I2C slave addressing code
was broken. With current code, if a slave with the correct address is

not found on the bus the last scanned slave on the bus will be
addressed. This is wrong. Please find attached a patch to fix it....

e23a1b33 10/07/2009 04:54 pm Markus Armbruster

New qdev_init_nofail()

Like qdev_init(), but terminate program via hw_error() instead of
returning an error value.

Use it instead of qdev_init() where terminating the program on failure
is okay, either because it's during machine construction, or because...

6b0e766f 10/05/2009 05:32 pm Juan Quintela

vmstate: remove i2c_slave_load/save

All its users moved to vmstate

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

1894839f 10/05/2009 05:32 pm Juan Quintela

vmstate: create VMSTATE_I2C_SLAVE

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

5b7f5327 10/05/2009 05:32 pm Juan Quintela

i2c: addresses are load/save as uint8_t values, change types to reflect this

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

8d0eb050 10/05/2009 05:32 pm Juan Quintela

vmstate: port i2c_bus device

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

bcbe8068 10/05/2009 05:32 pm Juan Quintela

vmstate: port i2c_slave device

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

81a322d4 08/28/2009 04:43 am Gerd Hoffmann

qdev: add return value to init() callbacks.

Sorry folks, but it has to be. One more of these invasive qdev patches.

We have a serious design bug in the qdev interface: device init
callbacks can't signal failure because the init() callback has no
return value. This patch fixes it....

368eb5d4 08/10/2009 09:05 pm Gerd Hoffmann

qdev/prop: convert i2c.c to helper macros.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>
Message-Id:

ee6847d1 07/17/2009 01:28 am Gerd Hoffmann

qdev: rework device properties.

This patch is a major overhaul of the device properties. The properties
are saved directly in the device state struct now, the linked list of
property values is gone.

Advantages: * We don't have to maintain the list with the property values....

10c4c98a 07/09/2009 03:07 pm Gerd Hoffmann

qdev: replace bus_type enum with bus_info struct.

BusInfo is filled with name and size (pretty much like I did for
DeviceInfo as well). There is also a function pointer to print
bus-specific device information to the monitor. sysbus is hooked
up there, I've also added a print function for PCI....

074f2fff 06/11/2009 03:47 pm Gerd Hoffmann

qdev: move name+size into DeviceInfo (v2)

Rationale: move device information from code to data structures.

v2: Adapt the drivers missed in the first version.

Signed-off-by: Gerd Hoffmann <>

02e2da45 05/23/2009 02:13 am Paul Brook

Add common BusState

Implement and use a common device bus state. The main side-effect is
that creating a bus and attaching it to a parent device are no longer
separate operations. For legacy code we allow a NULL parent, but that
should go away eventually....

fe8de492 05/15/2009 12:35 am Paul Brook

I2C qdev support

Signed-off-by: Paul Brook <>

e325e1f8 05/15/2009 12:35 am Paul Brook

I2C cleanup

Signed-off-by: Paul Brook <>

d0c22f49 07/29/2008 04:57 pm balrog

Fix load width for slave address in i2c_bus_load (Chris Lalancette).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4966 c046a42c-6fe2-441c-8c8c-71466251a162

c701b35b 07/02/2008 02:16 am pbrook

Fix i2c save/restore.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4820 c046a42c-6fe2-441c-8c8c-71466251a162

87ecb68b 11/17/2007 07:14 pm pbrook

Break up vl.h.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162

4a2c8ac2 11/03/2007 02:51 am balrog

Initial OMAP I^2C controller implementation (communication not tested).
Correct an i2c_start_transfer comment.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3514 c046a42c-6fe2-441c-8c8c-71466251a162

5fafdf24 09/17/2007 12:08 am ths

find -type f | xargs sed -i 's/[\t ]$//g' # on most files

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162

aa941b94 05/24/2007 09:50 pm balrog

Savevm/loadvm bits for ARM core, the PXA2xx peripherals and Spitz hardware.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2857 c046a42c-6fe2-441c-8c8c-71466251a162

0ff596d0 05/23/2007 03:03 am pbrook

I2C/SMBus framework.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2845 c046a42c-6fe2-441c-8c8c-71466251a162