Commit bb9c2e54 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Hans de Goede
Browse files

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240902150625.2722187-1-andriy.shevchenko@linux.intel.com


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent a093cb66
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,4 +20,4 @@ config X86_ANDROID_TABLETS
	  are missing from the DSDT.

	  If you have a x86 Android tablet say Y or M here, for a generic x86
	  distro config say M here.
	  distro configuration say M here.
+4 −4
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ static const struct x86_gpio_button asus_me176c_tf103c_lid __initconst = {
	.pin = 12,
};

/* Asus ME176C tablets have an Android factory img with everything hardcoded */
/* Asus ME176C tablets have an Android factory image with everything hardcoded */
static const char * const asus_me176c_accel_mount_matrix[] = {
	"-1", "0", "0",
	"0", "1", "0",
@@ -112,7 +112,7 @@ static const struct x86_i2c_client_info asus_me176c_i2c_clients[] __initconst =
		},
		.adapter_path = "\\_SB_.I2C5",
	}, {
		/* kxtj21009 accel */
		/* kxtj21009 accelerometer */
		.board_info = {
			.type = "kxtj21009",
			.addr = 0x0f,
@@ -181,7 +181,7 @@ const struct x86_dev_info asus_me176c_info __initconst = {
	.modules = bq24190_modules,
};

/* Asus TF103C tablets have an Android factory img with everything hardcoded */
/* Asus TF103C tablets have an Android factory image with everything hardcoded */
static const char * const asus_tf103c_accel_mount_matrix[] = {
	"0", "-1", "0",
	"-1", "0", "0",
@@ -280,7 +280,7 @@ static const struct x86_i2c_client_info asus_tf103c_i2c_clients[] __initconst =
		},
		.adapter_path = "\\_SB_.I2C5",
	}, {
		/* kxtj21009 accel */
		/* kxtj21009 accelerometer */
		.board_info = {
			.type = "kxtj21009",
			.addr = 0x0f,
+10 −10
Original line number Diff line number Diff line
@@ -26,19 +26,19 @@
static struct platform_device *x86_android_tablet_device;

/*
 * This helper allows getting a gpio_desc *before* the actual device consuming
 * the GPIO has been instantiated. This function _must_ only be used to handle
 * this special case such as e.g. :
 * This helper allows getting a GPIO descriptor *before* the actual device
 * consuming it has been instantiated. This function MUST only be used to
 * handle this special case such as, e.g.:
 *
 * 1. Getting an IRQ from a GPIO for i2c_board_info.irq which is passed to
 * i2c_client_new() to instantiate i2c_client-s; or
 * 2. Calling desc_to_gpio() to get an old style GPIO number for gpio_keys
 * 2. Calling desc_to_gpio() to get an old style GPIO number for gpio-keys
 * platform_data which still uses old style GPIO numbers.
 *
 * Since the consuming device has not been instatiated yet a dynamic lookup
 * is generated using the special x86_android_tablet dev for dev_id.
 * Since the consuming device has not been instantiated yet a dynamic lookup
 * is generated using the special x86_android_tablet device for dev_id.
 *
 * For normal GPIO lookups a standard static gpiod_lookup_table _must_ be used.
 * For normal GPIO lookups a standard static struct gpiod_lookup_table MUST be used.
 */
int x86_android_tablet_get_gpiod(const char *chip, int pin, const char *con_id,
				 bool active_low, enum gpiod_flags dflags,
@@ -87,7 +87,7 @@ int x86_acpi_irq_helper_get(const struct x86_acpi_irq_data *data)
		/*
		 * The DSDT may already reference the GSI in a device skipped by
		 * acpi_quirk_skip_i2c_client_enumeration(). Unregister the GSI
		 * to avoid EBUSY errors in this case.
		 * to avoid -EBUSY errors in this case.
		 */
		acpi_unregister_gsi(data->index);
		irq = acpi_register_gsi(NULL, data->index, data->trigger, data->polarity);
@@ -379,7 +379,7 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)
		}
	}

	/* + 1 to make space for (optional) gpio_keys_button pdev */
	/* + 1 to make space for the (optional) gpio_keys_button platform device */
	pdevs = kcalloc(dev_info->pdev_count + 1, sizeof(*pdevs), GFP_KERNEL);
	if (!pdevs) {
		x86_android_tablet_remove(pdev);
@@ -432,7 +432,7 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)

			buttons[i] = dev_info->gpio_button[i].button;
			buttons[i].gpio = desc_to_gpio(gpiod);
			/* Release gpiod so that gpio-keys can request it */
			/* Release GPIO descriptor so that gpio-keys can request it */
			devm_gpiod_put(&x86_android_tablet_device->dev, gpiod);
		}

