mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
ACPI: x86: Move acpi_quirk_skip_serdev_enumeration() out of CONFIG_X86_ANDROID_TABLETS
[ Upstream commit 7c86e17455 ]
Some recent(ish) Dell AIO devices have a backlight controller board
connected to an UART.
This UART has a DELL0501 HID with CID set to PNP0501 so that the UART is
still handled by 8250_pnp.c. Unfortunately there is no separate ACPI device
with an UartSerialBusV2() resource to model the backlight-controller.
The next patch in this series will use acpi_quirk_skip_serdev_enumeration()
to still create a serdev for this for a backlight driver to bind to
instead of creating a /dev/ttyS0.
This new acpi_quirk_skip_serdev_enumeration() use is not limited to Android
X86 tablets, so move it out of the ifdef CONFIG_X86_ANDROID_TABLETS block.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1feb6fcfba
commit
a217b6135d
@@ -429,7 +429,7 @@ bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_i2c_client_enumeration);
|
||||
|
||||
int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||
static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||
{
|
||||
struct acpi_device *adev = ACPI_COMPANION(controller_parent);
|
||||
const struct dmi_system_id *dmi_id;
|
||||
@@ -437,8 +437,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s
|
||||
u64 uid;
|
||||
int ret;
|
||||
|
||||
*skip = false;
|
||||
|
||||
ret = acpi_dev_uid_to_integer(adev, &uid);
|
||||
if (ret)
|
||||
return 0;
|
||||
@@ -464,7 +462,6 @@ int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *s
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration);
|
||||
|
||||
bool acpi_quirk_skip_gpio_event_handlers(void)
|
||||
{
|
||||
@@ -479,8 +476,21 @@ bool acpi_quirk_skip_gpio_event_handlers(void)
|
||||
return (quirks & ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_gpio_event_handlers);
|
||||
#else
|
||||
static int acpi_dmi_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||
{
|
||||
*skip = false;
|
||||
|
||||
return acpi_dmi_skip_serdev_enumeration(controller_parent, skip);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration);
|
||||
|
||||
/* Lists of PMIC ACPI HIDs with an (often better) native charger driver */
|
||||
static const struct {
|
||||
const char *hid;
|
||||
|
||||
@@ -652,6 +652,7 @@ bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *s
|
||||
bool acpi_quirk_skip_acpi_ac_and_battery(void);
|
||||
int acpi_install_cmos_rtc_space_handler(acpi_handle handle);
|
||||
void acpi_remove_cmos_rtc_space_handler(acpi_handle handle);
|
||||
int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip);
|
||||
#else
|
||||
static inline bool acpi_device_override_status(struct acpi_device *adev,
|
||||
unsigned long long *status)
|
||||
@@ -669,23 +670,22 @@ static inline int acpi_install_cmos_rtc_space_handler(acpi_handle handle)
|
||||
static inline void acpi_remove_cmos_rtc_space_handler(acpi_handle handle)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
|
||||
bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev);
|
||||
int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip);
|
||||
bool acpi_quirk_skip_gpio_event_handlers(void);
|
||||
#else
|
||||
static inline bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline int
|
||||
acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip)
|
||||
{
|
||||
*skip = false;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS)
|
||||
bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev);
|
||||
bool acpi_quirk_skip_gpio_event_handlers(void);
|
||||
#else
|
||||
static inline bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline bool acpi_quirk_skip_gpio_event_handlers(void)
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user