Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3601207pxb; Mon, 24 Jan 2022 13:14:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpdB07ifrmTXWDT3NAZDP9sc04/GBO9flKgAgjF97J2URP8FmFiQKcij6Ngih/CukdWZ8c X-Received: by 2002:a17:90b:3e89:: with SMTP id rj9mr194784pjb.91.1643058888046; Mon, 24 Jan 2022 13:14:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643058888; cv=none; d=google.com; s=arc-20160816; b=ExoA9CbB190Z+cNqADx2dR/l+f1bXTIxe8RXdH0N22N5tQlsSi/SeiRWgHgAvo9/8u XLdehF/FwEgCLcGh27TfWRHyxXtPuFJH8Bt1vIS9XZhuW8t2UxMd4QLL1Mw4oAnVF/UN uNA8RBb3yPt1DQCIvQVt2vD9ptW6qpJmaSMXFJXIJATulTAA2CiLHU4jvbcPs2Ciolmk FnmGnclypRXvAqp6XT5ksYTQ1P18rb/tWDo4kO+pgQ7SZQYU7JaKvCRmn7yGmzyz3k9T bihA8+atlPnP9QWUye/OhWJ2MdnFpCW6siQIoi9/uDDBXf8Fv2LWVrRSRFnGjc93lCgn 5c5g== 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=sJbMTBic7H9k9SIM/eNT1wNiythU+RPxfUSH+Hw7YCA=; b=qTUzUxnJP+Fn1gAdn+PGx2oglP2QS2b/dM+rWox3wzcGPaCViBPGi0CMH1x9WsdOX3 c0ee2T6efjSO4TRmPQCy6AzK8IrU57hG/FP3AzBntlJDMXwe+TgGEhHY/NjFxGvzxl5y qf1aieTM7UwfgIf818r/645DyeZVA7VB0pJWvq2vGHriy6rpP+vD5TuaBhFOiKvuv2FV KlwB3JMgXkxzG6Pz6wi4tNSs3YUKBTCzVAOy9qEOxnUvMkBEGHBloP00cUUMa8gwbAAB shTZo+5iX1D3iw8GLgVho43M4SWrG6zkglHqTh5L6LPd97wSrn/Z7khP5j8yCQdHVRd4 yc/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=h5y5vxPz; 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 z3si12931714plg.406.2022.01.24.13.14.36; Mon, 24 Jan 2022 13:14:48 -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=h5y5vxPz; 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 S1351086AbiAXUnb (ORCPT + 99 others); Mon, 24 Jan 2022 15:43:31 -0500 Received: from dfw.source.kernel.org ([139.178.84.217]:50630 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381911AbiAXUYx (ORCPT ); Mon, 24 Jan 2022 15:24:53 -0500 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 AC0F26150E; Mon, 24 Jan 2022 20:24:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95CA3C340E7; Mon, 24 Jan 2022 20:24:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055892; bh=mcKndVCkrQs2y0FsFcaS2J9ZrpVOg2ArGukaawojnpw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h5y5vxPzYonYbOqfiP5bO49SA3snwxSKQVuuZUtritKVeb5mpkSCqo2zahFhJJ+ms FozWa+4MHINk1K9tL0VYbPEMOnJzvGdy4HYzoc6jlI/Z7X9UEl+QV89hOIQkYEat7Y Xt3eFDJq73FzvVTiMLZJtSdAMvI5Md+BT7RV32PY= 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.15 301/846] ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes Date: Mon, 24 Jan 2022 19:36:58 +0100 Message-Id: <20220124184111.291619529@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 5b54c80b9d32a..6e9cd41c5f9b1 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1690,6 +1690,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. @@ -1698,11 +1699,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", }, {} }; @@ -1716,8 +1724,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