+8 −8
Original line number Diff line number Diff line
@@ -99,17 +99,17 @@ const struct dmi_system_id x86_android_tablet_ids[] __initconst = {
	{
		/* Lenovo Yoga Book X91F / X91L */
		.matches = {
			/* Non exact match to match F + L versions */
			/* Inexact match to match F + L versions */
			DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X91"),
		},
		.driver_data = (void *)&lenovo_yogabook_x91_info,
	},
	{
		/*
		 * Lenovo Yoga Tablet 2 Pro 1380F/L (13") This has more or less
		 * the same BIOS as the 830F/L or 1050F/L (8" and 10") below,
		 * but unlike the 8" / 10" models which share the same mainboard
		 * this model has a different mainboard.
		 * Lenovo Yoga Tablet 2 Pro 1380F/L (13")
		 * This has more or less the same BIOS as the 830F/L or 1050F/L
		 * (8" and 10") below, but unlike the 8"/10" models which share
		 * the same mainboard this model has a different mainboard.
		 * This match for the 13" model MUST come before the 8" + 10"
		 * match since that one will also match the 13" model!
		 */
@@ -124,8 +124,8 @@ const struct dmi_system_id x86_android_tablet_ids[] __initconst = {
	},
	{
		/*
		 * Lenovo Yoga Tablet 2 830F/L or 1050F/L (The 8" and 10"
		 * Lenovo Yoga Tablet 2 use the same mainboard)
		 * Lenovo Yoga Tablet 2 830F/L or 1050F/L
		 * The 8" and 10" Lenovo Yoga Tablet 2 use the same mainboard.
		 */
		.matches = {
			DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."),
+11 −11
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ static struct lp855x_platform_data lenovo_lp8557_reg_only_pdata = {
	.initial_brightness = 128,
};

/* Lenovo Yoga Book X90F / X90L's Android factory img has everything hardcoded */
/* Lenovo Yoga Book X90F / X90L's Android factory image has everything hardcoded */

static const struct property_entry lenovo_yb1_x90_wacom_props[] = {
	PROPERTY_ENTRY_U32("hid-descr-addr", 0x0001),
@@ -262,7 +262,7 @@ const struct x86_dev_info lenovo_yogabook_x90_info __initconst = {
	.init = lenovo_yb1_x90_init,
};

/* Lenovo Yoga Book X91F/L Windows tablet needs manual instantiation of the fg client */
/* Lenovo Yoga Book X91F/L Windows tablet needs manual instantiation of the fuel-gauge client */
static const struct x86_i2c_client_info lenovo_yogabook_x91_i2c_clients[] __initconst = {
	{
		/* BQ27542 fuel-gauge */
@@ -281,7 +281,7 @@ const struct x86_dev_info lenovo_yogabook_x91_info __initconst = {
	.i2c_client_count = ARRAY_SIZE(lenovo_yogabook_x91_i2c_clients),
};

/* Lenovo Yoga Tablet 2 1050F/L's Android factory img has everything hardcoded */
/* Lenovo Yoga Tablet 2 1050F/L's Android factory image has everything hardcoded */
static const struct property_entry lenovo_yoga_tab2_830_1050_bq24190_props[] = {
	PROPERTY_ENTRY_STRING_ARRAY_LEN("supplied-from", tusb1211_chg_det_psy, 1),
	PROPERTY_ENTRY_REF("monitored-battery", &generic_lipo_hv_4v35_battery_node),
@@ -521,7 +521,7 @@ static int __init lenovo_yoga_tab2_830_1050_init_codec(void)
}

/*
 * These tablet's DSDT does not set acpi_gbl_reduced_hardware, so acpi_power_off
 * These tablet's DSDT does not set acpi_gbl_reduced_hardware, so acpi_power_off()
 * gets used as pm_power_off handler. This causes "poweroff" on these tablets
 * to hang hard. Requiring pressing the power button for 30 seconds *twice*
 * followed by a normal 3 second press to recover. Avoid this by doing an EFI
@@ -546,7 +546,7 @@ static int __init lenovo_yoga_tab2_830_1050_init(struct device *dev)
	if (ret)
		return ret;

	/* SYS_OFF_PRIO_FIRMWARE + 1 so that it runs before acpi_power_off */
	/* SYS_OFF_PRIO_FIRMWARE + 1 so that it runs before acpi_power_off() */
	lenovo_yoga_tab2_830_1050_sys_off_handler =
		register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_FIRMWARE + 1,
					 lenovo_yoga_tab2_830_1050_power_off, NULL);
@@ -742,7 +742,7 @@ static int __init lenovo_yoga_tab2_1380_init(struct device *dev)
	if (ret)
		return ret;

	/* SYS_OFF_PRIO_FIRMWARE + 1 so that it runs before acpi_power_off */
	/* SYS_OFF_PRIO_FIRMWARE + 1 so that it runs before acpi_power_off() */
	lenovo_yoga_tab2_830_1050_sys_off_handler =
		register_sys_off_handler(SYS_OFF_MODE_POWER_OFF, SYS_OFF_PRIO_FIRMWARE + 1,
					 lenovo_yoga_tab2_830_1050_power_off, NULL);
@@ -799,7 +799,7 @@ static const struct software_node fg_bq25890_1_supply_node = {
	.properties = fg_bq25890_1_supply_props,
};

/* bq25892 charger settings for the flat lipo battery behind the screen */
/* bq25892 charger settings for the flat LiPo battery behind the screen */
static const struct property_entry lenovo_yt3_bq25892_0_props[] = {
	PROPERTY_ENTRY_STRING_ARRAY("supplied-from", lenovo_yt3_bq25892_0_suppliers),
	PROPERTY_ENTRY_U32("linux,iinlim-percentage", 40),
@@ -833,7 +833,7 @@ static const struct software_node lenovo_yt3_hideep_ts_node = {

static const struct x86_i2c_client_info lenovo_yt3_i2c_clients[] __initconst = {
	{
		/* bq27500 fuel-gauge for the flat lipo battery behind the screen */
		/* bq27500 fuel-gauge for the flat LiPo battery behind the screen */
		.board_info = {
			.type = "bq27500",
			.addr = 0x55,
@@ -842,7 +842,7 @@ static const struct x86_i2c_client_info lenovo_yt3_i2c_clients[] __initconst = {
		},
		.adapter_path = "\\_SB_.PCI0.I2C1",
	}, {
		/* bq25892 charger for the flat lipo battery behind the screen */
		/* bq25892 charger for the flat LiPo battery behind the screen */
		.board_info = {
			.type = "bq25892",
			.addr = 0x6b,
@@ -859,7 +859,7 @@ static const struct x86_i2c_client_info lenovo_yt3_i2c_clients[] __initconst = {
			.con_id = "bq25892_0_irq",
		},
	}, {
		/* bq27500 fuel-gauge for the round li-ion cells in the hinge */
		/* bq27500 fuel-gauge for the round Li-ion cells in the hinge */
		.board_info = {
			.type = "bq27500",
			.addr = 0x55,
Loading