mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
Merge tag 'platform-drivers-x86-v7.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from
- Add ACPI_HANDLE()/ACPI_COMPANION() NULL checks (many drivers) to
handle match overrides gracefully
- asus-armoury:
- Fix mini-LED mode get/set
- Add support for FA401EA, FX607VU, G614FR, and GU605CP
- bitland-mifs-wmi:
- Add CONFIG_LEDS_CLASS dependency
- hp-wmi:
- Add thermal support for Omen 16-c0xxx (board 8902)
- intel/vsec:
- Fix enable_cnt imbalance due to PCIe error recovery
- surface/aggregator_registry:
- Remove battery & AC nodes on Surface Laptop 7 to avoid duplicated
devices
- uniwill-laptop:
- Handle uninitialized and invalid charging threshold values
- Accept charging threshold of 0 through power supply sysfs ABI and
clamp it to 1
- Make 'force' parameter to work also when device descriptor is
found
- Do not enable charging limit despite the 'force' parameter to
avoid permanent damage to battery
* tag 'platform-drivers-x86-v7.1-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (35 commits)
platform/x86: bitland-mifs-wmi: add CONFIG_LEDS_CLASS dependency
platform/x86: wireless-hotkey: Check ACPI_COMPANION() against NULL
platform/x86: toshiba_haps: Check ACPI_COMPANION() against NULL
platform/x86: toshiba_bluetooth: Check ACPI_COMPANION() against NULL
platform/x86: toshiba_acpi: Check ACPI_COMPANION() against NULL
platform/x86: system76: Check ACPI_COMPANION() against NULL
platform/x86: sony-laptop: Check ACPI_COMPANION() against NULL
platform/x86: panasonic-laptop: Check ACPI_COMPANION() against NULL
platform/x86: lg-laptop: Check ACPI_COMPANION() against NULL
platform/x86: intel/smartconnect: Check ACPI_HANDLE() against NULL
platform/x86: intel/rst: Check ACPI_COMPANION() against NULL
platform/x86: fujitsu-tablet: Check ACPI_COMPANION() against NULL
platform/x86: fujitsu: Check ACPI_COMPANION() against NULL
platform/x86: eeepc-laptop: Check ACPI_COMPANION() against NULL
platform/x86: dell/dell-rbtn: Check ACPI_COMPANION() against NULL
platform/x86: asus-laptop: Check ACPI_COMPANION() against NULL
platform/x86: acer-wireless: Check ACPI_COMPANION() against NULL
platform/x86: asus-armoury: add support for GU605CP
platform/x86: asus-armoury: add support for FA401EA
platform/x86: asus-armoury: add support for G614FR
...
This commit is contained in:
@@ -43,6 +43,11 @@ Support for changing the platform performance mode is currently not implemented.
|
||||
Battery Charging Control
|
||||
------------------------
|
||||
|
||||
.. warning:: Some devices do not properly implement the charging threshold interface. Forcing
|
||||
the driver to enable access to said interface on such devices might damage the
|
||||
battery [1]_. Because of this the driver will not enable said feature even when
|
||||
using the ``force`` module parameter.
|
||||
|
||||
The ``uniwill-laptop`` driver supports controlling the battery charge limit. This happens over
|
||||
the standard ``charge_control_end_threshold`` power supply sysfs attribute. All values
|
||||
between 1 and 100 percent are supported.
|
||||
@@ -70,3 +75,8 @@ The ``uniwill-laptop`` driver allows to set the configurable TGP for devices wit
|
||||
allow it.
|
||||
|
||||
See Documentation/ABI/testing/sysfs-driver-uniwill-laptop for details.
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
.. [1] https://www.reddit.com/r/XMG_gg/comments/ld9yyf/battery_limit_hidden_function_discovered_on/
|
||||
|
||||
@@ -295,8 +295,6 @@ static const struct software_node *ssam_node_group_sl6[] = {
|
||||
/* Devices for Surface Laptop 7. */
|
||||
static const struct software_node *ssam_node_group_sl7[] = {
|
||||
&ssam_node_root,
|
||||
&ssam_node_bat_ac,
|
||||
&ssam_node_bat_main,
|
||||
&ssam_node_tmp_perf_profile_with_fan,
|
||||
&ssam_node_fan_speed,
|
||||
&ssam_node_hid_sam_keyboard,
|
||||
|
||||
@@ -185,12 +185,15 @@ static bool surface_button_check_MSHW0040(struct device *dev, acpi_handle handle
|
||||
|
||||
static int surface_button_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
|
||||
struct surface_button *button;
|
||||
struct acpi_device *device;
|
||||
struct input_dev *input;
|
||||
const char *hid = acpi_device_hid(device);
|
||||
int error;
|
||||
|
||||
device = ACPI_COMPANION(&pdev->dev);
|
||||
if (!device)
|
||||
return -ENODEV;
|
||||
|
||||
if (strncmp(acpi_device_bid(device), SURFACE_BUTTON_OBJ_NAME,
|
||||
strlen(SURFACE_BUTTON_OBJ_NAME)))
|
||||
return -ENODEV;
|
||||
@@ -210,7 +213,8 @@ static int surface_button_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
strscpy(acpi_device_name(device), SURFACE_BUTTON_DEVICE_NAME);
|
||||
snprintf(button->phys, sizeof(button->phys), "%s/buttons", hid);
|
||||
snprintf(button->phys, sizeof(button->phys), "%s/buttons",
|
||||
acpi_device_hid(device));
|
||||
|
||||
input->name = acpi_device_name(device);
|
||||
input->phys = button->phys;
|
||||
|
||||
@@ -118,6 +118,7 @@ config BITLAND_MIFS_WMI
|
||||
depends on ACPI_WMI
|
||||
depends on HWMON
|
||||
depends on INPUT
|
||||
depends on LEDS_CLASS
|
||||
depends on POWER_SUPPLY
|
||||
select ACPI_PLATFORM_PROFILE
|
||||
select INPUT_SPARSEKMAP
|
||||
|
||||
@@ -37,9 +37,14 @@ static void acer_wireless_notify(acpi_handle handle, u32 event, void *data)
|
||||
|
||||
static int acer_wireless_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *adev;
|
||||
struct input_dev *idev;
|
||||
int ret;
|
||||
|
||||
adev = ACPI_COMPANION(&pdev->dev);
|
||||
if (!adev)
|
||||
return -ENODEV;
|
||||
|
||||
idev = devm_input_allocate_device(&pdev->dev);
|
||||
if (!idev)
|
||||
return -ENOMEM;
|
||||
@@ -57,8 +62,7 @@ static int acer_wireless_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return acpi_dev_install_notify_handler(ACPI_COMPANION(&pdev->dev),
|
||||
ACPI_DEVICE_NOTIFY,
|
||||
return acpi_dev_install_notify_handler(adev, ACPI_DEVICE_NOTIFY,
|
||||
acer_wireless_notify,
|
||||
&pdev->dev);
|
||||
}
|
||||
|
||||
@@ -48,10 +48,14 @@ static int adv_swbutton_probe(struct platform_device *device)
|
||||
{
|
||||
struct adv_swbutton *button;
|
||||
struct input_dev *input;
|
||||
acpi_handle handle = ACPI_HANDLE(&device->dev);
|
||||
acpi_handle handle;
|
||||
acpi_status status;
|
||||
int error;
|
||||
|
||||
handle = ACPI_HANDLE(&device->dev);
|
||||
if (!handle)
|
||||
return -ENODEV;
|
||||
|
||||
button = devm_kzalloc(&device->dev, sizeof(*button), GFP_KERNEL);
|
||||
if (!button)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -370,7 +370,7 @@ static ssize_t mini_led_mode_current_value_show(struct kobject *kobj,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
mode = FIELD_GET(ASUS_MINI_LED_MODE_MASK, 0);
|
||||
mode = FIELD_GET(ASUS_MINI_LED_MODE_MASK, mode);
|
||||
|
||||
for (i = 0; i < mini_led_mode_map_size; i++)
|
||||
if (mode == mini_led_mode_map[i])
|
||||
@@ -386,6 +386,7 @@ static ssize_t mini_led_mode_current_value_store(struct kobject *kobj,
|
||||
{
|
||||
u32 *mini_led_mode_map;
|
||||
size_t mini_led_mode_map_size;
|
||||
char mapped_value[12];
|
||||
u32 mode;
|
||||
int err;
|
||||
|
||||
@@ -414,9 +415,16 @@ static ssize_t mini_led_mode_current_value_store(struct kobject *kobj,
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
return armoury_attr_uint_store(kobj, attr, buf, count,
|
||||
0, mini_led_mode_map[mode],
|
||||
NULL, asus_armoury.mini_led_dev_id);
|
||||
/*
|
||||
* armoury_attr_uint_store() parses and sends the value from the
|
||||
* passed buffer; hand it the mapped firmware value so the device
|
||||
* receives the translated mode instead of the raw index.
|
||||
*/
|
||||
snprintf(mapped_value, sizeof(mapped_value), "%u", mini_led_mode_map[mode]);
|
||||
|
||||
return armoury_attr_uint_store(kobj, attr, mapped_value, count, 0,
|
||||
mini_led_mode_map[mode], NULL,
|
||||
asus_armoury.mini_led_dev_id);
|
||||
}
|
||||
|
||||
static ssize_t mini_led_mode_possible_values_show(struct kobject *kobj,
|
||||
|
||||
@@ -346,6 +346,29 @@ struct power_data {
|
||||
* _def is not required and will be assumed to be default == max if missing.
|
||||
*/
|
||||
static const struct dmi_system_id power_limits[] = {
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "FA401EA"),
|
||||
},
|
||||
.driver_data = &(struct power_data) {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 15,
|
||||
.ppt_pl1_spl_max = 95,
|
||||
.ppt_pl2_sppt_min = 35,
|
||||
.ppt_pl2_sppt_max = 100,
|
||||
.ppt_pl3_fppt_min = 35,
|
||||
.ppt_pl3_fppt_max = 115,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 15,
|
||||
.ppt_pl1_spl_max = 71,
|
||||
.ppt_pl2_sppt_min = 35,
|
||||
.ppt_pl2_sppt_max = 71,
|
||||
.ppt_pl3_fppt_min = 35,
|
||||
.ppt_pl3_fppt_max = 71,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "FA401UM"),
|
||||
@@ -886,6 +909,33 @@ static const struct dmi_system_id power_limits[] = {
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "FX607VU"),
|
||||
},
|
||||
.driver_data = &(struct power_data) {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 28,
|
||||
.ppt_pl1_spl_def = 115,
|
||||
.ppt_pl1_spl_max = 135,
|
||||
.ppt_pl2_sppt_min = 28,
|
||||
.ppt_pl2_sppt_max = 135,
|
||||
.nv_dynamic_boost_min = 5,
|
||||
.nv_dynamic_boost_max = 25,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 25,
|
||||
.ppt_pl1_spl_max = 45,
|
||||
.ppt_pl2_sppt_min = 35,
|
||||
.ppt_pl2_sppt_max = 60,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GA401Q"),
|
||||
@@ -1253,6 +1303,35 @@ static const struct dmi_system_id power_limits[] = {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GU605CP"),
|
||||
},
|
||||
.driver_data = &(struct power_data) {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 45,
|
||||
.ppt_pl1_spl_max = 75,
|
||||
.ppt_pl2_sppt_min = 56,
|
||||
.ppt_pl2_sppt_max = 95,
|
||||
.nv_dynamic_boost_min = 5,
|
||||
.nv_dynamic_boost_max = 15,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
.nv_tgp_min = 55,
|
||||
.nv_tgp_def = 75,
|
||||
.nv_tgp_max = 95,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 25,
|
||||
.ppt_pl1_spl_max = 75,
|
||||
.ppt_pl2_sppt_min = 32,
|
||||
.ppt_pl2_sppt_max = 95,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GU605CR"),
|
||||
@@ -1759,6 +1838,40 @@ static const struct dmi_system_id power_limits[] = {
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "G614FR"),
|
||||
},
|
||||
.driver_data = &(struct power_data) {
|
||||
.ac_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 30,
|
||||
.ppt_pl1_spl_max = 120,
|
||||
.ppt_pl2_sppt_min = 65,
|
||||
.ppt_pl2_sppt_def = 140,
|
||||
.ppt_pl2_sppt_max = 162,
|
||||
.ppt_pl3_fppt_min = 65,
|
||||
.ppt_pl3_fppt_def = 140,
|
||||
.ppt_pl3_fppt_max = 162,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
.nv_dynamic_boost_min = 5,
|
||||
.nv_dynamic_boost_max = 25,
|
||||
.nv_tgp_min = 65,
|
||||
.nv_tgp_max = 115,
|
||||
},
|
||||
.dc_data = &(struct power_limits) {
|
||||
.ppt_pl1_spl_min = 25,
|
||||
.ppt_pl1_spl_max = 65,
|
||||
.ppt_pl2_sppt_min = 25,
|
||||
.ppt_pl2_sppt_max = 65,
|
||||
.ppt_pl3_fppt_min = 35,
|
||||
.ppt_pl3_fppt_max = 75,
|
||||
.nv_temp_target_min = 75,
|
||||
.nv_temp_target_max = 87,
|
||||
},
|
||||
.requires_fan_curve = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "G614J"),
|
||||
|
||||
@@ -1826,10 +1826,14 @@ static bool asus_device_present;
|
||||
|
||||
static int asus_acpi_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
|
||||
struct acpi_device *device;
|
||||
struct asus_laptop *asus;
|
||||
int result;
|
||||
|
||||
device = ACPI_COMPANION(&pdev->dev);
|
||||
if (!device)
|
||||
return -ENODEV;
|
||||
|
||||
pr_notice("Asus Laptop Support version %s\n",
|
||||
ASUS_LAPTOP_VERSION);
|
||||
asus = kzalloc_obj(struct asus_laptop);
|
||||
|
||||
@@ -396,11 +396,15 @@ static void rbtn_cleanup(struct device *dev)
|
||||
|
||||
static int rbtn_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
|
||||
struct rbtn_data *rbtn_data;
|
||||
struct acpi_device *device;
|
||||
enum rbtn_type type;
|
||||
int ret = 0;
|
||||
|
||||
device = ACPI_COMPANION(&pdev->dev);
|
||||
if (!device)
|
||||
return -ENODEV;
|
||||
|
||||
type = rbtn_check(device);
|
||||
if (type == RBTN_UNKNOWN) {
|
||||
dev_info(&pdev->dev, "Unknown device type\n");
|
||||
|
||||
@@ -1363,10 +1363,14 @@ static bool eeepc_device_present;
|
||||
|
||||
static int eeepc_acpi_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
|
||||
struct acpi_device *device;
|
||||
struct eeepc_laptop *eeepc;
|
||||
int result;
|
||||
|
||||
device = ACPI_COMPANION(&pdev->dev);
|
||||
if (!device)
|
||||
return -ENODEV;
|
||||
|
||||
pr_notice(EEEPC_LAPTOP_NAME "\n");
|
||||
eeepc = kzalloc_obj(struct eeepc_laptop);
|
||||
if (!eeepc)
|
||||
|
||||
@@ -530,10 +530,14 @@ static void acpi_fujitsu_bl_notify(acpi_handle handle, u32 event, void *data)
|
||||
|
||||
static int acpi_fujitsu_bl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
|
||||
struct acpi_device *device;
|
||||
struct fujitsu_bl *priv;
|
||||
int ret;
|
||||
|
||||
device = ACPI_COMPANION(&pdev->dev);
|
||||
if (!device)
|
||||
return -ENODEV;
|
||||
|
||||
if (acpi_video_get_backlight_type() != acpi_backlight_vendor)
|
||||
return -ENODEV;
|
||||
|
||||
@@ -993,10 +997,14 @@ static void acpi_fujitsu_laptop_notify(acpi_handle handle, u32 event, void *data
|
||||
|
||||
static int acpi_fujitsu_laptop_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *device = ACPI_COMPANION(&pdev->dev);
|
||||
struct fujitsu_laptop *priv;
|
||||
struct acpi_device *device;
|
||||
int ret, i = 0;
|
||||
|
||||
device = ACPI_COMPANION(&pdev->dev);
|
||||
if (!device)
|
||||
return -ENODEV;
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -445,10 +445,14 @@ static acpi_status fujitsu_walk_resources(struct acpi_resource *res, void *data)
|
||||
|
||||
static int acpi_fujitsu_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *adev = ACPI_COMPANION(&pdev->dev);
|
||||
struct acpi_device *adev;
|
||||
acpi_status status;
|
||||
int error;
|
||||
|
||||
adev = ACPI_COMPANION(&pdev->dev);
|
||||
if (!adev)
|
||||
return -ENODEV;
|
||||
|
||||
status = acpi_walk_resources(adev->handle, METHOD_NAME__CRS,
|
||||
fujitsu_walk_resources, NULL);
|
||||
if (ACPI_FAILURE(status) || !fujitsu.irq || !fujitsu.io_base)
|
||||
|
||||
@@ -189,6 +189,10 @@ static const char * const victus_thermal_profile_boards[] = {
|
||||
|
||||
/* DMI Board names of Victus 16-r and Victus 16-s laptops */
|
||||
static const struct dmi_system_id victus_s_thermal_profile_boards[] __initconst = {
|
||||
{
|
||||
.matches = { DMI_MATCH(DMI_BOARD_NAME, "8902") },
|
||||
.driver_data = (void *)&omen_v1_legacy_thermal_params,
|
||||
},
|
||||
{
|
||||
.matches = { DMI_MATCH(DMI_BOARD_NAME, "8A44") },
|
||||
.driver_data = (void *)&omen_v1_legacy_thermal_params,
|
||||
|
||||
@@ -300,6 +300,9 @@ static int lis3lv02d_probe(struct platform_device *device)
|
||||
int ret;
|
||||
|
||||
lis3_dev.bus_priv = ACPI_COMPANION(&device->dev);
|
||||
if (!lis3_dev.bus_priv)
|
||||
return -ENODEV;
|
||||
|
||||
lis3_dev.init = lis3lv02d_acpi_init;
|
||||
lis3_dev.read = lis3lv02d_acpi_read;
|
||||
lis3_dev.write = lis3lv02d_acpi_write;
|
||||
|
||||
@@ -688,12 +688,16 @@ static bool button_array_present(struct platform_device *device)
|
||||
|
||||
static int intel_hid_probe(struct platform_device *device)
|
||||
{
|
||||
acpi_handle handle = ACPI_HANDLE(&device->dev);
|
||||
unsigned long long mode, dummy;
|
||||
struct intel_hid_priv *priv;
|
||||
acpi_handle handle;
|
||||
acpi_status status;
|
||||
int err;
|
||||
|
||||
handle = ACPI_HANDLE(&device->dev);
|
||||
if (!handle)
|
||||
return -ENODEV;
|
||||
|
||||
intel_hid_init_dsm(handle);
|
||||
|
||||
if (!intel_hid_evaluate_method(handle, INTEL_HID_DSM_HDMM_FN, &mode)) {
|
||||
|
||||
@@ -245,15 +245,20 @@ static void sar_get_data(int reg, struct wwan_sar_context *context)
|
||||
static int sar_probe(struct platform_device *device)
|
||||
{
|
||||
struct wwan_sar_context *context;
|
||||
acpi_handle handle;
|
||||
int reg;
|
||||
int result;
|
||||
|
||||
handle = ACPI_HANDLE(&device->dev);
|
||||
if (!handle)
|
||||
return -ENODEV;
|
||||
|
||||
context = kzalloc_obj(*context);
|
||||
if (!context)
|
||||
return -ENOMEM;
|
||||
|
||||
context->sar_device = device;
|
||||
context->handle = ACPI_HANDLE(&device->dev);
|
||||
context->handle = handle;
|
||||
dev_set_drvdata(&device->dev, context);
|
||||
|
||||
result = guid_parse(SAR_DSM_UUID, &context->guid);
|
||||
|
||||
@@ -102,9 +102,13 @@ static struct device_attribute irst_timeout_attr = {
|
||||
|
||||
static int irst_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct acpi_device *acpi = ACPI_COMPANION(&pdev->dev);
|
||||
struct acpi_device *acpi;
|
||||
int error;
|
||||
|
||||
acpi = ACPI_COMPANION(&pdev->dev);
|
||||
if (!acpi)
|
||||
return -ENODEV;
|
||||
|
||||
error = device_create_file(&acpi->dev, &irst_timeout_attr);
|
||||
if (unlikely(error))
|
||||
return error;
|
||||
|
||||
@@ -12,10 +12,14 @@ MODULE_LICENSE("GPL");
|
||||
|
||||
static int smartconnect_acpi_probe(struct platform_device *pdev)
|
||||
{
|
||||
acpi_handle handle = ACPI_HANDLE(&pdev->dev);
|
||||
unsigned long long value;
|
||||
acpi_handle handle;
|
||||
acpi_status status;
|
||||
|
||||
handle = ACPI_HANDLE(&pdev->dev);
|
||||
if (!handle)
|
||||
return -ENODEV;
|
||||
|
||||
status = acpi_evaluate_integer(handle, "GAOS", NULL, &value);
|
||||
if (ACPI_FAILURE(status))
|
||||
return -EINVAL;
|
||||
|
||||
@@ -275,12 +275,16 @@ static bool intel_vbtn_has_switches(acpi_handle handle, bool dual_accel)
|
||||
|
||||
static int intel_vbtn_probe(struct platform_device *device)
|
||||
{
|
||||
acpi_handle handle = ACPI_HANDLE(&device->dev);
|
||||
bool dual_accel, has_buttons, has_switches;
|
||||
struct intel_vbtn_priv *priv;
|
||||
acpi_handle handle;
|
||||
acpi_status status;
|
||||
int err;
|
||||
|
||||
handle = ACPI_HANDLE(&device->dev);
|
||||
if (!handle)
|
||||
return -ENODEV;
|
||||
|
||||
dual_accel = dual_accel_detect();
|
||||
has_buttons = acpi_has_method(handle, "VBDL");
|
||||
has_switches = intel_vbtn_has_switches(handle, dual_accel);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user