bitbang_i2c.c (c3ab4c9cf24ec9efb9c6d82b6027c0587d3081fa) bitbang_i2c.c (125ee0ed9cad04307498ac2b7b0d51ad8a807360)
1/*
2 * Bit-Bang i2c emulation extracted from
3 * Marvell MV88W8618 / Freecom MusicPal emulation.
4 *
5 * Copyright (c) 2008 Jan Kiszka
6 *
7 * This code is licensed under the GNU GPL v2.
8 *

--- 213 unchanged lines hidden (view full) ---

222}
223
224static void gpio_i2c_class_init(ObjectClass *klass, void *data)
225{
226 DeviceClass *dc = DEVICE_CLASS(klass);
227 SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
228
229 k->init = gpio_i2c_init;
1/*
2 * Bit-Bang i2c emulation extracted from
3 * Marvell MV88W8618 / Freecom MusicPal emulation.
4 *
5 * Copyright (c) 2008 Jan Kiszka
6 *
7 * This code is licensed under the GNU GPL v2.
8 *

--- 213 unchanged lines hidden (view full) ---

222}
223
224static void gpio_i2c_class_init(ObjectClass *klass, void *data)
225{
226 DeviceClass *dc = DEVICE_CLASS(klass);
227 SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
228
229 k->init = gpio_i2c_init;
230 set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
230 dc->desc = "Virtual GPIO to I2C bridge";
231}
232
233static const TypeInfo gpio_i2c_info = {
234 .name = "gpio_i2c",
235 .parent = TYPE_SYS_BUS_DEVICE,
236 .instance_size = sizeof(GPIOI2CState),
237 .class_init = gpio_i2c_class_init,
238};
239
240static void bitbang_i2c_register_types(void)
241{
242 type_register_static(&gpio_i2c_info);
243}
244
245type_init(bitbang_i2c_register_types)
231 dc->desc = "Virtual GPIO to I2C bridge";
232}
233
234static const TypeInfo gpio_i2c_info = {
235 .name = "gpio_i2c",
236 .parent = TYPE_SYS_BUS_DEVICE,
237 .instance_size = sizeof(GPIOI2CState),
238 .class_init = gpio_i2c_class_init,
239};
240
241static void bitbang_i2c_register_types(void)
242{
243 type_register_static(&gpio_i2c_info);
244}
245
246type_init(bitbang_i2c_register_types)