Re: [PATCH v11 3/4] HID: cp2112: Fwnode Support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 05, 2024 at 06:12:46PM -0500, Danny Kaehn wrote:
> Support describing the CP2112's I2C and GPIO interfaces in firmware.
> 
> The GPIO chip shares a firmware node with the CP2112. The I2C child
> node can either be a child with the name "i2c" or, in ACPI, a device
> node with _ADR Zero.

...

> +	device_for_each_child_node(&hdev->dev, child) {
> +		ret = acpi_get_local_address(ACPI_HANDLE_FWNODE(child), &addr);
> +		if (ret) {
> +			name = fwnode_get_name(child);
> +			if (!name)
> +				continue;
> +			ret = match_string(cp2112_cell_names,
> +					ARRAY_SIZE(cp2112_cell_names), name);
> +			if (ret < 0)
> +				continue;
> +			addr = ret;
> +		}
> +
> +		switch (addr) {
> +		case CP2112_I2C_ADR:
> +			device_set_node(&dev->adap.dev, child);
> +			break;

		default:
			break;

?

> +		}
> +	}

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux