Unverified Commit dd6db239 authored by Hans de Goede's avatar Hans de Goede Committed by Ilpo Järvinen
Browse files

platform/x86: x86-android-tablets: Store serdev-controller ACPI HID + UID in a union



Store the serdev-controller ACPI HID + UID in a union inside struct
x86_serdev_info.

This is a preparation patch for adding support for PCI enumerated serdev-
controllers which will be done by the devfn value of the PCI device.

Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20241204204227.95757-7-hdegoede@redhat.com


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent c1007dd1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -145,8 +145,8 @@ static const struct x86_i2c_client_info asus_me176c_i2c_clients[] __initconst =

static const struct x86_serdev_info asus_me176c_serdevs[] __initconst = {
	{
		.ctrl_hid = "80860F0A",
		.ctrl_uid = "2",
		.ctrl.acpi.hid = "80860F0A",
		.ctrl.acpi.uid = "2",
		.ctrl_devname = "serial0",
		.serdev_hid = "BCM2E3A",
	},
+1 −1
Original line number Diff line number Diff line
@@ -279,7 +279,7 @@ static __init int x86_instantiate_serdev(const struct x86_dev_info *dev_info, in
	struct device *ctrl_dev;
	int ret = -ENODEV;

	ctrl_dev = get_serdev_controller(info->ctrl_hid, info->ctrl_uid, 0,
	ctrl_dev = get_serdev_controller(info->ctrl.acpi.hid, info->ctrl.acpi.uid, 0,
					 info->ctrl_devname);
	if (IS_ERR(ctrl_dev))
		return PTR_ERR(ctrl_dev);
+2 −2
Original line number Diff line number Diff line
@@ -178,8 +178,8 @@ static const struct platform_device_info lenovo_yb1_x90_pdevs[] __initconst = {
 */
static const struct x86_serdev_info lenovo_yb1_x90_serdevs[] __initconst = {
	{
		.ctrl_hid = "8086228A",
		.ctrl_uid = "1",
		.ctrl.acpi.hid = "8086228A",
		.ctrl.acpi.uid = "1",
		.ctrl_devname = "serial0",
		.serdev_hid = "BCM2E1A",
	},
+6 −2
Original line number Diff line number Diff line
@@ -57,8 +57,12 @@ struct x86_spi_dev_info {
};

struct x86_serdev_info {
	const char *ctrl_hid;
	const char *ctrl_uid;
	union {
		struct {
			const char *hid;
			const char *uid;
		} acpi;
	} ctrl;
	const char *ctrl_devname;
	/*
	 * ATM the serdev core only supports of or ACPI matching; and so far all