pch_i2c: implement acpi_scan_bus
Change-Id: Ib2297246ea53c9e65d602961b615c2e1f4b3478a Reviewed-on: https://review.haiku-os.org/c/haiku/+/2480 Reviewed-by: Adrien Destugues <[email protected]> Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
@@ -60,6 +60,19 @@ pch_i2c_scan_parse_callback(ACPI_RESOURCE *res, void *context)
|
|||||||
// #pragma mark -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
static status_t
|
||||||
|
acpi_scan_bus(i2c_bus_cookie cookie)
|
||||||
|
{
|
||||||
|
CALLED();
|
||||||
|
pch_i2c_acpi_sim_info* bus = (pch_i2c_acpi_sim_info*)cookie;
|
||||||
|
|
||||||
|
bus->acpi->walk_namespace(bus->device, ACPI_TYPE_DEVICE, 1,
|
||||||
|
pch_i2c_scan_bus_callback, NULL, bus, NULL);
|
||||||
|
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static status_t
|
static status_t
|
||||||
register_child_devices(void* cookie)
|
register_child_devices(void* cookie)
|
||||||
{
|
{
|
||||||
@@ -110,7 +123,7 @@ init_device(device_node* node, void** device_cookie)
|
|||||||
bus->acpi = acpi;
|
bus->acpi = acpi;
|
||||||
bus->device = device;
|
bus->device = device;
|
||||||
bus->info.driver_node = node;
|
bus->info.driver_node = node;
|
||||||
//bus->info.scan_bus = acpi_scan_bus;
|
bus->info.scan_bus = acpi_scan_bus;
|
||||||
|
|
||||||
// Attach devices for I2C resources
|
// Attach devices for I2C resources
|
||||||
struct pch_i2c_crs crs;
|
struct pch_i2c_crs crs;
|
||||||
|
|||||||
Reference in New Issue
Block a user