Skip to content

Commit f85196b

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes
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: e361d1f ("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>
1 parent 99ece71 commit f85196b

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

drivers/acpi/scan.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,6 +1710,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
17101710
{
17111711
struct list_head resource_list;
17121712
bool is_serial_bus_slave = false;
1713+
static const struct acpi_device_id ignore_serial_bus_ids[] = {
17131714
/*
17141715
* These devices have multiple I2cSerialBus resources and an i2c-client
17151716
* must be instantiated for each, each with its own i2c_device_id.
@@ -1718,11 +1719,18 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
17181719
* drivers/platform/x86/i2c-multi-instantiate.c driver, which knows
17191720
* which i2c_device_id to use for each resource.
17201721
*/
1721-
static const struct acpi_device_id i2c_multi_instantiate_ids[] = {
17221722
{"BSG1160", },
17231723
{"BSG2150", },
17241724
{"INT33FE", },
17251725
{"INT3515", },
1726+
/*
1727+
* HIDs of device with an UartSerialBusV2 resource for which userspace
1728+
* expects a regular tty cdev to be created (instead of the in kernel
1729+
* serdev) and which have a kernel driver which expects a platform_dev
1730+
* such as the rfkill-gpio driver.
1731+
*/
1732+
{"BCM4752", },
1733+
{"LNV4752", },
17261734
{}
17271735
};
17281736

@@ -1736,8 +1744,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
17361744
fwnode_property_present(&device->fwnode, "baud")))
17371745
return true;
17381746

1739-
/* Instantiate a pdev for the i2c-multi-instantiate drv to bind to */
1740-
if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids))
1747+
if (!acpi_match_device_ids(device, ignore_serial_bus_ids))
17411748
return false;
17421749

17431750
INIT_LIST_HEAD(&resource_list);

0 commit comments

Comments
 (0)