hw/arm/aspeed: Export and rename create_pca9552() for reuse
The helper function create_pca9552() has been renamed to aspeed_create_pca9552() and made non-static for reuse by other Aspeed machine source files. A corresponding prototype is now declared in aspeed.h. This allows multiple Aspeed platforms to share PCA9552 I2C LED controller initialization logic, improving code reuse and reducing duplication. No functional changes. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/qemu-devel/20251104031325.146374-4-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
This commit is contained in:
parent
59bb848ee8
commit
670b0963bf
2 changed files with 34 additions and 22 deletions
|
|
@ -68,4 +68,16 @@ struct AspeedMachineClass {
|
|||
*/
|
||||
void aspeed_machine_class_init_cpus_defaults(MachineClass *mc);
|
||||
|
||||
/*
|
||||
* aspeed_create_pca9552:
|
||||
* @soc: pointer to the #AspeedSoCState.
|
||||
* @bus_id: the I2C bus index to attach the device.
|
||||
* @addr: the I2C address of the PCA9552 device.
|
||||
*
|
||||
* Create and attach a PCA9552 LED controller device to the specified I2C bus
|
||||
* of the given Aspeed SoC. The device is instantiated using
|
||||
* i2c_slave_create_simple() with the PCA9552 device type.
|
||||
*/
|
||||
void aspeed_create_pca9552(AspeedSoCState *soc, int bus_id, int addr);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue