Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3707883pxb; Mon, 24 Jan 2022 15:58:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfr/uDR0U+SAw3r7Y2LEcP8auGRatoiGaQadxI9EQxdxlTt1hUhtOuAdxbzEi1xhixxoLn X-Received: by 2002:a17:90a:f406:: with SMTP id ch6mr707055pjb.180.1643068722487; Mon, 24 Jan 2022 15:58:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643068722; cv=none; d=google.com; s=arc-20160816; b=yVftmEN/lmeWyFcJKOGBe9DPUvdhZ3DMsyUionYYW13dNRg0CCuwdon5nmmAr6d5px 2rWeJK8ogbnvlYu5mWozmhePICcmfpr3AvMvFskOy0qdh5xAlW3/7RDncY3Ss4bbAJQy kM/i82O9B3j0hDjFn59GSW5ngRXlZ5DAihSFmOU1tCkeWyF1SxcmMcavcBIi8UOUzkC0 BFbDjBW/AzGLlRoIVBXXUuFhm11rSguOuHjG7iTFXiFiirh0DfNYTLeeNRfOucNPeAG6 qZmbXVSmx+Tl1k5tgPCmoXLq/YAWql2wJe670/JmPnvjid0j3ceXf8fIfUyWbGydUfCK 4VJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Y2KCKjeYQj2uFDfeHxYdRspcjU/zM0Q/qJNWOsjV/cg=; b=kc4/woWa85qFAGlHACkvBofkmyS6mZnbKTNl/d73XE3pXsSvohaWqMusEYNT+LCru3 PUQZp240idPiJEa7nkPjfk8KNvtUWsSvSM+vXihXSUmen3LDHcH996lLO7tfLS0pv0L8 ie7N4Ljmm0txkg4rmTeWqgYfSf2o7ofKcecEV2vRDuWlCZ1sUfv06HmVzDxnuv/v4OD1 tWEq7unceAl/vOn8SftnZpfPianevTCjIbz2fgmVutmhBgqsiImRgz23pVdLBvbqHhBS fKxNpMQr5K1BKib5Fvi64b/9C7rDAid13zpR/bPpDBAFhkneVI2tWPX+p5zGmpKgmR+A NsBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="gjXCB/wk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 207si15327238pga.681.2022.01.24.15.58.30; Mon, 24 Jan 2022 15:58:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="gjXCB/wk"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2366032AbiAXXwM (ORCPT + 99 others); Mon, 24 Jan 2022 18:52:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354678AbiAXW4K (ORCPT ); Mon, 24 Jan 2022 17:56:10 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEE0FC055AAB; Mon, 24 Jan 2022 13:11:14 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7346F6141C; Mon, 24 Jan 2022 21:11:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5024DC340E5; Mon, 24 Jan 2022 21:11:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058673; bh=MR0DDHmEUnRhfhkZtXdtcXdk3sQQ2ZdHmzsTEcDQPNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gjXCB/wkjjsm/soO9GkVM5v4pys5Ie/C50DMxeyUihlJ5WgFbQg5bRbh6Ck+aO1++ P8yFGFpN8YY688vH8YpzbSt1KDE4xkRaSgBFwAxtgwFcxsUUTTfknDlTgxZcS8netI OzabdorQcoyoL21PlXK326g3hRuTiYN2xKHRzAoY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.16 0364/1039] ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes Date: Mon, 24 Jan 2022 19:35:53 +0100 Message-Id: <20220124184137.521769259@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit f85196bdd5a50da74670250564740fc852b3c239 ] 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: e361d1f85855 ("ACPI / scan: Fix enumeration for special UART devices") Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/scan.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 2c80765670bc7..25d9f04f19959 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1695,6 +1695,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) { struct list_head resource_list; 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 * must be instantiated for each, each with its own i2c_device_id. @@ -1703,11 +1704,18 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) * drivers/platform/x86/i2c-multi-instantiate.c driver, which knows * which i2c_device_id to use for each resource. */ - static const struct acpi_device_id i2c_multi_instantiate_ids[] = { {"BSG1160", }, {"BSG2150", }, {"INT33FE", }, {"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", }, {} }; @@ -1721,8 +1729,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) fwnode_property_present(&device->fwnode, "baud"))) return true; - /* Instantiate a pdev for the i2c-multi-instantiate drv to bind to */ - if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids)) + if (!acpi_match_device_ids(device, ignore_serial_bus_ids)) return false; INIT_LIST_HEAD(&resource_list); -- 2.34.1