Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3592723pxb; Mon, 24 Jan 2022 13:03:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpr1xxG6asrz18W2WnUnssagL+QB2CJjqE9aRqJKmBqqtDik3t2fEdM4uA1+/ZzV8eDKsr X-Received: by 2002:a63:4557:: with SMTP id u23mr11901427pgk.134.1643058194929; Mon, 24 Jan 2022 13:03:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643058194; cv=none; d=google.com; s=arc-20160816; b=Tn61jAyH2dTkv7gyNaitIWzXVnFwiVht4rGN8cnD5WVsulrbWRDqtEo659BUQPAw8H U34KrWdfP2c2RaC1oyzQzmbtzbnZjfFkl7w1hhUAAs4p7i69DKhodjTvTpqoX+YYS3ux Hg5LJ8be3/A7rfE50RMdBzLHNBtPKnS1Tf+PJA7r0QG0j97rLbsYjnuuq3Mng+o3TcqZ Ul5r/cRQmNi1H+/Kyz5jBFP2bR6HTn53Cmzrz3bvyhlwEk0NC4CrA280KhY2COKkxXBF ItmpGgEaSnAkkJh0brVR7o193ZBe+ZWtBbQC2cDD/Tdxo9/Ci1hoYATyOQnfHdlLZSBV Yr+g== 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=t2wVFCRrsxY7ugZifOjEEW/AmEcPXkPqvOXsWTNs3p0=; b=I6YCuARgkHJD2rg+ID6p+zB/YkJfNjt19pOqOPZsDhlGvwo8BXQAdzmezWbJXcWQS4 TjsL0Ce6VeucmTTjSqAziL6TuTwLR8LMKagYvYtPFEs7pam4TIO7PMtFJbyfaO1vmoFC 4UAWjEm1G7nCIgdLbMNB4bhLccVqhEtppc/ouoZmSzYhbq6O/6iOMPGMvolE69FuObmT bOOCHcQf7n4nmUfZ7rn3H8OrOSkatxff+jEnXwS/iRGv8d4TemzsgTCYh41G/lhxUzWP 3KuViiXQsj8pnNnL+tVK0Dh86SGYjzjx4Tp94P0pBFyucHogIS/SCQli3s2g98a2KSTK WXCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=s5zg3uTB; 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 x6si828207pgi.236.2022.01.24.13.03.01; Mon, 24 Jan 2022 13:03:14 -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=s5zg3uTB; 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 S1382141AbiAXUZP (ORCPT + 99 others); Mon, 24 Jan 2022 15:25:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377246AbiAXUFL (ORCPT ); Mon, 24 Jan 2022 15:05:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DA4BC08E81D; Mon, 24 Jan 2022 11:30:58 -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 ams.source.kernel.org (Postfix) with ESMTPS id D8F63B810BD; Mon, 24 Jan 2022 19:30:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2398C340E5; Mon, 24 Jan 2022 19:30:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052655; bh=5zh1rubP8abvPORWa1hoNnaR/LUIf5kg/5MAFni13VQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s5zg3uTBrXJ7MEAvB8caQ1TKK2ZeqKpfz3CY7ZfwmZmGFBlPLr+kPJSntLlkT3v2q aY0OC2zIi+xOKcK8YwOaVNpFbx/EAKC+qjwIin4IFWKKWRoSLedLzT8qpTA8yQqMvj vhz6IZBJM9ju2qaIHg4d/rH7DollekxnQ/dp942g= 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.4 098/320] ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes Date: Mon, 24 Jan 2022 19:41:22 +0100 Message-Id: <20220124183957.057409767@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@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 95d119ff76b65..5d4be80ee6cb4 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1577,6 +1577,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. @@ -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 * 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", }, {} }; @@ -1603,8 +1611,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