@@ -385,14 +385,14 @@ static void palmetto_bmc_i2c_init(AspeedMachineState *bmc)
385
385
386
386
/* The palmetto platform expects a ds3231 RTC but a ds1338 is
387
387
* enough to provide basic RTC features. Alarms will be missing */
388
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 0 ), "ds1338" , 0x68 );
388
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 0 ), "ds1338" , 0x68 );
389
389
390
390
smbus_eeprom_init_one (aspeed_i2c_get_bus (& soc -> i2c , 0 ), 0x50 ,
391
391
eeprom_buf );
392
392
393
393
/* add a TMP423 temperature sensor */
394
- dev = i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 2 ),
395
- "tmp423" , 0x4c );
394
+ dev = DEVICE ( i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 2 ),
395
+ "tmp423" , 0x4c ) );
396
396
object_property_set_int (OBJECT (dev ), "temperature0" , 31000 , & error_abort );
397
397
object_property_set_int (OBJECT (dev ), "temperature1" , 28000 , & error_abort );
398
398
object_property_set_int (OBJECT (dev ), "temperature2" , 20000 , & error_abort );
@@ -408,12 +408,12 @@ static void ast2500_evb_i2c_init(AspeedMachineState *bmc)
408
408
eeprom_buf );
409
409
410
410
/* The AST2500 EVB expects a LM75 but a TMP105 is compatible */
411
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 7 ),
411
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 7 ),
412
412
TYPE_TMP105 , 0x4d );
413
413
414
414
/* The AST2500 EVB does not have an RTC. Let's pretend that one is
415
415
* plugged on the I2C bus header */
416
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 11 ), "ds1338" , 0x32 );
416
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 11 ), "ds1338" , 0x32 );
417
417
}
418
418
419
419
static void ast2600_evb_i2c_init (AspeedMachineState * bmc )
@@ -428,45 +428,45 @@ static void romulus_bmc_i2c_init(AspeedMachineState *bmc)
428
428
429
429
/* The romulus board expects Epson RX8900 I2C RTC but a ds1338 is
430
430
* good enough */
431
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 11 ), "ds1338" , 0x32 );
431
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 11 ), "ds1338" , 0x32 );
432
432
}
433
433
434
434
static void swift_bmc_i2c_init (AspeedMachineState * bmc )
435
435
{
436
436
AspeedSoCState * soc = & bmc -> soc ;
437
437
438
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 3 ), "pca9552" , 0x60 );
438
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 3 ), "pca9552" , 0x60 );
439
439
440
440
/* The swift board expects a TMP275 but a TMP105 is compatible */
441
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 7 ), "tmp105" , 0x48 );
441
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 7 ), "tmp105" , 0x48 );
442
442
/* The swift board expects a pca9551 but a pca9552 is compatible */
443
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 7 ), "pca9552" , 0x60 );
443
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 7 ), "pca9552" , 0x60 );
444
444
445
445
/* The swift board expects an Epson RX8900 RTC but a ds1338 is compatible */
446
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 8 ), "ds1338" , 0x32 );
447
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 8 ), "pca9552" , 0x60 );
446
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 8 ), "ds1338" , 0x32 );
447
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 8 ), "pca9552" , 0x60 );
448
448
449
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 9 ), "tmp423" , 0x4c );
449
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 9 ), "tmp423" , 0x4c );
450
450
/* The swift board expects a pca9539 but a pca9552 is compatible */
451
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 9 ), "pca9552" , 0x74 );
451
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 9 ), "pca9552" , 0x74 );
452
452
453
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 10 ), "tmp423" , 0x4c );
453
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 10 ), "tmp423" , 0x4c );
454
454
/* The swift board expects a pca9539 but a pca9552 is compatible */
455
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 10 ), "pca9552" ,
455
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 10 ), "pca9552" ,
456
456
0x74 );
457
457
458
458
/* The swift board expects a TMP275 but a TMP105 is compatible */
459
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 12 ), "tmp105" , 0x48 );
460
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 12 ), "tmp105" , 0x4a );
459
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 12 ), "tmp105" , 0x48 );
460
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 12 ), "tmp105" , 0x4a );
461
461
}
462
462
463
463
static void sonorapass_bmc_i2c_init (AspeedMachineState * bmc )
464
464
{
465
465
AspeedSoCState * soc = & bmc -> soc ;
466
466
467
467
/* bus 2 : */
468
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 2 ), "tmp105" , 0x48 );
469
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 2 ), "tmp105" , 0x49 );
468
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 2 ), "tmp105" , 0x48 );
469
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 2 ), "tmp105" , 0x49 );
470
470
/* bus 2 : pca9546 @ 0x73 */
471
471
472
472
/* bus 3 : pca9548 @ 0x70 */
@@ -476,21 +476,21 @@ static void sonorapass_bmc_i2c_init(AspeedMachineState *bmc)
476
476
smbus_eeprom_init_one (aspeed_i2c_get_bus (& soc -> i2c , 4 ), 0x54 ,
477
477
eeprom4_54 );
478
478
/* PCA9539 @ 0x76, but PCA9552 is compatible */
479
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 4 ), "pca9552" , 0x76 );
479
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 4 ), "pca9552" , 0x76 );
480
480
/* PCA9539 @ 0x77, but PCA9552 is compatible */
481
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 4 ), "pca9552" , 0x77 );
481
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 4 ), "pca9552" , 0x77 );
482
482
483
483
/* bus 6 : */
484
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 6 ), "tmp105" , 0x48 );
485
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 6 ), "tmp105" , 0x49 );
484
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 6 ), "tmp105" , 0x48 );
485
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 6 ), "tmp105" , 0x49 );
486
486
/* bus 6 : pca9546 @ 0x73 */
487
487
488
488
/* bus 8 : */
489
489
uint8_t * eeprom8_56 = g_malloc0 (8 * 1024 );
490
490
smbus_eeprom_init_one (aspeed_i2c_get_bus (& soc -> i2c , 8 ), 0x56 ,
491
491
eeprom8_56 );
492
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 8 ), "pca9552" , 0x60 );
493
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 8 ), "pca9552" , 0x61 );
492
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 8 ), "pca9552" , 0x60 );
493
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 8 ), "pca9552" , 0x61 );
494
494
/* bus 8 : adc128d818 @ 0x1d */
495
495
/* bus 8 : adc128d818 @ 0x1f */
496
496
@@ -519,16 +519,16 @@ static void witherspoon_bmc_i2c_init(AspeedMachineState *bmc)
519
519
aspeed_i2c_get_bus (& soc -> i2c , 3 ),
520
520
& error_fatal );
521
521
522
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 4 ), "tmp423" , 0x4c );
523
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 5 ), "tmp423" , 0x4c );
522
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 4 ), "tmp423" , 0x4c );
523
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 5 ), "tmp423" , 0x4c );
524
524
525
525
/* The Witherspoon expects a TMP275 but a TMP105 is compatible */
526
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 9 ), TYPE_TMP105 ,
526
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 9 ), TYPE_TMP105 ,
527
527
0x4a );
528
528
529
529
/* The witherspoon board expects Epson RX8900 I2C RTC but a ds1338 is
530
530
* good enough */
531
- i2c_create_slave (aspeed_i2c_get_bus (& soc -> i2c , 11 ), "ds1338" , 0x32 );
531
+ i2c_slave_create_simple (aspeed_i2c_get_bus (& soc -> i2c , 11 ), "ds1338" , 0x32 );
532
532
533
533
smbus_eeprom_init_one (aspeed_i2c_get_bus (& soc -> i2c , 11 ), 0x51 ,
534
534
eeprom_buf );
0 commit comments