#
208ba505 |
| 19-Apr-2024 |
yunshui <jiangyunshui@kylinos.cn> |
platform/x86: msi-laptop: Use sysfs_emit() to replace sprintf()
As Documentation/filesystems/sysfs.rst suggested, show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to
platform/x86: msi-laptop: Use sysfs_emit() to replace sprintf()
As Documentation/filesystems/sysfs.rst suggested, show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space.
Signed-off-by: yunshui <jiangyunshui@kylinos.cn> Reviewed-by: Ai Chao <aichao@kylinos.cn> Link: https://lore.kernel.org/r/20240419063649.2396461-1-jiangyunshui@kylinos.cn Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
#
ad084a6d |
| 21-Jul-2023 |
Maxim Mikityanskiy <maxtram95@gmail.com> |
platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
Only the HW rfkill state is toggled on laptops with quirks->ec_read_only (so far only MSI Wind U90/U100). There are, however, a few
platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
Only the HW rfkill state is toggled on laptops with quirks->ec_read_only (so far only MSI Wind U90/U100). There are, however, a few issues with the implementation:
1. The initial HW state is always unblocked, regardless of the actual state on boot, because msi_init_rfkill only sets the SW state, regardless of ec_read_only.
2. The initial SW state corresponds to the actual state on boot, but it can't be changed afterwards, because set_device_state returns -EOPNOTSUPP. It confuses the userspace, making Wi-Fi and/or Bluetooth unusable if it was blocked on boot, and breaking the airplane mode if the rfkill was unblocked on boot.
Address the above issues by properly initializing the HW state on ec_read_only laptops and by allowing the userspace to toggle the SW state. Don't set the SW state ourselves and let the userspace fully control it. Toggling the SW state is a no-op, however, it allows the userspace to properly toggle the airplane mode. The actual SW radio disablement is handled by the corresponding rtl818x_pci and btusb drivers that have their own rfkills.
Tested on MSI Wind U100 Plus, BIOS ver 1.0G, EC ver 130.
Fixes: 0816392b97d4 ("msi-laptop: merge quirk tables to one") Fixes: 0de6575ad0a8 ("msi-laptop: Add MSI Wind U90/U100 support") Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Link: https://lore.kernel.org/r/20230721145423.161057-1-maxtram95@gmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
#
8d05fc03 |
| 30-Sep-2022 |
Barnabás Pőcze <pobrn@protonmail.com> |
platform/x86: use PLATFORM_DEVID_NONE instead of -1
Use the `PLATFORM_DEVID_NONE` constant instead of hard-coding -1 when creating a platform device.
No functional changes are intended.
Signed-off
platform/x86: use PLATFORM_DEVID_NONE instead of -1
Use the `PLATFORM_DEVID_NONE` constant instead of hard-coding -1 when creating a platform device.
No functional changes are intended.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Link: https://lore.kernel.org/r/20220930104857.2796923-1-pobrn@protonmail.com Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
show more ...
|
#
2a256527 |
| 17-Sep-2022 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading
On a MSI S270 with Fedora 37 x86_64 / systemd-251.4 the module does not properly autoload.
This is likely caused
platform/x86: msi-laptop: Change DMI match / alias strings to fix module autoloading
On a MSI S270 with Fedora 37 x86_64 / systemd-251.4 the module does not properly autoload.
This is likely caused by issues with how systemd-udevd handles the single quote char (') which is part of the sys_vendor / chassis_vendor strings on this laptop. As a workaround remove the single quote char + everything behind it from the sys_vendor + chassis_vendor matches. This fixes the module not autoloading.
Link: https://github.com/systemd/systemd/issues/24715 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220917210407.647432-1-hdegoede@redhat.com
show more ...
|
#
c35c7b98 |
| 26-Aug-2022 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: msi-laptop: Add msi_scm_disable_hw_fn_handling() helper
Add a msi_scm_disable_hw_fn_handling() to remove the duplicate code for this in the resume and init paths.
Signed-off-by: Hans
platform/x86: msi-laptop: Add msi_scm_disable_hw_fn_handling() helper
Add a msi_scm_disable_hw_fn_handling() to remove the duplicate code for this in the resume and init paths.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220826111453.178962-2-hdegoede@redhat.com
show more ...
|
#
57209ddd |
| 26-Aug-2022 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: msi-laptop: Add msi_scm_model_exit() helper
The probe-error-exit and remove paths both duplicate the exact same code to undo load_scm_model_init(). Add a helper for this.
Signed-off-b
platform/x86: msi-laptop: Add msi_scm_model_exit() helper
The probe-error-exit and remove paths both duplicate the exact same code to undo load_scm_model_init(). Add a helper for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220826111453.178962-1-hdegoede@redhat.com
show more ...
|
#
5523632a |
| 25-Aug-2022 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: msi-laptop: Fix resource cleanup
Fix the input-device not getting free-ed on probe-errors and fix the msi_touchpad_dwork not getting cancelled on neither probe-errors nor on remove.
F
platform/x86: msi-laptop: Fix resource cleanup
Fix the input-device not getting free-ed on probe-errors and fix the msi_touchpad_dwork not getting cancelled on neither probe-errors nor on remove.
Fixes: 143a4c0284dc ("msi-laptop: send out touchpad on/off key") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220825141336.208597-3-hdegoede@redhat.com
show more ...
|
#
042184ea |
| 25-Aug-2022 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: msi-laptop: Simplify ec_delay handling
There is no reason to have both non-delayed and delayed work structs for the rfkill and touchpad work.
Instead simply call schedule_delayed_work
platform/x86: msi-laptop: Simplify ec_delay handling
There is no reason to have both non-delayed and delayed work structs for the rfkill and touchpad work.
Instead simply call schedule_delayed_work() with a delay of 0 for the quirks->ec_delay == false case.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220825141336.208597-2-hdegoede@redhat.com
show more ...
|
#
83ac7a1c |
| 25-Aug-2022 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: msi-laptop: Fix old-ec check for backlight registering
Commit 2cc6c717799f ("msi-laptop: Port to new backlight interface selection API") replaced this check:
if (!quirks->old_ec_mode
platform/x86: msi-laptop: Fix old-ec check for backlight registering
Commit 2cc6c717799f ("msi-laptop: Port to new backlight interface selection API") replaced this check:
if (!quirks->old_ec_model || acpi_video_backlight_support()) pr_info("Brightness ignored, ..."); else do_register();
With:
if (quirks->old_ec_model || acpi_video_get_backlight_type() == acpi_backlight_vendor) do_register();
But since the do_register() part was part of the else branch, the entire condition should be inverted. So not only the 2 statements on either side of the || should be inverted, but the || itself should be replaced with a &&.
In practice this has likely not been an issue because the new-ec models (old_ec_model==false) likely all support ACPI video backlight control, making acpi_video_get_backlight_type() return acpi_backlight_video turning the second part of the || also false when old_ec_model == false.
Fixes: 2cc6c717799f ("msi-laptop: Port to new backlight interface selection API") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220825141336.208597-1-hdegoede@redhat.com
show more ...
|
#
6485f72b |
| 22-Aug-2022 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: msi-laptop: Drop MSI_DRIVER_VERSION
Modules carrying there own version is a practice which the kernel has stopped doing for a long time now, drop it.
While dropping the version pr_inf
platform/x86: msi-laptop: Drop MSI_DRIVER_VERSION
Modules carrying there own version is a practice which the kernel has stopped doing for a long time now, drop it.
While dropping the version pr_info from msi_init() lets remove the somewhat useless pr_info() from msi_cleanup() as well.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220822150818.45765-2-hdegoede@redhat.com
show more ...
|
#
ae030bbf |
| 22-Aug-2022 |
Hans de Goede <hdegoede@redhat.com> |
platform/x86: msi-laptop: Use MODULE_DEVICE_TABLE()
Use MODULE_DEVICE_TABLE() instead of manually adding a bunch of MODULE_ALIAS() statements.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Lin
platform/x86: msi-laptop: Use MODULE_DEVICE_TABLE()
Use MODULE_DEVICE_TABLE() instead of manually adding a bunch of MODULE_ALIAS() statements.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20220822150818.45765-1-hdegoede@redhat.com
show more ...
|
#
16216333 |
| 19-May-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of the
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 1
Based on 2 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin street fifth floor boston ma 02110 1301 usa
this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option [no]_[pad]_[ctrl] any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin street fifth floor boston ma 02110 1301 usa
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-or-later
has been chosen to replace the boilerplate/reference in 176 file(s).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190519154040.652910950@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
6faadbbb |
| 14-Sep-2017 |
Christoph Hellwig <hch@lst.de> |
dmi: Mark all struct dmi_system_id instances const
... and __initconst if applicable.
Based on similar work for an older kernel in the Grsecurity patch.
[JD: fix toshiba-wmi build] [JD: add htcpen
dmi: Mark all struct dmi_system_id instances const
... and __initconst if applicable.
Based on similar work for an older kernel in the Grsecurity patch.
[JD: fix toshiba-wmi build] [JD: add htcpen] [JD: move __initconst where checkscript wants it]
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jean Delvare <jdelvare@suse.de>
show more ...
|
#
79e19ab5 |
| 23-Jun-2017 |
Arvind Yadav <arvind.yadav.cs@gmail.com> |
platform/x86: msi-laptop: constify msipf*_attribute_group
File size before: text data bss dec hex filename 5396 5016 85 10497 2901 drivers/platform/x86/msi-laptop.o
platform/x86: msi-laptop: constify msipf*_attribute_group
File size before: text data bss dec hex filename 5396 5016 85 10497 2901 drivers/platform/x86/msi-laptop.o
File size After adding 'const': text data bss dec hex filename 5524 4888 85 10497 2901 drivers/platform/x86/msi-laptop.o
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
show more ...
|
#
7cb8aa8c |
| 09-Mar-2017 |
Michał Kępień <kernel@kempniu.pl> |
platform/x86: msi-laptop: remove sparse_keymap_free() calls
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove a
platform/x86: msi-laptop: remove sparse_keymap_free() calls
As sparse_keymap_setup() now uses a managed memory allocation for the keymap copy it creates, the latter is freed automatically. Remove all calls to sparse_keymap_free().
As this reduces msi_laptop_input_destroy() to one line, replace all calls to that function with direct calls to input_unregister_device().
Signed-off-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
show more ...
|
#
2cc6c717 |
| 16-Jun-2015 |
Hans de Goede <hdegoede@redhat.com> |
msi-laptop: Port to new backlight interface selection API
Port the backlight selection logic to the new backlight interface selection API.
This commit also removes various obsolete pr_xxx messages
msi-laptop: Port to new backlight interface selection API
Port the backlight selection logic to the new backlight interface selection API.
This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they are not necessary, if the user wants to know which backlight interfaces are registered a simple "ls /sys/class/backlight" suffices.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
#
98280374 |
| 17-Oct-2014 |
Giedrius Statkevičius <giedriuswork@gmail.com> |
drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters
Instead of using a magic constant 0x20 in some drivers to get data only from the KBC port we should use the constant defined in i
drivers: platform: change 0x20 to I8042_STR_AUXDATA in i8042 filters
Instead of using a magic constant 0x20 in some drivers to get data only from the KBC port we should use the constant defined in i8042.h with the same value. Also, this makes these drivers uniform with what constant the only other filter function uses in drivers/input/misc/ideapad_slidebar.c.
Signed-off-by: Giedrius Statkevičius <giedriuswork@gmail.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
show more ...
|
#
3493f414 |
| 20-Oct-2014 |
Wolfram Sang <wsa@the-dreams.de> |
platform: x86: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the driver core.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
|
#
4c241b36 |
| 20-May-2013 |
Libo Chen <clbchenlibo.chen@huawei.com> |
x86: msi-laptop: fix memleak
1. fix two visible mistakes: * when load_scm_model_init faild, we should call platform_device_del(msipf_device) * msipf_attribute_group should be remove in err c
x86: msi-laptop: fix memleak
1. fix two visible mistakes: * when load_scm_model_init faild, we should call platform_device_del(msipf_device) * msipf_attribute_group should be remove in err case
2. change some tags, give them real meaning.
Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
show more ...
|
#
03696e51 |
| 15-Dec-2012 |
Maxim Mikityanskiy <maxtram95@gmail.com> |
msi-laptop: Disable brightness control for new EC
It seems that existing brightness control works only for old EC models. On newer ones auto_brightness access always timeouts and lcd_level always sh
msi-laptop: Disable brightness control for new EC
It seems that existing brightness control works only for old EC models. On newer ones auto_brightness access always timeouts and lcd_level always shows 0. So disable brightness control for new EC models. It works fine with ACPI video driver anyway.
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
show more ...
|
#
0de6575a |
| 15-Dec-2012 |
Maxim Mikityanskiy <maxtram95@gmail.com> |
msi-laptop: Add MSI Wind U90/U100 support
Add MSI Wind U90/U100 to DMI table and add some missing EC features support such as basic fan control, turbo and ECO modes and touchpad state. Tested on MSI
msi-laptop: Add MSI Wind U90/U100 support
Add MSI Wind U90/U100 to DMI table and add some missing EC features support such as basic fan control, turbo and ECO modes and touchpad state. Tested on MSI Wind U100.
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
show more ...
|
#
0816392b |
| 15-Dec-2012 |
Lee, Chun-Yi <jlee@suse.com> |
msi-laptop: merge quirk tables to one
This patch introduced a quirk_entry struct, then we merged all quirk tables to msi_dmi_table. Then we can more easily to set different quirk attributes for diff
msi-laptop: merge quirk tables to one
This patch introduced a quirk_entry struct, then we merged all quirk tables to msi_dmi_table. Then we can more easily to set different quirk attributes for different machine.
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Changed this patch so that it could be applied before MSI Wind U100 support patch. Changed rfkill logic for ec_read_only quirk support. Removed delays if ec_delay = false.
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Acked-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
show more ...
|
#
1b6517a0 |
| 15-Dec-2012 |
Maxim Mikityanskiy <maxtram95@gmail.com> |
msi-laptop: Work around gcc warning
Assign initial value to variable in order to prevent gcc warning about uninitialized variable.
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off
msi-laptop: Work around gcc warning
Assign initial value to variable in order to prevent gcc warning about uninitialized variable.
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
show more ...
|
#
27eb9e7f |
| 15-Dec-2012 |
Maxim Mikityanskiy <maxtram95@gmail.com> |
msi-laptop: Use proper return codes instead of -1
Use proper function return codes instead of -1
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
msi-laptop: Use proper return codes instead of -1
Use proper function return codes instead of -1
Signed-off-by: Maxim Mikityanskiy <maxtram95@gmail.com> Signed-off-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>
show more ...
|
#
3567a4e2 |
| 09-Aug-2012 |
Rafael J. Wysocki <rjw@sisk.pl> |
platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP
According to compiler warnings, quite some suspend/resume functions in platform x86 drivers are not used for CONFIG_PM_SLEEP uns
platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP
According to compiler warnings, quite some suspend/resume functions in platform x86 drivers are not used for CONFIG_PM_SLEEP unset, so add #ifdefs to prevent them from being built in that case.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
show more ...
|