1# SPDX-License-Identifier: GPL-2.0-only 2# 3# Lenovo X86 Platform Specific Drivers 4# 5 6config IDEAPAD_LAPTOP 7 tristate "Lenovo IdeaPad Laptop Extras" 8 depends on ACPI 9 depends on ACPI_BATTERY 10 depends on RFKILL && INPUT 11 depends on SERIO_I8042 12 depends on BACKLIGHT_CLASS_DEVICE 13 depends on ACPI_VIDEO || ACPI_VIDEO = n 14 depends on ACPI_WMI || ACPI_WMI = n 15 select ACPI_PLATFORM_PROFILE 16 select INPUT_SPARSEKMAP 17 select NEW_LEDS 18 select LEDS_CLASS 19 help 20 This is a driver for Lenovo IdeaPad netbooks contains drivers for 21 rfkill switch, hotkey, fan control and backlight control. 22 23config LENOVO_WMI_HOTKEY_UTILITIES 24 tristate "Lenovo Hotkey Utility WMI extras driver" 25 depends on ACPI_WMI 26 select NEW_LEDS 27 select LEDS_CLASS 28 imply IDEAPAD_LAPTOP 29 help 30 This driver provides WMI support for Lenovo customized hotkeys function, 31 such as LED control for audio/mic mute event for Ideapad, YOGA, XiaoXin, 32 Gaming, ThinkBook and so on. 33 34config LENOVO_WMI_CAMERA 35 tristate "Lenovo WMI Camera Button driver" 36 depends on ACPI_WMI 37 depends on INPUT 38 help 39 This driver provides support for Lenovo camera button. The Camera 40 button is a GPIO device. This driver receives ACPI notifications when 41 the camera button is switched on/off. 42 43 To compile this driver as a module, choose M here: the module 44 will be called lenovo-wmi-camera. 45 46config LENOVO_YB9_KBDOCK 47 tristate "Lenovo Yoga Book 9 keyboard dock detection" 48 depends on ACPI_WMI 49 depends on DMI 50 depends on INPUT 51 help 52 Say Y here to enable keyboard dock detection on the Lenovo Yoga Book 9 53 14IAH10. The detachable Bluetooth keyboard magnetically attaches to 54 either screen; this driver reports SW_TABLET_MODE input events based 55 on the attachment state and exposes the raw position in sysfs. 56 57 To compile this driver as a module, choose M here: the module will be 58 called lenovo-yb9-kbdock. 59 60config LENOVO_YMC 61 tristate "Lenovo Yoga Tablet Mode Control" 62 depends on ACPI_WMI 63 depends on INPUT 64 depends on IDEAPAD_LAPTOP 65 select INPUT_SPARSEKMAP 66 help 67 This driver maps the Tablet Mode Control switch to SW_TABLET_MODE input 68 events for Lenovo Yoga notebooks. 69 70config THINKPAD_ACPI 71 tristate "ThinkPad ACPI Laptop Extras" 72 depends on ACPI_EC 73 depends on ACPI_BATTERY 74 depends on INPUT 75 depends on RFKILL || RFKILL = n 76 depends on ACPI_VIDEO || ACPI_VIDEO = n 77 depends on BACKLIGHT_CLASS_DEVICE 78 depends on I2C 79 depends on DRM 80 select ACPI_PLATFORM_PROFILE 81 select DRM_PRIVACY_SCREEN 82 select HWMON 83 select NVRAM 84 select NEW_LEDS 85 select LEDS_CLASS 86 select INPUT_SPARSEKMAP 87 help 88 This is a driver for the IBM and Lenovo ThinkPad laptops. It adds 89 support for Fn-Fx key combinations, Bluetooth control, video 90 output switching, ThinkLight control, UltraBay eject and more. 91 For more information about this driver see 92 <file:Documentation/admin-guide/laptops/thinkpad-acpi.rst> and 93 <http://ibm-acpi.sf.net/> . 94 95 This driver was formerly known as ibm-acpi. 96 97 Extra functionality will be available if the rfkill (CONFIG_RFKILL) 98 and/or ALSA (CONFIG_SND) subsystems are available in the kernel. 99 Note that if you want ThinkPad-ACPI to be built-in instead of 100 modular, ALSA and rfkill will also have to be built-in. 101 102 If you have an IBM or Lenovo ThinkPad laptop, say Y or M here. 103 104config THINKPAD_ACPI_ALSA_SUPPORT 105 bool "Console audio control ALSA interface" 106 depends on THINKPAD_ACPI 107 depends on SND 108 depends on SND = y || THINKPAD_ACPI = SND 109 default y 110 help 111 Enables monitoring of the built-in console audio output control 112 (headphone and speakers), which is operated by the mute and (in 113 some ThinkPad models) volume hotkeys. 114 115 If this option is enabled, ThinkPad-ACPI will export an ALSA card 116 with a single read-only mixer control, which should be used for 117 on-screen-display feedback purposes by the Desktop Environment. 118 119 Optionally, the driver will also allow software control (the 120 ALSA mixer will be made read-write). Please refer to the driver 121 documentation for details. 122 123 All IBM models have both volume and mute control. Newer Lenovo 124 models only have mute control (the volume hotkeys are just normal 125 keys and volume control is done through the main HDA mixer). 126 127config THINKPAD_ACPI_DEBUGFACILITIES 128 bool "Maintainer debug facilities" 129 depends on THINKPAD_ACPI 130 help 131 Enables extra stuff in the thinkpad-acpi which is completely useless 132 for normal use. Read the driver source to find out what it does. 133 134 Say N here, unless you were told by a kernel maintainer to do 135 otherwise. 136 137config THINKPAD_ACPI_DEBUG 138 bool "Verbose debug mode" 139 depends on THINKPAD_ACPI 140 help 141 Enables extra debugging information, at the expense of a slightly 142 increase in driver size. 143 144 If you are not sure, say N here. 145 146config THINKPAD_ACPI_UNSAFE_LEDS 147 bool "Allow control of important LEDs (unsafe)" 148 depends on THINKPAD_ACPI 149 help 150 Overriding LED state on ThinkPads can mask important 151 firmware alerts (like critical battery condition), or misled 152 the user into damaging the hardware (undocking or ejecting 153 the bay while buses are still active), etc. 154 155 LED control on the ThinkPad is write-only (with very few 156 exceptions on very ancient models), which makes it 157 impossible to know beforehand if important information will 158 be lost when one changes LED state. 159 160 Users that know what they are doing can enable this option 161 and the driver will allow control of every LED, including 162 the ones on the dock stations. 163 164 Never enable this option on a distribution kernel. 165 166 Say N here, unless you are building a kernel for your own 167 use, and need to control the important firmware LEDs. 168 169config THINKPAD_ACPI_VIDEO 170 bool "Video output control support" 171 depends on THINKPAD_ACPI 172 default y 173 help 174 Allows the thinkpad_acpi driver to provide an interface to control 175 the various video output ports. 176 177 This feature often won't work well, depending on ThinkPad model, 178 display state, video output devices in use, whether there is a X 179 server running, phase of the moon, and the current mood of 180 Schroedinger's cat. If you can use X.org's RandR to control 181 your ThinkPad's video output ports instead of this feature, 182 don't think twice: do it and say N here to save memory and avoid 183 bad interactions with X.org. 184 185 NOTE: access to this feature is limited to processes with the 186 CAP_SYS_ADMIN capability, to avoid local DoS issues in platforms 187 where it interacts badly with X.org. 188 189 If you are not sure, say Y here but do try to check if you could 190 be using X.org RandR instead. 191 192config THINKPAD_ACPI_HOTKEY_POLL 193 bool "Support NVRAM polling for hot keys" 194 depends on THINKPAD_ACPI 195 default y 196 help 197 Some thinkpad models benefit from NVRAM polling to detect a few of 198 the hot key press events. If you know your ThinkPad model does not 199 need to do NVRAM polling to support any of the hot keys you use, 200 unselecting this option will save about 1kB of memory. 201 202 ThinkPads T40 and newer, R52 and newer, and X31 and newer are 203 unlikely to need NVRAM polling in their latest BIOS versions. 204 205 NVRAM polling can detect at most the following keys: ThinkPad/Access 206 IBM, Zoom, Switch Display (fn+F7), ThinkLight, Volume up/down/mute, 207 Brightness up/down, Display Expand (fn+F8), Hibernate (fn+F12). 208 209 If you are not sure, say Y here. The driver enables polling only if 210 it is strictly necessary to do so. 211 212config THINKPAD_LMI 213 tristate "Lenovo WMI-based systems management driver" 214 depends on ACPI_WMI 215 depends on DMI 216 select FW_ATTR_CLASS 217 help 218 This driver allows changing BIOS settings on Lenovo machines whose 219 BIOS support the WMI interface. 220 221 To compile this driver as a module, choose M here: the module will 222 be called think-lmi. 223 224config YOGABOOK 225 tristate "Lenovo Yoga Book tablet key driver" 226 depends on ACPI_WMI 227 depends on INPUT 228 depends on I2C 229 select LEDS_CLASS 230 select NEW_LEDS 231 help 232 Say Y here if you want to support the 'Pen' key and keyboard backlight 233 control on the Lenovo Yoga Book tablets. 234 235 To compile this driver as a module, choose M here: the module will 236 be called lenovo-yogabook. 237 238config YT2_1380 239 tristate "Lenovo Yoga Tablet 2 1380 fast charge driver" 240 depends on SERIAL_DEV_BUS 241 depends on EXTCON 242 depends on ACPI 243 help 244 Say Y here to enable support for the custom fast charging protocol 245 found on the Lenovo Yoga Tablet 2 1380F / 1380L models. 246 247 To compile this driver as a module, choose M here: the module will 248 be called lenovo-yogabook. 249 250config LENOVO_WMI_CAPDATA 251 tristate 252 depends on ACPI_WMI 253 depends on LENOVO_WMI_HELPERS 254 255config LENOVO_WMI_EVENTS 256 tristate 257 depends on ACPI_WMI 258 259config LENOVO_WMI_HELPERS 260 tristate 261 depends on ACPI_WMI 262 263config LENOVO_WMI_GAMEZONE 264 tristate "Lenovo GameZone WMI Driver" 265 depends on ACPI_WMI 266 depends on DMI 267 select ACPI_PLATFORM_PROFILE 268 select LENOVO_WMI_EVENTS 269 select LENOVO_WMI_HELPERS 270 help 271 Say Y here if you have a WMI aware Lenovo Legion device and would like to use the 272 platform-profile firmware interface to manage power usage. 273 274 To compile this driver as a module, choose M here: the module will 275 be called lenovo-wmi-gamezone. 276 277config LENOVO_WMI_TUNING 278 tristate "Lenovo Other Mode WMI Driver" 279 depends on ACPI_WMI 280 depends on ACPI_BATTERY 281 select HWMON 282 select FW_ATTR_CLASS 283 select LENOVO_WMI_CAPDATA 284 select LENOVO_WMI_EVENTS 285 select LENOVO_WMI_HELPERS 286 help 287 Say Y here if you have a WMI aware Lenovo Legion device and would like to use the 288 firmware_attributes API to control various tunable settings typically exposed by 289 Lenovo software in Windows. 290 291 To compile this driver as a module, choose M here: the module will 292 be called lenovo-wmi-other. 293