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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'platform-drivers-x86-v6.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Ilpo Järvinen:

- tablet-mode-switch events fix

- kernel-doc warning fixes

* tag 'platform-drivers-x86-v6.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86: intel_ips: fix kernel-doc formatting
platform/x86: thinkpad_acpi: fix kernel-doc warnings
platform/x86: intel-vbtn: Fix missing tablet-mode-switch events

+41 -14
+15 -4
drivers/platform/x86/intel/vbtn.c
··· 73 73 bool wakeup_mode; 74 74 }; 75 75 76 - static void detect_tablet_mode(struct platform_device *device) 76 + static void detect_tablet_mode(struct device *dev) 77 77 { 78 - struct intel_vbtn_priv *priv = dev_get_drvdata(&device->dev); 79 - acpi_handle handle = ACPI_HANDLE(&device->dev); 78 + struct intel_vbtn_priv *priv = dev_get_drvdata(dev); 79 + acpi_handle handle = ACPI_HANDLE(dev); 80 80 unsigned long long vgbs; 81 81 acpi_status status; 82 82 int m; ··· 89 89 input_report_switch(priv->switches_dev, SW_TABLET_MODE, m); 90 90 m = (vgbs & VGBS_DOCK_MODE_FLAG) ? 1 : 0; 91 91 input_report_switch(priv->switches_dev, SW_DOCK, m); 92 + 93 + input_sync(priv->switches_dev); 92 94 } 93 95 94 96 /* ··· 136 134 priv->switches_dev->id.bustype = BUS_HOST; 137 135 138 136 if (priv->has_switches) { 139 - detect_tablet_mode(device); 137 + detect_tablet_mode(&device->dev); 140 138 141 139 ret = input_register_device(priv->switches_dev); 142 140 if (ret) ··· 200 198 autorelease = val && (!ke_rel || ke_rel->type == KE_IGNORE); 201 199 202 200 sparse_keymap_report_event(input_dev, event, val, autorelease); 201 + 202 + /* Some devices need this to report further events */ 203 + acpi_evaluate_object(handle, "VBDL", NULL, NULL); 203 204 } 204 205 205 206 /* ··· 357 352 358 353 static int intel_vbtn_pm_resume(struct device *dev) 359 354 { 355 + struct intel_vbtn_priv *priv = dev_get_drvdata(dev); 356 + 360 357 intel_vbtn_pm_complete(dev); 358 + 359 + if (priv->has_switches) 360 + detect_tablet_mode(dev); 361 + 361 362 return 0; 362 363 } 363 364
+23 -7
drivers/platform/x86/intel_ips.c
··· 590 590 * @ips: IPS driver struct 591 591 * 592 592 * Check whether the MCP is over its thermal or power budget. 593 + * 594 + * Returns: %true if the temp or power has exceeded its maximum, else %false 593 595 */ 594 596 static bool mcp_exceeded(struct ips_driver *ips) 595 597 { ··· 621 619 * @cpu: CPU number to check 622 620 * 623 621 * Check a given CPU's average temp or power is over its limit. 622 + * 623 + * Returns: %true if the temp or power has exceeded its maximum, else %false 624 624 */ 625 625 static bool cpu_exceeded(struct ips_driver *ips, int cpu) 626 626 { ··· 649 645 * @ips: IPS driver struct 650 646 * 651 647 * Check the MCH temp & power against their maximums. 648 + * 649 + * Returns: %true if the temp or power has exceeded its maximum, else %false 652 650 */ 653 651 static bool mch_exceeded(struct ips_driver *ips) 654 652 { ··· 748 742 * - down (at TDP limit) 749 743 * - adjust both CPU and GPU down if possible 750 744 * 751 - cpu+ gpu+ cpu+gpu- cpu-gpu+ cpu-gpu- 752 - cpu < gpu < cpu+gpu+ cpu+ gpu+ nothing 753 - cpu < gpu >= cpu+gpu-(mcp<) cpu+gpu-(mcp<) gpu- gpu- 754 - cpu >= gpu < cpu-gpu+(mcp<) cpu- cpu-gpu+(mcp<) cpu- 755 - cpu >= gpu >= cpu-gpu- cpu-gpu- cpu-gpu- cpu-gpu- 745 + * |cpu+ gpu+ cpu+gpu- cpu-gpu+ cpu-gpu- 746 + * cpu < gpu < |cpu+gpu+ cpu+ gpu+ nothing 747 + * cpu < gpu >= |cpu+gpu-(mcp<) cpu+gpu-(mcp<) gpu- gpu- 748 + * cpu >= gpu < |cpu-gpu+(mcp<) cpu- cpu-gpu+(mcp<) cpu- 749 + * cpu >= gpu >=|cpu-gpu- cpu-gpu- cpu-gpu- cpu-gpu- 756 750 * 751 + * Returns: %0 757 752 */ 758 753 static int ips_adjust(void *data) 759 754 { ··· 942 935 * @data: ips driver structure 943 936 * 944 937 * This is the main function for the IPS driver. It monitors power and 945 - * tempurature in the MCP and adjusts CPU and GPU power clams accordingly. 938 + * temperature in the MCP and adjusts CPU and GPU power clamps accordingly. 946 939 * 947 - * We keep a 5s moving average of power consumption and tempurature. Using 940 + * We keep a 5s moving average of power consumption and temperature. Using 948 941 * that data, along with CPU vs GPU preference, we adjust the power clamps 949 942 * up or down. 943 + * 944 + * Returns: %0 on success or -errno on error 950 945 */ 951 946 static int ips_monitor(void *data) 952 947 { ··· 1155 1146 * Handle temperature limit trigger events, generally by lowering the clamps. 1156 1147 * If we're at a critical limit, we clamp back to the lowest possible value 1157 1148 * to prevent emergency shutdown. 1149 + * 1150 + * Returns: IRQ_NONE or IRQ_HANDLED 1158 1151 */ 1159 1152 static irqreturn_t ips_irq_handler(int irq, void *arg) 1160 1153 { ··· 1304 1293 1305 1294 /** 1306 1295 * ips_detect_cpu - detect whether CPU supports IPS 1296 + * @ips: IPS driver struct 1307 1297 * 1308 1298 * Walk our list and see if we're on a supported CPU. If we find one, 1309 1299 * return the limits for it. 1300 + * 1301 + * Returns: the &ips_mcp_limits struct that matches the boot CPU or %NULL 1310 1302 */ 1311 1303 static struct ips_mcp_limits *ips_detect_cpu(struct ips_driver *ips) 1312 1304 { ··· 1366 1352 * monitor and control graphics turbo mode. If we can find them, we can 1367 1353 * enable graphics turbo, otherwise we must disable it to avoid exceeding 1368 1354 * thermal and power limits in the MCP. 1355 + * 1356 + * Returns: %true if the required symbols are found, else %false 1369 1357 */ 1370 1358 static bool ips_get_i915_syms(struct ips_driver *ips) 1371 1359 {
+3 -3
drivers/platform/x86/thinkpad_acpi.c
··· 512 512 * Iterates over a quirks list until one is found that matches the 513 513 * ThinkPad's vendor, BIOS and EC model. 514 514 * 515 - * Returns 0 if nothing matches, otherwise returns the quirks field of 515 + * Returns: %0 if nothing matches, otherwise returns the quirks field of 516 516 * the matching &struct tpacpi_quirk entry. 517 517 * 518 - * The match criteria is: vendor, ec and bios much match. 518 + * The match criteria is: vendor, ec and bios must match. 519 519 */ 520 520 static unsigned long __init tpacpi_check_quirks( 521 521 const struct tpacpi_quirk *qlist, ··· 9303 9303 9304 9304 /* ACPI helpers/functions/probes */ 9305 9305 9306 - /** 9306 + /* 9307 9307 * This evaluates a ACPI method call specific to the battery 9308 9308 * ACPI extension. The specifics are that an error is marked 9309 9309 * in the 32rd bit of the response, so we just check that here.