mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 05:27:07 +02:00
ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes
[ Upstream commitf85196bdd5] BCM4752 and LNV4752 ACPI nodes describe a Broadcom 4752 GPS module attached to an UART of the system. The GPS modules talk a custom protocol which only works with a closed- source Android gpsd daemon which knows this protocol. The ACPI nodes also describe GPIOs to turn the GPS on/off these are handled by the net/rfkill/rfkill-gpio.c code. This handling predates the addition of enumeration of ACPI instantiated serdevs to the kernel and was broken by that addition, because the ACPI scan code now no longer instantiates platform_device-s for these nodes. Rename the i2c_multi_instantiate_ids HID list to ignore_serial_bus_ids and add the BCM4752 and LNV4752 HIDs, so that rfkill-gpio gets a platform_device to bind to again; and so that a tty cdev for gpsd gets created for these. Fixes:e361d1f858("ACPI / scan: Fix enumeration for special UART devices") 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:
parent
595e1ec55b
commit
0f03132191
|
|
@ -1577,6 +1577,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
|
||||||
{
|
{
|
||||||
struct list_head resource_list;
|
struct list_head resource_list;
|
||||||
bool is_serial_bus_slave = false;
|
bool is_serial_bus_slave = false;
|
||||||
|
static const struct acpi_device_id ignore_serial_bus_ids[] = {
|
||||||
/*
|
/*
|
||||||
* These devices have multiple I2cSerialBus resources and an i2c-client
|
* These devices have multiple I2cSerialBus resources and an i2c-client
|
||||||
* must be instantiated for each, each with its own i2c_device_id.
|
* must be instantiated for each, each with its own i2c_device_id.
|
||||||
|
|
@ -1585,11 +1586,18 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
|
||||||
* drivers/platform/x86/i2c-multi-instantiate.c driver, which knows
|
* drivers/platform/x86/i2c-multi-instantiate.c driver, which knows
|
||||||
* which i2c_device_id to use for each resource.
|
* which i2c_device_id to use for each resource.
|
||||||
*/
|
*/
|
||||||
static const struct acpi_device_id i2c_multi_instantiate_ids[] = {
|
|
||||||
{"BSG1160", },
|
{"BSG1160", },
|
||||||
{"BSG2150", },
|
{"BSG2150", },
|
||||||
{"INT33FE", },
|
{"INT33FE", },
|
||||||
{"INT3515", },
|
{"INT3515", },
|
||||||
|
/*
|
||||||
|
* HIDs of device with an UartSerialBusV2 resource for which userspace
|
||||||
|
* expects a regular tty cdev to be created (instead of the in kernel
|
||||||
|
* serdev) and which have a kernel driver which expects a platform_dev
|
||||||
|
* such as the rfkill-gpio driver.
|
||||||
|
*/
|
||||||
|
{"BCM4752", },
|
||||||
|
{"LNV4752", },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1603,8 +1611,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
|
||||||
fwnode_property_present(&device->fwnode, "baud")))
|
fwnode_property_present(&device->fwnode, "baud")))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* Instantiate a pdev for the i2c-multi-instantiate drv to bind to */
|
if (!acpi_match_device_ids(device, ignore_serial_bus_ids))
|
||||||
if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids))
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
INIT_LIST_HEAD(&resource_list);
|
INIT_LIST_HEAD(&resource_list);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user