Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp4488008rwb; Tue, 6 Sep 2022 08:11:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR448eOS/+LMcwg7+xARG/J1uV/W8lN0nylVJjKaqUTNtusZD59D+5xnPY2r+7ywMlm2ZXS2 X-Received: by 2002:a17:907:7b9f:b0:741:9ae3:89a6 with SMTP id ne31-20020a1709077b9f00b007419ae389a6mr28190675ejc.311.1662477105162; Tue, 06 Sep 2022 08:11:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662477105; cv=none; d=google.com; s=arc-20160816; b=PdsmFfRY09W0XnEXvIiO+orAbEqgOcJMV6JiGSRRIDz15hZPXxu9yo7i5W4OMIw0I4 H3UkPud3y5kEuYnhA6iozve6lxRW5UiINZZvE7SpJ7x755usKOfcajxTsIbRlWJ0mmYD 26uWFya6dNYIhvkVuPiOJ0ZN3tfPxalRvmJiOaJPSbvfzXQV5AJlUZUSY8dXQemQnSIq R29KqDRHR0Ccy5VjVVsqvzVZfyjHXAbhKIKSTCgUQKLuyxkD2/dTRPMvgYDuWTP+OJ7R zlk9fBZjoczHdX4Wd+LgCCd293piLSfp2zcJQ4pDqpqV39Qqt9156r/VbkpfBd52CVpM 7TMQ== 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=CR6gIyItz6KYgPtAwv3/h+CG9ReB2PN2cvvM/NQIHOM=; b=vTEs5j8+zhU33P81QBVU/F+wdjYvnrIUGRLP4mPU3Atluqjlvetm7SPrm0SuhFvgVM CI/pQoq2g+pQT52Wi1bW+TMuUekZn7PJdoUJfKvJLefbX2+T3IDjiWtGyXkXp5fet518 PKIXNRPZro2BtVmpwR29UMDmrrpRgCzMlWL+2GLedqHCkJZ3E0mcZhhwiuwA531kGXE+ MY3AaDXJcl950oeY578FizvrsLZAntf52x/RKVdxTEZ/X6v0sr6l84BoZbsFvOSMP8rD otX+ZzcKPNFkG2GpDdlSyyX29yq5QP/ML3V8/IPU0fOz09hS8/PYSlyikxdMoMyITpvI x6Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OPs6mi0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cr11-20020a170906d54b00b007308fcad6d2si9727230ejc.358.2022.09.06.08.11.20; Tue, 06 Sep 2022 08:11:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OPs6mi0U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S242081AbiIFO1D (ORCPT + 99 others); Tue, 6 Sep 2022 10:27:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234019AbiIFO0J (ORCPT ); Tue, 6 Sep 2022 10:26:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23B457C52A; Tue, 6 Sep 2022 06:54:10 -0700 (PDT) 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 A908A61542; Tue, 6 Sep 2022 13:47:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5B3AC433C1; Tue, 6 Sep 2022 13:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662472025; bh=OGYL5m/s4earafWbUNY1pAZATl3Yplrok4xWWgfBfyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OPs6mi0UVgKHbMtSYTcvX9l+gTycuN2TVMf7XFN4orcidapUTUXzOK0t97jezDS5w h2dxa+/FqQ/Ni19l4GuNfzLDjDGnZLn/tiRD15Wh7oA2IjUHsPxwkGLUIcOFLVf9sK YzWPxNOdYW65AxmamztaTC7vNJ5OJQtxbQ5KXkpU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Utkarsh Patel , Heikki Krogerus Subject: [PATCH 5.19 121/155] usb: typec: intel_pmc_mux: Add new ACPI ID for Meteor Lake IOM device Date: Tue, 6 Sep 2022 15:31:09 +0200 Message-Id: <20220906132834.562680568@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220906132829.417117002@linuxfoundation.org> References: <20220906132829.417117002@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Utkarsh Patel commit 1b1b672cc1d4fb3065dac79efb8901bd6244ef69 upstream. This adds the necessary ACPI ID for Intel Meteor Lake IOM devices. The callback function is_memory() is modified so that it also checks if the resource descriptor passed to it is a memory type "Address Space Resource Descriptor". On Intel Meteor Lake the ACPI memory resource is not described using the "32-bit Memory Range Descriptor" because the memory is outside of the 32-bit address space. The memory resource is described using the "Address Space Resource Descriptor" instead. Intel Meteor Lake is the first platform to describe the memory resource for this device with Address Space Resource Descriptor, but it most likely will not be the last. Therefore the change to the is_memory() callback function is made generic. Signed-off-by: Utkarsh Patel Cc: stable@vger.kernel.org [ heikki: Rewrote the commit message. ] Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20220816101629.69054-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/mux/intel_pmc_mux.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/drivers/usb/typec/mux/intel_pmc_mux.c +++ b/drivers/usb/typec/mux/intel_pmc_mux.c @@ -571,9 +571,11 @@ err_unregister_switch: static int is_memory(struct acpi_resource *res, void *data) { - struct resource r; + struct resource_win win = {}; + struct resource *r = &win.res; - return !acpi_dev_resource_memory(res, &r); + return !(acpi_dev_resource_memory(res, r) || + acpi_dev_resource_address_space(res, &win)); } /* IOM ACPI IDs and IOM_PORT_STATUS_OFFSET */ @@ -583,6 +585,9 @@ static const struct acpi_device_id iom_a /* AlderLake */ { "INTC1079", 0x160, }, + + /* Meteor Lake */ + { "INTC107A", 0x160, }, {} };