linux-stable/drivers/platform/x86/dell-wmi-descriptor.h
Mario Limonciello 4255c30fe8 platform/x86: dell-smbios-wmi: Disable userspace interface if missing hotfix
The Dell SMBIOS WMI interface will fail for some more complex calls unless
a WMI hotfix has been included.  Most platforms have this fix available in
a maintenance BIOS release.  In the case the driver is loaded on a
platform without this fix, disable the userspace interface.

A hotfix indicator is present in the dell-wmi-descriptor that represents
whether or not more complex calls will work properly.

"Simple" calls such as those used by dell-laptop and dell-wmi will continue
to work properly so dell-smbios-wmi should not be blocked from binding and
being used as the dell-smbios dispatcher.

Suggested-by: Girish Prakash <girish.prakash@dell.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2017-11-20 12:38:43 -08:00

28 lines
780 B
C

/*
* Dell WMI descriptor driver
*
* Copyright (c) 2017 Dell Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef _DELL_WMI_DESCRIPTOR_H_
#define _DELL_WMI_DESCRIPTOR_H_
#include <linux/wmi.h>
/* possible return values:
* -ENODEV: Descriptor GUID missing from WMI bus
* -EPROBE_DEFER: probing for dell-wmi-descriptor not yet run
* 0: valid descriptor, successfully probed
* < 0: invalid descriptor, don't probe dependent devices
*/
int dell_wmi_get_descriptor_valid(void);
bool dell_wmi_get_interface_version(u32 *version);
bool dell_wmi_get_size(u32 *size);
bool dell_wmi_get_hotfix(u32 *hotfix);
#endif