mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 22:09:30 +02:00
Merge tag 'platform-drivers-x86-v7.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Ilpo Järvinen: - amd/pmf: Fix build on !CONFIG_AMD_PMF_DEBUG - asus-laptop: Fix ACPI event handling - hp-wmi: Fix board_params typo for 8DD6 board - x86-android-tablets: Fix Arizona and Crystal Cove GPIO lookups * tag 'platform-drivers-x86-v7.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: MAINTAINERS: fix sysfs-platform-ayaneo-ec documentation path platform/x86: x86-android-tablets: fix gpio_secondary_fwnode_init() not working platform/x86: x86-android-tablets: use shared battery swnode group on Yoga Tab 2 platform/x86: x86-android-tablets: drop redundant swnode group on YT3 platform/x86: x86-android-tablets: add Crystal Cove GPIO swnode support platform/x86: x86-android-tablets: pass node group to gpio_secondary_fwnode_init() platform/x86: x86-android-tablets: hold device reference for secondary fwnode teardown platform/x86: x86-android-tablets: fix Arizona GPIO swnode references platform/x86/amd/pmf: fix build on !CONFIG_AMD_PMF_DEBUG platform/x86: asus-laptop: Fix ACPI event handling platform/x86: hp-wmi: Fix board_params typo for 8DD6 board
This commit is contained in:
+1
-1
@@ -4512,7 +4512,7 @@ AYANEO PLATFORM EC DRIVER
|
||||
M: Antheas Kapenekakis <lkml@antheas.dev>
|
||||
L: platform-driver-x86@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/ABI/testing/sysfs-platform-ayaneo
|
||||
F: Documentation/ABI/testing/sysfs-platform-ayaneo-ec
|
||||
F: drivers/platform/x86/ayaneo-ec.c
|
||||
|
||||
AZ6007 DVB DRIVER
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <linux/units.h>
|
||||
#include "pmf.h"
|
||||
|
||||
#ifdef CONFIG_AMD_PMF_DEBUG
|
||||
u32 amd_pmf_get_ta_custom_bios_inputs(struct ta_pmf_enact_table *in, int index)
|
||||
{
|
||||
switch (index) {
|
||||
@@ -31,6 +30,7 @@ u32 amd_pmf_get_ta_custom_bios_inputs(struct ta_pmf_enact_table *in, int index)
|
||||
}
|
||||
EXPORT_SYMBOL(amd_pmf_get_ta_custom_bios_inputs);
|
||||
|
||||
#ifdef CONFIG_AMD_PMF_DEBUG
|
||||
void amd_pmf_dump_ta_inputs(struct amd_pmf_dev *dev, struct ta_pmf_enact_table *in)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1882,7 +1882,7 @@ static int asus_acpi_probe(struct platform_device *pdev)
|
||||
if (result && result != -ENODEV)
|
||||
goto fail_pega_rfkill;
|
||||
|
||||
result = acpi_dev_install_notify_handler(device, ACPI_DEVICE_NOTIFY,
|
||||
result = acpi_dev_install_notify_handler(device, ACPI_ALL_NOTIFY,
|
||||
asus_acpi_notify, asus);
|
||||
if (result)
|
||||
goto fail_pega_rfkill;
|
||||
@@ -1912,7 +1912,7 @@ static void asus_acpi_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct asus_laptop *asus = platform_get_drvdata(pdev);
|
||||
|
||||
acpi_dev_remove_notify_handler(asus->device, ACPI_DEVICE_NOTIFY,
|
||||
acpi_dev_remove_notify_handler(asus->device, ACPI_ALL_NOTIFY,
|
||||
asus_acpi_notify);
|
||||
asus_backlight_exit(asus);
|
||||
asus_rfkill_exit(asus);
|
||||
|
||||
@@ -337,7 +337,7 @@ static const struct dmi_system_id hp_wmi_feature_boards[] __initconst = {
|
||||
},
|
||||
{
|
||||
.matches = { DMI_MATCH(DMI_BOARD_NAME, "8DD6") },
|
||||
.driver_data = (void *)&omen_v1_no_ec_thermal_params,
|
||||
.driver_data = (void *)&omen_v1_no_ec_board_params,
|
||||
},
|
||||
{
|
||||
.matches = { DMI_MATCH(DMI_BOARD_NAME, "8E35") },
|
||||
|
||||
@@ -156,7 +156,6 @@ static struct platform_device **pdevs;
|
||||
static struct serdev_device **serdevs;
|
||||
static const struct software_node **gpio_button_swnodes;
|
||||
static const struct software_node **swnode_group;
|
||||
static const struct software_node **gpiochip_node_group;
|
||||
static void (*exit_handler)(void);
|
||||
|
||||
static __init struct i2c_adapter *
|
||||
@@ -362,11 +361,21 @@ static const struct software_node *cherryview_gpiochip_node_group[] = {
|
||||
NULL
|
||||
};
|
||||
|
||||
const struct software_node crystalcove_gpiochip_node = {
|
||||
.name = "INT33FD:00",
|
||||
};
|
||||
|
||||
static const struct software_node *crystalcove_gpiochip_node_group[] = {
|
||||
&crystalcove_gpiochip_node,
|
||||
NULL
|
||||
};
|
||||
|
||||
static void gpio_secondary_unset(void *data)
|
||||
{
|
||||
struct device *dev = data;
|
||||
|
||||
set_secondary_fwnode(dev, NULL);
|
||||
put_device(dev);
|
||||
}
|
||||
|
||||
static void gpio_secondary_unregister_node_group(void *data)
|
||||
@@ -376,26 +385,28 @@ static void gpio_secondary_unregister_node_group(void *data)
|
||||
software_node_unregister_node_group(nodes);
|
||||
}
|
||||
|
||||
static int gpio_secondary_fwnode_init(struct device *parent)
|
||||
static int gpio_secondary_fwnode_init(struct device *parent,
|
||||
const struct software_node * const *node_group)
|
||||
{
|
||||
const struct software_node *const *swnode;
|
||||
struct fwnode_handle *fwnode;
|
||||
struct device *phys_dev;
|
||||
int ret;
|
||||
|
||||
if (!gpiochip_node_group)
|
||||
if (!node_group)
|
||||
return 0;
|
||||
|
||||
ret = software_node_register_node_group(gpiochip_node_group);
|
||||
ret = software_node_register_node_group(node_group);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = devm_add_action_or_reset(parent,
|
||||
gpio_secondary_unregister_node_group,
|
||||
gpiochip_node_group);
|
||||
(void *)node_group);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
for (swnode = gpiochip_node_group; *swnode; swnode++) {
|
||||
for (swnode = node_group; *swnode; swnode++) {
|
||||
struct device *dev __free(put_device) =
|
||||
acpi_bus_find_device_by_name((*swnode)->name);
|
||||
if (!dev)
|
||||
@@ -407,9 +418,15 @@ static int gpio_secondary_fwnode_init(struct device *parent)
|
||||
if (WARN_ON(!fwnode))
|
||||
return -ENOENT;
|
||||
|
||||
set_secondary_fwnode(dev, fwnode);
|
||||
phys_dev = acpi_get_first_physical_node(to_acpi_device(dev));
|
||||
if (!phys_dev)
|
||||
return dev_err_probe(parent, -ENODEV,
|
||||
"No physical device for ACPI GPIO dev: %pfwP\n",
|
||||
fwnode);
|
||||
|
||||
ret = devm_add_action_or_reset(parent, gpio_secondary_unset, dev);
|
||||
set_secondary_fwnode(phys_dev, fwnode);
|
||||
|
||||
ret = devm_add_action_or_reset(parent, gpio_secondary_unset, get_device(phys_dev));
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
@@ -452,6 +469,7 @@ static void x86_android_tablet_remove(struct platform_device *pdev)
|
||||
|
||||
static __init int x86_android_tablet_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct software_node * const *gpiochip_node_group;
|
||||
const struct x86_dev_info *dev_info;
|
||||
const struct dmi_system_id *id;
|
||||
int i, ret = 0;
|
||||
@@ -483,12 +501,20 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)
|
||||
break;
|
||||
}
|
||||
|
||||
ret = gpio_secondary_fwnode_init(&pdev->dev);
|
||||
ret = gpio_secondary_fwnode_init(&pdev->dev, gpiochip_node_group);
|
||||
if (ret) {
|
||||
x86_android_tablet_remove(pdev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (dev_info->has_crystalcove) {
|
||||
ret = gpio_secondary_fwnode_init(&pdev->dev, crystalcove_gpiochip_node_group);
|
||||
if (ret) {
|
||||
x86_android_tablet_remove(pdev);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = software_node_register_node_group(dev_info->swnode_group);
|
||||
if (ret) {
|
||||
x86_android_tablet_remove(pdev);
|
||||
|
||||
@@ -61,13 +61,6 @@ static struct lp855x_platform_data lenovo_lp8557_reg_only_pdata = {
|
||||
.initial_brightness = 128,
|
||||
};
|
||||
|
||||
static const struct software_node arizona_gpiochip_node = {
|
||||
.name = "arizona",
|
||||
};
|
||||
|
||||
static const struct software_node crystalcove_gpiochip_node = {
|
||||
.name = "gpio_crystalcove",
|
||||
};
|
||||
|
||||
/* Lenovo Yoga Book X90F / X90L's Android factory image has everything hardcoded */
|
||||
|
||||
@@ -416,15 +409,17 @@ static const struct platform_device_info lenovo_yoga_tab2_830_1050_pdevs[] __ini
|
||||
|
||||
#define LENOVO_YOGA_TAB2_830_1050_CODEC_NAME "spi-10WM5102:00"
|
||||
|
||||
static const struct software_node lenovo_yoga_tab2_830_1050_wm5102;
|
||||
|
||||
static const struct property_entry lenovo_yoga_tab2_830_1050_wm1502_props[] = {
|
||||
PROPERTY_ENTRY_GPIO("reset-gpios",
|
||||
&crystalcove_gpiochip_node, 3, GPIO_ACTIVE_HIGH),
|
||||
PROPERTY_ENTRY_GPIO("wlf,ldoena-gpios",
|
||||
&baytrail_gpiochip_nodes[1], 23, GPIO_ACTIVE_HIGH),
|
||||
PROPERTY_ENTRY_GPIO("wlf,spkvdd-ena-gpios",
|
||||
&arizona_gpiochip_node, 2, GPIO_ACTIVE_HIGH),
|
||||
&lenovo_yoga_tab2_830_1050_wm5102, 2, GPIO_ACTIVE_HIGH),
|
||||
PROPERTY_ENTRY_GPIO("wlf,micd-pol-gpios",
|
||||
&arizona_gpiochip_node, 4, GPIO_ACTIVE_LOW),
|
||||
&lenovo_yoga_tab2_830_1050_wm5102, 4, GPIO_ACTIVE_LOW),
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -432,14 +427,6 @@ static const struct software_node lenovo_yoga_tab2_830_1050_wm5102 = {
|
||||
.properties = lenovo_yoga_tab2_830_1050_wm1502_props,
|
||||
};
|
||||
|
||||
static const struct software_node *lenovo_yoga_tab2_830_1050_swnodes[] = {
|
||||
&crystalcove_gpiochip_node,
|
||||
&arizona_gpiochip_node,
|
||||
&lenovo_yoga_tab2_830_1050_wm5102,
|
||||
&generic_lipo_hv_4v35_battery_node,
|
||||
NULL
|
||||
};
|
||||
|
||||
static int __init lenovo_yoga_tab2_830_1050_init(struct device *dev);
|
||||
static void lenovo_yoga_tab2_830_1050_exit(void);
|
||||
|
||||
@@ -455,8 +442,9 @@ const struct x86_dev_info lenovo_yoga_tab2_830_1050_info __initconst = {
|
||||
.pdev_info = lenovo_yoga_tab2_830_1050_pdevs,
|
||||
.pdev_count = ARRAY_SIZE(lenovo_yoga_tab2_830_1050_pdevs),
|
||||
.gpio_button_swnodes = lenovo_yoga_tab2_830_1050_lid_swnodes,
|
||||
.swnode_group = lenovo_yoga_tab2_830_1050_swnodes,
|
||||
.swnode_group = generic_lipo_hv_4v35_battery_swnodes,
|
||||
.modules = lenovo_yoga_tab2_modules,
|
||||
.has_crystalcove = true,
|
||||
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
|
||||
.init = lenovo_yoga_tab2_830_1050_init,
|
||||
.exit = lenovo_yoga_tab2_830_1050_exit,
|
||||
@@ -800,8 +788,9 @@ const struct x86_dev_info lenovo_yoga_tab2_1380_info __initconst = {
|
||||
.pdev_info = lenovo_yoga_tab2_1380_pdevs,
|
||||
.pdev_count = ARRAY_SIZE(lenovo_yoga_tab2_1380_pdevs),
|
||||
.gpio_button_swnodes = lenovo_yoga_tab2_830_1050_lid_swnodes,
|
||||
.swnode_group = lenovo_yoga_tab2_830_1050_swnodes,
|
||||
.swnode_group = generic_lipo_hv_4v35_battery_swnodes,
|
||||
.modules = lenovo_yoga_tab2_modules,
|
||||
.has_crystalcove = true,
|
||||
.gpiochip_type = X86_GPIOCHIP_BAYTRAIL,
|
||||
.init = lenovo_yoga_tab2_1380_init,
|
||||
.exit = lenovo_yoga_tab2_830_1050_exit,
|
||||
@@ -985,13 +974,15 @@ static struct arizona_pdata lenovo_yt3_wm5102_pdata = {
|
||||
},
|
||||
};
|
||||
|
||||
static const struct software_node lenovo_yt3_wm5102;
|
||||
|
||||
static const struct property_entry lenovo_yt3_wm1502_props[] = {
|
||||
PROPERTY_ENTRY_GPIO("wlf,spkvdd-ena-gpios",
|
||||
&cherryview_gpiochip_nodes[0], 75, GPIO_ACTIVE_HIGH),
|
||||
PROPERTY_ENTRY_GPIO("wlf,ldoena-gpios",
|
||||
&cherryview_gpiochip_nodes[0], 81, GPIO_ACTIVE_HIGH),
|
||||
PROPERTY_ENTRY_GPIO("reset-gpios", &cherryview_gpiochip_nodes[0], 82, GPIO_ACTIVE_HIGH),
|
||||
PROPERTY_ENTRY_GPIO("wlf,micd-pol-gpios", &arizona_gpiochip_node, 2, GPIO_ACTIVE_HIGH),
|
||||
PROPERTY_ENTRY_GPIO("wlf,micd-pol-gpios", &lenovo_yt3_wm5102, 2, GPIO_ACTIVE_HIGH),
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -1000,11 +991,6 @@ static const struct software_node lenovo_yt3_wm5102 = {
|
||||
.name = "wm5102",
|
||||
};
|
||||
|
||||
static const struct software_node *lenovo_yt3_swnodes[] = {
|
||||
&arizona_gpiochip_node,
|
||||
&lenovo_yt3_wm5102,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const struct x86_spi_dev_info lenovo_yt3_spi_devs[] __initconst = {
|
||||
{
|
||||
@@ -1072,7 +1058,6 @@ const struct x86_dev_info lenovo_yt3_info __initconst = {
|
||||
.i2c_client_count = ARRAY_SIZE(lenovo_yt3_i2c_clients),
|
||||
.spi_dev_info = lenovo_yt3_spi_devs,
|
||||
.spi_dev_count = ARRAY_SIZE(lenovo_yt3_spi_devs),
|
||||
.swnode_group = lenovo_yt3_swnodes,
|
||||
.modules = lenovo_yt3_modules,
|
||||
.gpiochip_type = X86_GPIOCHIP_CHERRYVIEW,
|
||||
.init = lenovo_yt3_init,
|
||||
|
||||
@@ -96,6 +96,7 @@ struct x86_dev_info {
|
||||
int (*init)(struct device *dev);
|
||||
void (*exit)(void);
|
||||
bool use_pci;
|
||||
bool has_crystalcove;
|
||||
enum x86_gpiochip_type gpiochip_type;
|
||||
};
|
||||
|
||||
@@ -107,6 +108,7 @@ int x86_acpi_irq_helper_get(const struct x86_acpi_irq_data *data);
|
||||
/* Software nodes representing GPIO chips used by various tablets */
|
||||
extern const struct software_node baytrail_gpiochip_nodes[];
|
||||
extern const struct software_node cherryview_gpiochip_nodes[];
|
||||
extern const struct software_node crystalcove_gpiochip_node;
|
||||
|
||||
/*
|
||||
* Extern declarations of x86_dev_info structs so there can be a single
|
||||
|
||||
Reference in New Issue
Block a user