aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/acpi_support
Commit message (Collapse)AuthorAgeFilesLines
* newbus: replace leftover device unit wildcardsAhmad Khalifa2025-06-213-6/+6
| | | | | | Reviewed by: imp, jhb Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D50913
* acpi_asus_wmi(4): Handle TUF-specific hotkeys internallyVladimir Kondratyev2025-03-171-8/+54
| | | | | | | | | - Cycle TUF laptop RGB mode on AURA key press - Switch TUF 'Throttle Thermal Policy' with 'Fan' key Sponsored by: Future Crew LLC MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D48985
* acpi_asus_wmi(4): Add support for WMI event queueVladimir Kondratyev2025-03-171-13/+76
| | | | | | | | | | | Event codes are expected to be retrieved from a queue on at least some models. Specifically, very likely the ACPI WMI devices with _UID ATK are queued whereas those with ASUSWMI are not. Sponsored by: Future Crew LLC MFC after: 1 month Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D48984
* acpi_asus_wmi(4): Improve keyboard backlight support.Vladimir Kondratyev2025-03-171-4/+132
| | | | | | | | | | | | | - Fix maximal keyboard backlight level, Although Linux source code comment says that backlight level is encoded in 3 bits of data, actual code limits maximum level to 3. - Add backlight(9) support for keyboard - Turn off/on keyboard backlight on suspend/resume Sponsored by: Future Crew LLC MFC after: 1 month Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D48983
* acpi_asus_wmi(4): Add EVDEV supportVladimir Kondratyev2025-03-171-1/+139
| | | | | | | | | Use input event device to export hotkey events. Sponsored by: Future Crew LLC MFC after: 1 month Reviewed by: mav Differential Revision: https://reviews.freebsd.org/D48982
* acpi_wmi: Add type check before evaluaeting query ACPI methodTakanori Watanabe2025-03-101-0/+10
| | | | | | | | | | | | Some ACPI wmi query is implemented by named object, not method, ACPICA complains when non-method object is evaluated with one or more arguments. Especially, almost all binary MOF object obtaining method is the case. This commit will fix it. PR: 284912 Reported by: Alexander Ziaee Differential Revision: https://reviews.freebsd.org/D49129
* acpi_ibm: pass brightness events to evdev(4)Gleb Smirnoff2024-12-241-0/+43
| | | | | | | | | | unless the dev.acpi_ibm.0.handlerevents sysctl is set to process them internally. The default for the latter is to ignore them, so passing to evdev(4) is enabled by default. Reviewed by: wulf, imp Tested on: Lenovo Thinpad X11 Carbon 7Th Gen Differential Revision: https://reviews.freebsd.org/D48174
* Replace calls to bus_generic_attach with bus_attach_childrenJohn Baldwin2024-12-061-1/+1
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47675
* Replace calls to bus_generic_probe with bus_identify_childrenJohn Baldwin2024-12-061-1/+1
| | | | | Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47674
* acpi_sbl_wmi: add a driver to trigger SBL firmware updatesKristof Provost2024-10-151-0/+193
| | | | | | | | | Expose a sysctl knob to inform the SBL bootloader that a firmware update is available and should be applied on the next reboot. See also: https://slimbootloader.github.io/security/firmware-update.html#triggering-firmware-update Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D47035
* acpi: Use device_set_descf()Mark Johnston2024-06-022-20/+6
| | | | | | No functional change intended. MFC after: 1 week
* wmistat: don't restrict reading to the pid that opened the fd.Dag-Erling Smørgrav2023-08-291-2/+1
| | | | | | | PR: 273405 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41621
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-1611-22/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* acpi_support: Remove unused devclass arguments to DRIVER_MODULE.John Baldwin2022-05-0611-40/+12
|
* acpi_toshiba: Use device_get_softc in attach.John Baldwin2022-04-211-3/+1
| | | | | | | | | | Rather than a detour via the devclass and hardcoding unit 0. While here, remove a check for sc being NULL. It will never be NULL when attach is called. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D35010
* acpi_support: Remove CTLFLAG_NEEDGIANT from sysctls.Alexander Motin2021-12-2710-18/+18
| | | | MFC after: 2 weeks
* acpi_wmi(4): Allow attachment to ACPI node if EC is not foundVladimir Kondratyev2020-12-231-1/+3
| | | | | | | | | | Conducted tests showed that Embedded Controller is not mandatory for WMI extensions to work. Reported-by: yuripv Reviewed-by: avg MFC-after: 2 weeks Differential-Revision: https://reviews.freebsd.org/D27653
* acpi_wmi(4): Add ACPI_PNP_INFOVladimir Kondratyev2020-10-311-0/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=367240
* acpi_support: clean up empty lines in .c and .h filesMateusz Guzik2020-09-017-50/+28
| | | | Notes: svn path=/head/; revision=365098
* acpi_ibm(4): Rename disengaged mode to unthrottled mode.Mark Johnston2020-06-241-6/+6
| | | | | | | | | | | | | This mode was added in r362496. Rename it to make the meaning more clear. PR: 247306 Suggested by: rpokala Submitted by: Ali Abdallah <ali.abdallah@suse.com> MFC with: r362496 Notes: svn path=/head/; revision=362592
* acpi_ibm(4): Add support for putting fans in disengaged mode.Mark Johnston2020-06-221-6/+19
| | | | | | | | | PR: 247306 Submitted by: Ali Abdallah <ali.abdallah@suse.com> MFC after: 2 weeks Notes: svn path=/head/; revision=362496
* Avoid using a variable solely for sizes that are never meant to beXin LI2020-04-111-10/+12
| | | | | | | | | | | modified runtime. No functional change. MFC after: 2 weeks Notes: svn path=/head/; revision=359795
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-2610-29/+34
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* acpi_ibm: remove superfluous castEd Maste2020-02-021-1/+1
| | | | | | | Reported by: kib Notes: svn path=/head/; revision=357422
* acpi_ibm: whitespace and wrapping cleanupEd Maste2020-02-021-42/+32
| | | | Notes: svn path=/head/; revision=357416
* acpi_ibm: whitespace fixupEd Maste2020-02-021-3/+3
| | | | Notes: svn path=/head/; revision=357413
* acpi_ibm: add support for ThinkPad PrivacyGuardPhilip Paeps2020-01-301-0/+97
| | | | | | | | | | | | | | | | | | | ThinkPad PrivacyGuard is a built-in toggleable privacy filter that restricts viewing angles when on. It is an available on some new ThinkPad models such as the X1 Carbon 7th gen (as an optional HW upgrade). The privacy filter can be enabled/disabled via an ACPI call. This commit adds a sysctl under dev.acpi_ibm that allows for getting and setting the PrivacyGuard state. Submitted by: Kamila Součková <kamila@ksp.sk> Reviewed By: cem, philip MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D23370 Notes: svn path=/head/; revision=357292
* acpi_ibm: reference ThinkPad instead of IBMEd Maste2020-01-151-3/+3
| | | | | | | | | | These are now Lenovo ThinkPads, not IBM ThinkPads. PR: 234403 Submitted by: Kevin Zheng <kevinz5000@gmail.com> (original) Notes: svn path=/head/; revision=356764
* Add embedded Managed Object Format blob access to acpi_wmi(4).Takanori Watanabe2019-09-061-0/+27
| | | | | | | | | | This blob is can be converted to human readable form by bmfdec. (http://github.com/pali/bmfdec) Differential Revision: https://reviews.freebsd.org/D21529 Notes: svn path=/head/; revision=351930
* Extract eventfilter declarations to sys/_eventfilter.hConrad Meyer2019-05-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | This allows replacing "sys/eventfilter.h" includes with "sys/_eventfilter.h" in other header files (e.g., sys/{bus,conf,cpu}.h) and reduces header pollution substantially. EVENTHANDLER_DECLARE and EVENTHANDLER_LIST_DECLAREs were moved out of .c files into appropriate headers (e.g., sys/proc.h, powernv/opal.h). As a side effect of reduced header pollution, many .c files and headers no longer contain needed definitions. The remainder of the patch addresses adding appropriate includes to fix those files. LOCK_DEBUG and LOCK_FILE_LINE_ARG are moved to sys/_lock.h, as required by sys/mutex.h since r326106 (but silently protected by header pollution prior to this change). No functional change (intended). Of course, any out of tree modules that relied on header pollution for sys/eventhandler.h, sys/lock.h, or sys/mutex.h inclusion need to be fixed. __FreeBSD_version has been bumped. Notes: svn path=/head/; revision=347984
* [acpi_ibm] Add support for newer Thinkpad modelsOleksandr Tymoshenko2019-04-241-8/+40
| | | | | | | | | | | | Add support for newer Thinkpad models with id LEN0268. Was tested on Thinkpad T480 and ThinkPad X1 Yoga 2nd gen. PR: 229120 Submitted by: Ali Abdallah <aliovx@gmail.com> MFC after: 1 week Notes: svn path=/head/; revision=346647
* aibs: fix a typo in the probe method that was introduced in r339754Andriy Gapon2018-12-071-1/+1
| | | | | | | | | | | Because of that typo the driver would try to attach to every device on acpi bus. That disrupted acpi attachment of uart driver, at least. MFC after: 4 days X-MFC with: r339754 Notes: svn path=/head/; revision=341695
* Distinguish _CID match and _HID match and make lower priority probeTakanori Watanabe2018-10-269-41/+56
| | | | | | | | | | when _CID match. Reviewed by: jhb, imp Differential Revision:https://reviews.freebsd.org/D16468 Notes: svn path=/head/; revision=339754
* acpi: Add support for Thinkpads Mic ledEitan Adler2018-06-171-1/+63
| | | | | | | | PR: 229074 Submitted by: "Ali Abdallah" <aliovx@gmail.com> Notes: svn path=/head/; revision=335304
* Fix build of aibs with base gcc on i386Dimitry Andric2018-06-171-2/+2
| | | | | | | | | | | | | | Add a few intermediate casts to intptr_t to suppress "cast to pointer from integer of different size" warnings from gcc. In this case, the 'arg2' part of SYSCTL_HANDLER_ARGS is used to pass in a pointer, via an intermediate intmax_t, so no information is lost. Reviewed by: avg MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D15725 Notes: svn path=/head/; revision=335296
* Hide unneeded message under bootverbose.Shunsuke Akiyama2017-01-271-0/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=312887
* Set of improvements to acpi_hp(4) driver.Alexander Motin2016-11-121-136/+215
| | | | | | | | | | | | | - Attach only to WMI devices that provide supported GUIDs. HP Spectre x360 has two WMI devices, only one of which provides the GUIDs. - Pass proper device to ACPI_WMI_REMOVE_EVENT_HANDLER() on detach. - Improve error WMI handling separating status and data paths. This allows to hide sysctls not supported by specific hardware/BIOS. - Improve CMI block parser to make it work on HP Spectre x360 laptop. - In verbose mode log all unknown events to help futher improvements. Notes: svn path=/head/; revision=308568
* aibs / atk0110: add support for querying sensors via GGRP and GITMAndriy Gapon2016-10-151-97/+320
| | | | | | | | | | | | | | | | | Comparing to the Linux driver there is still one missing feature. The Linux driver finds and enables "Embedded Controller" item in the 0x11 group if it's not enabled yet. I tested the new method, Torfinn Ingolfsen tested the old method and helped to fix several bugs in the earlier versions of the patch. Tested by: Torfinn Ingolfsen <torfinn.ingolfsen@getmail.no> Reviewed by: rpaulo MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D8227 Notes: svn path=/head/; revision=307348
* Fix the deciKelvin to Celsius conversion in kernel.Luiz Otavio O Souza2016-05-223-5/+5
| | | | | | | | | | | | | | After r285994, sysctl(8) was fixed to use 273.15 instead of 273.20 as 0C reference and as result, the temperature read in sysctl(8) now exibits a +0.1C difference. This commit fix the kernel references to match the reference value used in sysctl(8) after r285994. Sponsored by: Rubicon Communications (Netgate) Notes: svn path=/head/; revision=300421
* s/struct device */device_t/gAdrian Chadd2016-05-041-1/+1
| | | | | | | Submitted by: kmacy Notes: svn path=/head/; revision=299052
* sys/dev: minor spelling fixes.Pedro F. Giffuni2016-05-031-1/+1
| | | | | | | Most affect comments, very few have user-visible effects. Notes: svn path=/head/; revision=298955
* sys: Make use of our rounddown() macro when sys/param.h is available.Pedro F. Giffuni2016-04-301-1/+2
| | | | | | | No functional change. Notes: svn path=/head/; revision=298848
* Fix previous commit (r284357)Enji Cooper2015-06-131-1/+1
| | | | | | | | | | I forgot to convert the && to a || Pointyhat to: ngie X-MFC with: r283678, r284336, r284357 Notes: svn path=/head/; revision=284358
* Fix inverted check by skipping over the model-specific checks if the makerEnji Cooper2015-06-131-1/+1
| | | | | | | | | | | or product is NULL, not if they are both not NULL Reported by: araujo, kib X-MFC with: r283678, r284336 Pointyhat to: allanjude Notes: svn path=/head/; revision=284357
* acpi_ibm.ko panics if SMBIOS information is not availableAllan Jude2015-06-131-0/+5
| | | | | | | | | | | | Add a check for NULL before strcmp on smbios information incase it is not populated Differential Revision: https://reviews.freebsd.org/D2750 Reviewed by: ngie, jhb Approved by: rpaulo Sponsored by: ScaleEngine Inc. Notes: svn path=/head/; revision=284336
* acpi_ibm: add per-model default events mask.Rui Paulo2015-05-291-2/+55
| | | | | | | | Add support for the hotkeys on a Lenovo X1 3rd gen. This also enables event reporting by default. Notes: svn path=/head/; revision=283678
* This implements default-state support as described in:Ganbold Tsagaankhuu2015-05-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds-gpio.txt Without this booting the VSATV102 causes the blue "working" led to turn off when the kernel starts up. With this the led (which is turned on by the firmware) stays on since that's the default state specified in the FDT. Expanded the meaning of the led_create_state state parameter in order to implement support for "keep". The original values were: == 0 Off != 0 On The new values are: == -1 don't change / keep current setting == 0 Off != -1 && != 0 On This should have no effect on acpi_asus_attach which only calls led_create_state with state set to 1. Updated acpi_ibm_attach in order to avoid surprises. Differential Revision: https://reviews.freebsd.org/D2615 Submitted by: John Wehle Reviewed by: gonzo, loos Notes: svn path=/head/; revision=283360
* acpi_ibm: whitespace.Rui Paulo2015-05-161-6/+6
| | | | Notes: svn path=/head/; revision=283012
* The SYSCTL data pointers can come from userspace and must not beHans Petter Selasky2014-10-281-4/+6
| | | | | | | | | | | | | directly accessed. Although this will work on some platforms, it can throw an exception if the pointer is invalid and then panic the kernel. Add a missing SYSCTL_IN() of "SCTP_BASE_STATS" structure. MFC after: 3 days Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=273773