Re: [PATCH v2 4/4] platform/x86: topstar-laptop: add optional WLAN LED workaround
From: Andy Shevchenko
Date: Wed Nov 08 2017 - 05:26:09 EST
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