Re: [PATCH v2 4/4] platform/x86: topstar-laptop: add optional WLAN LED workaround

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

 



On Wed, Nov 8, 2017 at 2:25 AM, Guillaume Douézan-Grard
<gdouezangrard@xxxxxxxxx> wrote:
> On Sun, Nov 05, 2017 at 02:34:43PM -0800, Darren Hart wrote:
>> On Sun, Nov 05, 2017 at 03:28:09PM +0200, Andy Shevchenko wrote:

> I replaced the module parameter with a board name/version DMI check,
> that will be included for the new patch serie.

Below is (as PoC) fine for me.
Though one comment.

> @@ -291,10 +289,16 @@ static int topstar_acpi_add(struct acpi_device *device)
>         if (err)
>                 goto err_platform_exit;
>
> -       if (led_workaround) {
> +       /*
> +        * Enable software-based WLAN LED control on systems with defective
> +        * hardware switch.
> +        */

> +       if (dmi_match(DMI_BOARD_NAME, "U931")
> +                       && dmi_match(DMI_BOARD_VERSION, "RVP7")) {

I would better to see dmi_system_id table with callback that sets this
boolean variable inside topstar structure.

Something like below (adapt it to better suit your needs):

static const struct dmi_system_id topstar_quirks[] = {
       {
               .callback = dmi_led_workaround,
               .ident = "Topstar ... BLA BLA BLA",
               .matches = {
                      DMI_MATCH(DMI_BOARD_NAME, "U931"),
                      DMI_MATCH(DMI_BOARD_VERSION, "RVP7"),
               },
               .driver_data = topstar,
       },
       {}
};

-- 
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