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.

platform/x86: x86-android-tablets: Fix spelling in the comments

Fix spelling across comments (besides obvious grammar issues):
- spell words in full, e.g., 'img' --> 'image'
- refer to 'gpio-keys' consistently
- refer to acpi_power_off() clearly as to function
- make sure that the first line is only for the affected model(s)
- miscellaneous improvements

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240902150625.2722187-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Andy Shevchenko and committed by
Hans de Goede
bb9c2e54 a093cb66

+52 -52
+1 -1
drivers/platform/x86/x86-android-tablets/Kconfig
··· 20 20 are missing from the DSDT. 21 21 22 22 If you have a x86 Android tablet say Y or M here, for a generic x86 23 - distro config say M here. 23 + distro configuration say M here.
+4 -4
drivers/platform/x86/x86-android-tablets/asus.c
··· 37 37 .pin = 12, 38 38 }; 39 39 40 - /* Asus ME176C tablets have an Android factory img with everything hardcoded */ 40 + /* Asus ME176C tablets have an Android factory image with everything hardcoded */ 41 41 static const char * const asus_me176c_accel_mount_matrix[] = { 42 42 "-1", "0", "0", 43 43 "0", "1", "0", ··· 112 112 }, 113 113 .adapter_path = "\\_SB_.I2C5", 114 114 }, { 115 - /* kxtj21009 accel */ 115 + /* kxtj21009 accelerometer */ 116 116 .board_info = { 117 117 .type = "kxtj21009", 118 118 .addr = 0x0f, ··· 181 181 .modules = bq24190_modules, 182 182 }; 183 183 184 - /* Asus TF103C tablets have an Android factory img with everything hardcoded */ 184 + /* Asus TF103C tablets have an Android factory image with everything hardcoded */ 185 185 static const char * const asus_tf103c_accel_mount_matrix[] = { 186 186 "0", "-1", "0", 187 187 "-1", "0", "0", ··· 280 280 }, 281 281 .adapter_path = "\\_SB_.I2C5", 282 282 }, { 283 - /* kxtj21009 accel */ 283 + /* kxtj21009 accelerometer */ 284 284 .board_info = { 285 285 .type = "kxtj21009", 286 286 .addr = 0x0f,
+10 -10
drivers/platform/x86/x86-android-tablets/core.c
··· 26 26 static struct platform_device *x86_android_tablet_device; 27 27 28 28 /* 29 - * This helper allows getting a gpio_desc *before* the actual device consuming 30 - * the GPIO has been instantiated. This function _must_ only be used to handle 31 - * this special case such as e.g. : 29 + * This helper allows getting a GPIO descriptor *before* the actual device 30 + * consuming it has been instantiated. This function MUST only be used to 31 + * handle this special case such as, e.g.: 32 32 * 33 33 * 1. Getting an IRQ from a GPIO for i2c_board_info.irq which is passed to 34 34 * i2c_client_new() to instantiate i2c_client-s; or 35 - * 2. Calling desc_to_gpio() to get an old style GPIO number for gpio_keys 35 + * 2. Calling desc_to_gpio() to get an old style GPIO number for gpio-keys 36 36 * platform_data which still uses old style GPIO numbers. 37 37 * 38 - * Since the consuming device has not been instatiated yet a dynamic lookup 39 - * is generated using the special x86_android_tablet dev for dev_id. 38 + * Since the consuming device has not been instantiated yet a dynamic lookup 39 + * is generated using the special x86_android_tablet device for dev_id. 40 40 * 41 - * For normal GPIO lookups a standard static gpiod_lookup_table _must_ be used. 41 + * For normal GPIO lookups a standard static struct gpiod_lookup_table MUST be used. 42 42 */ 43 43 int x86_android_tablet_get_gpiod(const char *chip, int pin, const char *con_id, 44 44 bool active_low, enum gpiod_flags dflags, ··· 87 87 /* 88 88 * The DSDT may already reference the GSI in a device skipped by 89 89 * acpi_quirk_skip_i2c_client_enumeration(). Unregister the GSI 90 - * to avoid EBUSY errors in this case. 90 + * to avoid -EBUSY errors in this case. 91 91 */ 92 92 acpi_unregister_gsi(data->index); 93 93 irq = acpi_register_gsi(NULL, data->index, data->trigger, data->polarity); ··· 379 379 } 380 380 } 381 381 382 - /* + 1 to make space for (optional) gpio_keys_button pdev */ 382 + /* + 1 to make space for the (optional) gpio_keys_button platform device */ 383 383 pdevs = kcalloc(dev_info->pdev_count + 1, sizeof(*pdevs), GFP_KERNEL); 384 384 if (!pdevs) { 385 385 x86_android_tablet_remove(pdev); ··· 432 432 433 433 buttons[i] = dev_info->gpio_button[i].button; 434 434 buttons[i].gpio = desc_to_gpio(gpiod); 435 - /* Release gpiod so that gpio-keys can request it */ 435 + /* Release GPIO descriptor so that gpio-keys can request it */ 436 436 devm_gpiod_put(&x86_android_tablet_device->dev, gpiod); 437 437 } 438 438
+8 -8
drivers/platform/x86/x86-android-tablets/dmi.c
··· 99 99 { 100 100 /* Lenovo Yoga Book X91F / X91L */ 101 101 .matches = { 102 - /* Non exact match to match F + L versions */ 102 + /* Inexact match to match F + L versions */ 103 103 DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X91"), 104 104 }, 105 105 .driver_data = (void *)&lenovo_yogabook_x91_info, 106 106 }, 107 107 { 108 108 /* 109 - * Lenovo Yoga Tablet 2 Pro 1380F/L (13") This has more or less 110 - * the same BIOS as the 830F/L or 1050F/L (8" and 10") below, 111 - * but unlike the 8" / 10" models which share the same mainboard 112 - * this model has a different mainboard. 109 + * Lenovo Yoga Tablet 2 Pro 1380F/L (13") 110 + * This has more or less the same BIOS as the 830F/L or 1050F/L 111 + * (8" and 10") below, but unlike the 8"/10" models which share 112 + * the same mainboard this model has a different mainboard. 113 113 * This match for the 13" model MUST come before the 8" + 10" 114 114 * match since that one will also match the 13" model! 115 115 */ ··· 124 124 }, 125 125 { 126 126 /* 127 - * Lenovo Yoga Tablet 2 830F/L or 1050F/L (The 8" and 10" 128 - * Lenovo Yoga Tablet 2 use the same mainboard) 127 + * Lenovo Yoga Tablet 2 830F/L or 1050F/L 128 + * The 8" and 10" Lenovo Yoga Tablet 2 use the same mainboard. 129 129 */ 130 130 .matches = { 131 131 DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."), ··· 164 164 .driver_data = (void *)&nextbook_ares8_info, 165 165 }, 166 166 { 167 - /* Nextbook Ares 8A (CHT version)*/ 167 + /* Nextbook Ares 8A (CHT version) */ 168 168 .matches = { 169 169 DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), 170 170 DMI_MATCH(DMI_PRODUCT_NAME, "CherryTrail"),
+11 -11
drivers/platform/x86/x86-android-tablets/lenovo.c
··· 59 59 .initial_brightness = 128, 60 60 }; 61 61 62 - /* Lenovo Yoga Book X90F / X90L's Android factory img has everything hardcoded */ 62 + /* Lenovo Yoga Book X90F / X90L's Android factory image has everything hardcoded */ 63 63 64 64 static const struct property_entry lenovo_yb1_x90_wacom_props[] = { 65 65 PROPERTY_ENTRY_U32("hid-descr-addr", 0x0001), ··· 262 262 .init = lenovo_yb1_x90_init, 263 263 }; 264 264 265 - /* Lenovo Yoga Book X91F/L Windows tablet needs manual instantiation of the fg client */ 265 + /* Lenovo Yoga Book X91F/L Windows tablet needs manual instantiation of the fuel-gauge client */ 266 266 static const struct x86_i2c_client_info lenovo_yogabook_x91_i2c_clients[] __initconst = { 267 267 { 268 268 /* BQ27542 fuel-gauge */ ··· 281 281 .i2c_client_count = ARRAY_SIZE(lenovo_yogabook_x91_i2c_clients), 282 282 }; 283 283 284 - /* Lenovo Yoga Tablet 2 1050F/L's Android factory img has everything hardcoded */ 284 + /* Lenovo Yoga Tablet 2 1050F/L's Android factory image has everything hardcoded */ 285 285 static const struct property_entry lenovo_yoga_tab2_830_1050_bq24190_props[] = { 286 286 PROPERTY_ENTRY_STRING_ARRAY_LEN("supplied-from", tusb1211_chg_det_psy, 1), 287 287 PROPERTY_ENTRY_REF("monitored-battery", &generic_lipo_hv_4v35_battery_node), ··· 521 521 } 522 522 523 523 /* 524 - * These tablet's DSDT does not set acpi_gbl_reduced_hardware, so acpi_power_off 524 + * These tablet's DSDT does not set acpi_gbl_reduced_hardware, so acpi_power_off() 525 525 * gets used as pm_power_off handler. This causes "poweroff" on these tablets 526 - * to hang hard. Requiring pressing the powerbutton for 30 seconds *twice* 526 + * to hang hard. Requiring pressing the power button for 30 seconds *twice* 527 527 * followed by a normal 3 second press to recover. Avoid this by doing an EFI 528 528 * poweroff instead. 529 529 */ ··· 546 546 if (ret) 547 547 return ret; 548 548 549 - /* SYS_OFF_PRIO_FIRMWARE + 1 so that it runs before acpi_power_off */ 549 + /* SYS_OFF_PRIO_FIRMWARE + 1 so that it runs before acpi_power_off() */ 550 550 lenovo_yoga_tab2_830_1050_sys_off_handler = 551 551 register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_FIRMWARE + 1, 552 552 lenovo_yoga_tab2_830_1050_power_off, NULL); ··· 742 742 if (ret) 743 743 return ret; 744 744 745 - /* SYS_OFF_PRIO_FIRMWARE + 1 so that it runs before acpi_power_off */ 745 + /* SYS_OFF_PRIO_FIRMWARE + 1 so that it runs before acpi_power_off() */ 746 746 lenovo_yoga_tab2_830_1050_sys_off_handler = 747 747 register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_FIRMWARE + 1, 748 748 lenovo_yoga_tab2_830_1050_power_off, NULL); ··· 799 799 .properties = fg_bq25890_1_supply_props, 800 800 }; 801 801 802 - /* bq25892 charger settings for the flat lipo battery behind the screen */ 802 + /* bq25892 charger settings for the flat LiPo battery behind the screen */ 803 803 static const struct property_entry lenovo_yt3_bq25892_0_props[] = { 804 804 PROPERTY_ENTRY_STRING_ARRAY("supplied-from", lenovo_yt3_bq25892_0_suppliers), 805 805 PROPERTY_ENTRY_U32("linux,iinlim-percentage", 40), ··· 833 833 834 834 static const struct x86_i2c_client_info lenovo_yt3_i2c_clients[] __initconst = { 835 835 { 836 - /* bq27500 fuel-gauge for the flat lipo battery behind the screen */ 836 + /* bq27500 fuel-gauge for the flat LiPo battery behind the screen */ 837 837 .board_info = { 838 838 .type = "bq27500", 839 839 .addr = 0x55, ··· 842 842 }, 843 843 .adapter_path = "\\_SB_.PCI0.I2C1", 844 844 }, { 845 - /* bq25892 charger for the flat lipo battery behind the screen */ 845 + /* bq25892 charger for the flat LiPo battery behind the screen */ 846 846 .board_info = { 847 847 .type = "bq25892", 848 848 .addr = 0x6b, ··· 859 859 .con_id = "bq25892_0_irq", 860 860 }, 861 861 }, { 862 - /* bq27500 fuel-gauge for the round li-ion cells in the hinge */ 862 + /* bq27500 fuel-gauge for the round Li-ion cells in the hinge */ 863 863 .board_info = { 864 864 .type = "bq27500", 865 865 .addr = 0x55,
+15 -15
drivers/platform/x86/x86-android-tablets/other.c
··· 20 20 #include "shared-psy-info.h" 21 21 #include "x86-android-tablets.h" 22 22 23 - /* Acer Iconia One 7 B1-750 has an Android factory img with everything hardcoded */ 23 + /* Acer Iconia One 7 B1-750 has an Android factory image with everything hardcoded */ 24 24 static const char * const acer_b1_750_mount_matrix[] = { 25 25 "-1", "0", "0", 26 26 "0", "1", "0", ··· 98 98 * Advantech MICA-071 99 99 * This is a standard Windows tablet, but it has an extra "quick launch" button 100 100 * which is not described in the ACPI tables in anyway. 101 - * Use the x86-android-tablets infra to create a gpio-button device for this. 101 + * Use the x86-android-tablets infra to create a gpio-keys device for this. 102 102 */ 103 103 static const struct x86_gpio_button advantech_mica_071_button __initconst = { 104 104 .button = { ··· 209 209 * This comes in both Windows and Android versions and even on Android 210 210 * the DSDT is mostly sane. This tablet has 2 extra general purpose buttons 211 211 * in the button row with the power + volume-buttons labeled P and F. 212 - * Use the x86-android-tablets infra to create a gpio-button device for these. 212 + * Use the x86-android-tablets infra to create a gpio-keys device for these. 213 213 */ 214 214 static const struct x86_gpio_button cyberbook_t116_buttons[] __initconst = { 215 215 { ··· 276 276 .init = czc_p10t_init, 277 277 }; 278 278 279 - /* Medion Lifetab S10346 tablets have an Android factory img with everything hardcoded */ 279 + /* Medion Lifetab S10346 tablets have an Android factory image with everything hardcoded */ 280 280 static const char * const medion_lifetab_s10346_accel_mount_matrix[] = { 281 281 "0", "1", "0", 282 282 "1", "0", "0", ··· 305 305 306 306 static const struct x86_i2c_client_info medion_lifetab_s10346_i2c_clients[] __initconst = { 307 307 { 308 - /* kxtj21009 accel */ 308 + /* kxtj21009 accelerometer */ 309 309 .board_info = { 310 310 .type = "kxtj21009", 311 311 .addr = 0x0f, ··· 359 359 .gpiod_lookup_tables = medion_lifetab_s10346_gpios, 360 360 }; 361 361 362 - /* Nextbook Ares 8 (BYT) tablets have an Android factory img with everything hardcoded */ 362 + /* Nextbook Ares 8 (BYT) tablets have an Android factory image with everything hardcoded */ 363 363 static const char * const nextbook_ares8_accel_mount_matrix[] = { 364 364 "0", "-1", "0", 365 365 "-1", "0", "0", ··· 387 387 388 388 static const struct x86_i2c_client_info nextbook_ares8_i2c_clients[] __initconst = { 389 389 { 390 - /* Freescale MMA8653FC accel */ 390 + /* Freescale MMA8653FC accelerometer */ 391 391 .board_info = { 392 392 .type = "mma8653", 393 393 .addr = 0x1d, ··· 428 428 .gpiod_lookup_tables = nextbook_ares8_gpios, 429 429 }; 430 430 431 - /* Nextbook Ares 8A (CHT) tablets have an Android factory img with everything hardcoded */ 431 + /* Nextbook Ares 8A (CHT) tablets have an Android factory image with everything hardcoded */ 432 432 static const char * const nextbook_ares8a_accel_mount_matrix[] = { 433 433 "1", "0", "0", 434 434 "0", "-1", "0", ··· 446 446 447 447 static const struct x86_i2c_client_info nextbook_ares8a_i2c_clients[] __initconst = { 448 448 { 449 - /* Freescale MMA8653FC accel */ 449 + /* Freescale MMA8653FC accelerometer */ 450 450 .board_info = { 451 451 .type = "mma8653", 452 452 .addr = 0x1d, ··· 497 497 * Peaq C1010 498 498 * This is a standard Windows tablet, but it has a special Dolby button. 499 499 * This button has a WMI interface, but that is broken. Instead of trying to 500 - * use the broken WMI interface, instantiate a gpio_keys device for this. 500 + * use the broken WMI interface, instantiate a gpio-keys device for this. 501 501 */ 502 502 static const struct x86_gpio_button peaq_c1010_button __initconst = { 503 503 .button = { ··· 521 521 * Whitelabel (sold as various brands) TM800A550L tablets. 522 522 * These tablet's DSDT contains a whole bunch of bogus ACPI I2C devices 523 523 * (removed through acpi_quirk_skip_i2c_client_enumeration()) and 524 - * the touchscreen fwnode has the wrong GPIOs. 524 + * the touchscreen firmware node has the wrong GPIOs. 525 525 */ 526 526 static const char * const whitelabel_tm800a550l_accel_mount_matrix[] = { 527 527 "-1", "0", "0", ··· 566 566 .polarity = ACPI_ACTIVE_HIGH, 567 567 }, 568 568 }, { 569 - /* kxcj91008 accel */ 569 + /* kxcj91008 accelerometer */ 570 570 .board_info = { 571 571 .type = "kxcj91008", 572 572 .addr = 0x0f, ··· 598 598 }; 599 599 600 600 /* 601 - * The fwnode for ktd2026 on Xaomi pad2. It composed of a RGB LED node 601 + * The firmware node for ktd2026 on Xaomi pad2. It composed of a RGB LED node 602 602 * with three subnodes for each color (B/G/R). The RGB LED node is named 603 603 * "multi-led" to align with the name in the device tree. 604 604 */ 605 605 606 - /* main fwnode for ktd2026 */ 606 + /* Main firmware node for ktd2026 */ 607 607 static const struct software_node ktd2026_node = { 608 608 .name = "ktd2026", 609 609 }; ··· 665 665 }; 666 666 667 667 /* 668 - * For the LEDs which backlight the menu / home / back capacitive buttons on 668 + * For the LEDs which backlight the Menu / Home / Back capacitive buttons on 669 669 * the bottom bezel. These are attached to a TPS61158 LED controller which 670 670 * is controlled by the "pwm_soc_lpss_2" PWM output. 671 671 */
+2 -2
drivers/platform/x86/x86-android-tablets/shared-psy-info.c
··· 39 39 .properties = fg_bq25890_supply_props, 40 40 }; 41 41 42 - /* LiPo HighVoltage (max 4.35V) settings used by most devs with a HV bat. */ 42 + /* LiPo HighVoltage (max 4.35V) settings used by most devs with a HV battery */ 43 43 static const struct property_entry generic_lipo_hv_4v35_battery_props[] = { 44 44 PROPERTY_ENTRY_STRING("compatible", "simple-battery"), 45 45 PROPERTY_ENTRY_STRING("device-chemistry", "lithium-ion"), ··· 80 80 NULL 81 81 }; 82 82 83 - /* Generic pdevs array and gpio-lookups for micro USB ID pin handling */ 83 + /* Generic platform device array and GPIO lookup table for micro USB ID pin handling */ 84 84 const struct platform_device_info int3496_pdevs[] __initconst = { 85 85 { 86 86 /* For micro USB ID pin handling */
+1 -1
drivers/platform/x86/x86-android-tablets/x86-android-tablets.h
··· 61 61 const char *ctrl_uid; 62 62 const char *ctrl_devname; 63 63 /* 64 - * ATM the serdev core only supports of or ACPI matching; and sofar all 64 + * ATM the serdev core only supports of or ACPI matching; and so far all 65 65 * Android x86 tablets DSDTs have usable serdev nodes, but sometimes 66 66 * under the wrong controller. So we just tie the existing serdev ACPI 67 67 * node to the right controller.