Re: [PATCH 4/5] platform/x86: x86-android-tablets: Add support for getting serdev-controller by PCI parent

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

 



On Sun, Nov 10, 2024 at 12:05 AM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> On the Vexia EDU ATLA 10 tablet, which ships with Android + a custom Linux
> (guadalinex) using the custom Android kernel the UART controllers are not
> enumerated as ACPI devices as they typically are.
>
> Instead they are enumerated through PCI and getting the serdev-controller
> by ACPI HID + UID does not work.
>
> Add support for getting the serdev-controller by the PCI devfn of its
> parent instead.
>
> This also renames the use_pci_devname flag to use_pci since the former
> name now no longer is accurate.

...

> +       if (dev_info->use_pci)
> +               ctrl_dev = get_serdev_controller_by_pci_parent(info);
> +       else
> +               ctrl_dev = get_serdev_controller(info->ctrl_hid, info->ctrl_uid, 0,
> +                                                info->ctrl_devname);

I would expect that they both take info as an argument...

>         if (IS_ERR(ctrl_dev))
>                 return PTR_ERR(ctrl_dev);

...

>  struct x86_serdev_info {
> +       /* For ACPI enumerated controllers */
>         const char *ctrl_hid;
>         const char *ctrl_uid;
> +       /* For PCI enumerated controllers */
> +       unsigned int ctrl_devfn;
> +       /* Typically "serial0" */
>         const char *ctrl_devname;

Why not union as we have a type selector, i.e. use_pci ?

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux