mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-15 22:41:38 +00:00
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: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241204204227.95757-7-hdegoede@redhat.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
committed by
Ilpo Järvinen
parent
c1007dd139
commit
dd6db239cb
@@ -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",
|
||||
},
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user