Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branches 'acpica', 'acpi-ec', 'acpi-pmic' and 'acpi-video'

Merge assorted fixes and cleanups and one new backlight quirk list
item for 5.16-rc1.

* acpica:
ACPI: Drop ACPI_USE_BUILTIN_STDARG ifdef from acgcc.h

* acpi-ec:
ACPI: EC: Remove initialization of static variables to false
ACPI: EC: Use ec_no_wakeup on HP ZHAN 66 Pro

* acpi-pmic:
ACPI: PMIC: Fix intel_pmic_regs_handler() read accesses

* acpi-video:
ACPI: video: use platform backlight driver on Xiaomi Mi Pad 2
ACPI: video: Drop dmi_system_id.ident settings from video_detect_dmi_table[]

+80 -73
+9 -2
drivers/acpi/ec.c
··· 133 133 module_param(ec_storm_threshold, uint, 0644); 134 134 MODULE_PARM_DESC(ec_storm_threshold, "Maxim false GPE numbers not considered as GPE storm"); 135 135 136 - static bool ec_freeze_events __read_mostly = false; 136 + static bool ec_freeze_events __read_mostly; 137 137 module_param(ec_freeze_events, bool, 0644); 138 138 MODULE_PARM_DESC(ec_freeze_events, "Disabling event handling during suspend/resume"); 139 139 ··· 177 177 EXPORT_SYMBOL(first_ec); 178 178 179 179 static struct acpi_ec *boot_ec; 180 - static bool boot_ec_is_ecdt = false; 180 + static bool boot_ec_is_ecdt; 181 181 static struct workqueue_struct *ec_wq; 182 182 static struct workqueue_struct *ec_query_wq; 183 183 ··· 2150 2150 .matches = { 2151 2151 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 2152 2152 DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Yoga 3rd"), 2153 + }, 2154 + }, 2155 + { 2156 + .ident = "HP ZHAN 66 Pro", 2157 + .matches = { 2158 + DMI_MATCH(DMI_SYS_VENDOR, "HP"), 2159 + DMI_MATCH(DMI_PRODUCT_FAMILY, "103C_5336AN HP ZHAN 66 Pro"), 2153 2160 }, 2154 2161 }, 2155 2162 { },
+28 -23
drivers/acpi/pmic/intel_pmic.c
··· 211 211 void *handler_context, void *region_context) 212 212 { 213 213 struct intel_pmic_opregion *opregion = region_context; 214 - int result = 0; 214 + int result = -EINVAL; 215 215 216 - switch (address) { 217 - case 0: 218 - return AE_OK; 219 - case 1: 220 - opregion->ctx.addr |= (*value64 & 0xff) << 8; 221 - return AE_OK; 222 - case 2: 223 - opregion->ctx.addr |= *value64 & 0xff; 224 - return AE_OK; 225 - case 3: 226 - opregion->ctx.val = *value64 & 0xff; 227 - return AE_OK; 228 - case 4: 229 - if (*value64) { 230 - result = regmap_write(opregion->regmap, opregion->ctx.addr, 231 - opregion->ctx.val); 232 - } else { 233 - result = regmap_read(opregion->regmap, opregion->ctx.addr, 234 - &opregion->ctx.val); 235 - if (result == 0) 236 - *value64 = opregion->ctx.val; 216 + if (function == ACPI_WRITE) { 217 + switch (address) { 218 + case 0: 219 + return AE_OK; 220 + case 1: 221 + opregion->ctx.addr |= (*value64 & 0xff) << 8; 222 + return AE_OK; 223 + case 2: 224 + opregion->ctx.addr |= *value64 & 0xff; 225 + return AE_OK; 226 + case 3: 227 + opregion->ctx.val = *value64 & 0xff; 228 + return AE_OK; 229 + case 4: 230 + if (*value64) { 231 + result = regmap_write(opregion->regmap, opregion->ctx.addr, 232 + opregion->ctx.val); 233 + } else { 234 + result = regmap_read(opregion->regmap, opregion->ctx.addr, 235 + &opregion->ctx.val); 236 + } 237 + opregion->ctx.addr = 0; 237 238 } 238 - memset(&opregion->ctx, 0x00, sizeof(opregion->ctx)); 239 + } 240 + 241 + if (function == ACPI_READ && address == 3) { 242 + *value64 = opregion->ctx.val; 243 + return AE_OK; 239 244 } 240 245 241 246 if (result < 0) {
+43 -35
drivers/acpi/video_detect.c
··· 115 115 */ 116 116 { 117 117 .callback = video_detect_force_vendor, 118 - .ident = "X360", 118 + /* X360 */ 119 119 .matches = { 120 120 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 121 121 DMI_MATCH(DMI_PRODUCT_NAME, "X360"), ··· 124 124 }, 125 125 { 126 126 .callback = video_detect_force_vendor, 127 - .ident = "Asus UL30VT", 127 + /* Asus UL30VT */ 128 128 .matches = { 129 129 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), 130 130 DMI_MATCH(DMI_PRODUCT_NAME, "UL30VT"), ··· 132 132 }, 133 133 { 134 134 .callback = video_detect_force_vendor, 135 - .ident = "Asus UL30A", 135 + /* Asus UL30A */ 136 136 .matches = { 137 137 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), 138 138 DMI_MATCH(DMI_PRODUCT_NAME, "UL30A"), ··· 140 140 }, 141 141 { 142 142 .callback = video_detect_force_vendor, 143 - .ident = "GIGABYTE GB-BXBT-2807", 143 + /* GIGABYTE GB-BXBT-2807 */ 144 144 .matches = { 145 145 DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), 146 146 DMI_MATCH(DMI_PRODUCT_NAME, "GB-BXBT-2807"), ··· 148 148 }, 149 149 { 150 150 .callback = video_detect_force_vendor, 151 - .ident = "Sony VPCEH3U1E", 151 + /* Sony VPCEH3U1E */ 152 152 .matches = { 153 153 DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), 154 154 DMI_MATCH(DMI_PRODUCT_NAME, "VPCEH3U1E"), 155 + }, 156 + }, 157 + { 158 + .callback = video_detect_force_vendor, 159 + /* Xiaomi Mi Pad 2 */ 160 + .matches = { 161 + DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"), 162 + DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"), 155 163 }, 156 164 }, 157 165 ··· 172 164 */ 173 165 { 174 166 .callback = video_detect_force_video, 175 - .ident = "ThinkPad T420", 167 + /* ThinkPad T420 */ 176 168 .matches = { 177 169 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 178 170 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T420"), ··· 180 172 }, 181 173 { 182 174 .callback = video_detect_force_video, 183 - .ident = "ThinkPad T520", 175 + /* ThinkPad T520 */ 184 176 .matches = { 185 177 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 186 178 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T520"), ··· 188 180 }, 189 181 { 190 182 .callback = video_detect_force_video, 191 - .ident = "ThinkPad X201s", 183 + /* ThinkPad X201s */ 192 184 .matches = { 193 185 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 194 186 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201s"), ··· 196 188 }, 197 189 { 198 190 .callback = video_detect_force_video, 199 - .ident = "ThinkPad X201T", 191 + /* ThinkPad X201T */ 200 192 .matches = { 201 193 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 202 194 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X201T"), ··· 207 199 { 208 200 /* https://bugs.freedesktop.org/show_bug.cgi?id=81515 */ 209 201 .callback = video_detect_force_video, 210 - .ident = "HP ENVY 15 Notebook", 202 + /* HP ENVY 15 Notebook */ 211 203 .matches = { 212 204 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 213 205 DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY 15 Notebook PC"), ··· 215 207 }, 216 208 { 217 209 .callback = video_detect_force_video, 218 - .ident = "SAMSUNG 870Z5E/880Z5E/680Z5E", 210 + /* SAMSUNG 870Z5E/880Z5E/680Z5E */ 219 211 .matches = { 220 212 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 221 213 DMI_MATCH(DMI_PRODUCT_NAME, "870Z5E/880Z5E/680Z5E"), ··· 223 215 }, 224 216 { 225 217 .callback = video_detect_force_video, 226 - .ident = "SAMSUNG 370R4E/370R4V/370R5E/3570RE/370R5V", 218 + /* SAMSUNG 370R4E/370R4V/370R5E/3570RE/370R5V */ 227 219 .matches = { 228 220 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 229 221 DMI_MATCH(DMI_PRODUCT_NAME, ··· 233 225 { 234 226 /* https://bugzilla.redhat.com/show_bug.cgi?id=1186097 */ 235 227 .callback = video_detect_force_video, 236 - .ident = "SAMSUNG 3570R/370R/470R/450R/510R/4450RV", 228 + /* SAMSUNG 3570R/370R/470R/450R/510R/4450RV */ 237 229 .matches = { 238 230 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 239 231 DMI_MATCH(DMI_PRODUCT_NAME, ··· 243 235 { 244 236 /* https://bugzilla.redhat.com/show_bug.cgi?id=1557060 */ 245 237 .callback = video_detect_force_video, 246 - .ident = "SAMSUNG 670Z5E", 238 + /* SAMSUNG 670Z5E */ 247 239 .matches = { 248 240 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 249 241 DMI_MATCH(DMI_PRODUCT_NAME, "670Z5E"), ··· 252 244 { 253 245 /* https://bugzilla.redhat.com/show_bug.cgi?id=1094948 */ 254 246 .callback = video_detect_force_video, 255 - .ident = "SAMSUNG 730U3E/740U3E", 247 + /* SAMSUNG 730U3E/740U3E */ 256 248 .matches = { 257 249 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 258 250 DMI_MATCH(DMI_PRODUCT_NAME, "730U3E/740U3E"), ··· 261 253 { 262 254 /* https://bugs.freedesktop.org/show_bug.cgi?id=87286 */ 263 255 .callback = video_detect_force_video, 264 - .ident = "SAMSUNG 900X3C/900X3D/900X3E/900X4C/900X4D", 256 + /* SAMSUNG 900X3C/900X3D/900X3E/900X4C/900X4D */ 265 257 .matches = { 266 258 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 267 259 DMI_MATCH(DMI_PRODUCT_NAME, ··· 271 263 { 272 264 /* https://bugzilla.redhat.com/show_bug.cgi?id=1272633 */ 273 265 .callback = video_detect_force_video, 274 - .ident = "Dell XPS14 L421X", 266 + /* Dell XPS14 L421X */ 275 267 .matches = { 276 268 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 277 269 DMI_MATCH(DMI_PRODUCT_NAME, "XPS L421X"), ··· 280 272 { 281 273 /* https://bugzilla.redhat.com/show_bug.cgi?id=1163574 */ 282 274 .callback = video_detect_force_video, 283 - .ident = "Dell XPS15 L521X", 275 + /* Dell XPS15 L521X */ 284 276 .matches = { 285 277 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 286 278 DMI_MATCH(DMI_PRODUCT_NAME, "XPS L521X"), ··· 289 281 { 290 282 /* https://bugzilla.kernel.org/show_bug.cgi?id=108971 */ 291 283 .callback = video_detect_force_video, 292 - .ident = "SAMSUNG 530U4E/540U4E", 284 + /* SAMSUNG 530U4E/540U4E */ 293 285 .matches = { 294 286 DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."), 295 287 DMI_MATCH(DMI_PRODUCT_NAME, "530U4E/540U4E"), ··· 298 290 /* https://bugs.launchpad.net/bugs/1894667 */ 299 291 { 300 292 .callback = video_detect_force_video, 301 - .ident = "HP 635 Notebook", 293 + /* HP 635 Notebook */ 302 294 .matches = { 303 295 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), 304 296 DMI_MATCH(DMI_PRODUCT_NAME, "HP 635 Notebook PC"), ··· 309 301 { 310 302 /* https://bugzilla.redhat.com/show_bug.cgi?id=1201530 */ 311 303 .callback = video_detect_force_native, 312 - .ident = "Lenovo Ideapad S405", 304 + /* Lenovo Ideapad S405 */ 313 305 .matches = { 314 306 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 315 307 DMI_MATCH(DMI_BOARD_NAME, "Lenovo IdeaPad S405"), ··· 318 310 { 319 311 /* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */ 320 312 .callback = video_detect_force_native, 321 - .ident = "Lenovo Ideapad Z570", 313 + /* Lenovo Ideapad Z570 */ 322 314 .matches = { 323 315 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 324 316 DMI_MATCH(DMI_PRODUCT_NAME, "102434U"), ··· 326 318 }, 327 319 { 328 320 .callback = video_detect_force_native, 329 - .ident = "Lenovo E41-25", 321 + /* Lenovo E41-25 */ 330 322 .matches = { 331 323 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 332 324 DMI_MATCH(DMI_PRODUCT_NAME, "81FS"), ··· 334 326 }, 335 327 { 336 328 .callback = video_detect_force_native, 337 - .ident = "Lenovo E41-45", 329 + /* Lenovo E41-45 */ 338 330 .matches = { 339 331 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 340 332 DMI_MATCH(DMI_PRODUCT_NAME, "82BK"), ··· 343 335 { 344 336 /* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */ 345 337 .callback = video_detect_force_native, 346 - .ident = "Apple MacBook Pro 12,1", 338 + /* Apple MacBook Pro 12,1 */ 347 339 .matches = { 348 340 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), 349 341 DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro12,1"), ··· 351 343 }, 352 344 { 353 345 .callback = video_detect_force_native, 354 - .ident = "Dell Vostro V131", 346 + /* Dell Vostro V131 */ 355 347 .matches = { 356 348 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 357 349 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"), ··· 360 352 { 361 353 /* https://bugzilla.redhat.com/show_bug.cgi?id=1123661 */ 362 354 .callback = video_detect_force_native, 363 - .ident = "Dell XPS 17 L702X", 355 + /* Dell XPS 17 L702X */ 364 356 .matches = { 365 357 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 366 358 DMI_MATCH(DMI_PRODUCT_NAME, "Dell System XPS L702X"), ··· 368 360 }, 369 361 { 370 362 .callback = video_detect_force_native, 371 - .ident = "Dell Precision 7510", 363 + /* Dell Precision 7510 */ 372 364 .matches = { 373 365 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 374 366 DMI_MATCH(DMI_PRODUCT_NAME, "Precision 7510"), ··· 376 368 }, 377 369 { 378 370 .callback = video_detect_force_native, 379 - .ident = "Acer Aspire 5738z", 371 + /* Acer Aspire 5738z */ 380 372 .matches = { 381 373 DMI_MATCH(DMI_SYS_VENDOR, "Acer"), 382 374 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5738"), ··· 386 378 { 387 379 /* https://bugzilla.kernel.org/show_bug.cgi?id=207835 */ 388 380 .callback = video_detect_force_native, 389 - .ident = "Acer TravelMate 5735Z", 381 + /* Acer TravelMate 5735Z */ 390 382 .matches = { 391 383 DMI_MATCH(DMI_SYS_VENDOR, "Acer"), 392 384 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5735Z"), ··· 395 387 }, 396 388 { 397 389 .callback = video_detect_force_native, 398 - .ident = "ASUSTeK COMPUTER INC. GA401", 390 + /* ASUSTeK COMPUTER INC. GA401 */ 399 391 .matches = { 400 392 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 401 393 DMI_MATCH(DMI_PRODUCT_NAME, "GA401"), ··· 403 395 }, 404 396 { 405 397 .callback = video_detect_force_native, 406 - .ident = "ASUSTeK COMPUTER INC. GA502", 398 + /* ASUSTeK COMPUTER INC. GA502 */ 407 399 .matches = { 408 400 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 409 401 DMI_MATCH(DMI_PRODUCT_NAME, "GA502"), ··· 411 403 }, 412 404 { 413 405 .callback = video_detect_force_native, 414 - .ident = "ASUSTeK COMPUTER INC. GA503", 406 + /* ASUSTeK COMPUTER INC. GA503 */ 415 407 .matches = { 416 408 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 417 409 DMI_MATCH(DMI_PRODUCT_NAME, "GA503"), ··· 424 416 */ 425 417 { 426 418 .callback = video_detect_force_none, 427 - .ident = "Dell OptiPlex 9020M", 419 + /* Dell OptiPlex 9020M */ 428 420 .matches = { 429 421 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 430 422 DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 9020M"), ··· 432 424 }, 433 425 { 434 426 .callback = video_detect_force_none, 435 - .ident = "MSI MS-7721", 427 + /* MSI MS-7721 */ 436 428 .matches = { 437 429 DMI_MATCH(DMI_SYS_VENDOR, "MSI"), 438 430 DMI_MATCH(DMI_PRODUCT_NAME, "MS-7721"),
-13
include/acpi/platform/acgcc.h
··· 10 10 #ifndef __ACGCC_H__ 11 11 #define __ACGCC_H__ 12 12 13 - /* 14 - * Use compiler specific <stdarg.h> is a good practice for even when 15 - * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined. 16 - */ 17 13 #ifndef va_arg 18 - #ifdef ACPI_USE_BUILTIN_STDARG 19 - typedef __builtin_va_list va_list; 20 - #define va_start(v, l) __builtin_va_start(v, l) 21 - #define va_end(v) __builtin_va_end(v) 22 - #define va_arg(v, l) __builtin_va_arg(v, l) 23 - #define va_copy(d, s) __builtin_va_copy(d, s) 24 - #else 25 14 #ifdef __KERNEL__ 26 15 #include <linux/stdarg.h> 27 16 #else 28 - /* Used to build acpi tools */ 29 17 #include <stdarg.h> 30 18 #endif /* __KERNEL__ */ 31 - #endif /* ACPI_USE_BUILTIN_STDARG */ 32 19 #endif /* ! va_arg */ 33 20 34 21 #define ACPI_INLINE __inline__