From patchwork Thu Nov 24 11:07:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Binding X-Patchwork-Id: 2174 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3330449wrr; Thu, 24 Nov 2022 03:16:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf7my/m8iRH7qOcni5XsS5xssnogJvLbtVaTPxuv0UIHalPiKp18uo77zpoXtnvP92XyuDGi X-Received: by 2002:a05:6402:1f87:b0:468:7df:c38c with SMTP id c7-20020a0564021f8700b0046807dfc38cmr29341460edc.150.1669288605642; Thu, 24 Nov 2022 03:16:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669288605; cv=none; d=google.com; s=arc-20160816; b=E/b4KERLWTqZF9/DFrMRDH8JEjawE3PD17UXRM46yueTbVDhU3Arik9ovpkcOD5olp +jyqbNVkAGrmZC2LDUYbpb9TfcbIO+hHmhkxdaNutWyDOmWNeH1Obl2hrmOd+WJxxAPt gsMt+EVojCduX356cJ4VarIUA0m0cEbqhb/xDqMNfUlhxXAuqXjXSy36ftjHScgDcHLJ C9Wx1jO4WgILjW+2QaPycUOtaCyxADFrJfnhtgevHd0Xu/z0ketqgjCt8Gb9J5gKvsMk osbOpsLF415nvZ7FcVPXNrpbQ8BB+ap6oUMlZNHxMgc00Fmhd+BlPoN21Bnk2NpxcK0f b6Ig== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=HBrqoakNDPs3AB2EWn6R+jG1ozJq4nshKcy70uojhuc=; b=xfzyrPox1WIkSeUSNQqbbMH+WL74+ncVAix72jAWb4OM6GM/FkA+Nq/PkP2lo90eBr 4TpsdF+aXuRxuUTylF8NqK0CX5rwQZbSuYXbeFqPB9KZ9VsCy2WaA0yAMyOWdlfgKqID SQFf5Ko5Zp4fQPnwCBVQQwx7zKcstJouIiwVLtU5dPiQQn+PZFH12DZONb4dW5FCHPUF 09Zs/W+hds2Rck93rf95pKkaR+EpM1uWs7yfAJ0Hoarw+LP7EIP3t3+vkx44VeIipSqI ajvTSvWaShSs/t1/c0HzlbLKpl8t6B0d/9Tij0zHFj3Zp18WumJnIaSkVRD5aWcEPrKh ZwNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=bgeqD+L5; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020a056402165200b00468cd0b1cafsi119831edx.163.2022.11.24.03.16.18; Thu, 24 Nov 2022 03:16:45 -0800 (PST) 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=@cirrus.com header.s=PODMain02222019 header.b=bgeqD+L5; 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=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbiKXLIY (ORCPT + 99 others); Thu, 24 Nov 2022 06:08:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229883AbiKXLIU (ORCPT ); Thu, 24 Nov 2022 06:08:20 -0500 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77BCD5FB86; Thu, 24 Nov 2022 03:08:18 -0800 (PST) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AO7sBmh004512; Thu, 24 Nov 2022 05:07:24 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=HBrqoakNDPs3AB2EWn6R+jG1ozJq4nshKcy70uojhuc=; b=bgeqD+L5GhyLZ8VKJyOE6bD3tqBBKAVh64rH+jw3MukhmXnWpZVccafR6ACs4Bc1Mc66 9hStJsdtgI7jjyaTgt8WgMH2j7uZOJf54hJozmIFN2girYSecLBZUOWmQqlL41nVpRVV qdEAe37+TR9/gQpfaTPV2xQvcU9X8xDLUagbrwAMl4MQR6J/616kMc0Hsydp+4p70526 z67MfQnV/eHV5tLwtCVZlN2heJ/2AI5n9xgVFJ1aEUE2JFTz+e3yiLOytNbHJo0BVqBW qiL4VTsNOvw9H0Jr/vnEzUluJRCanaOsQshSV+YeDCaVS5BFU4LdNFKaNfym3TNpkuxp Hg== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3kxwe6x2dt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Nov 2022 05:07:24 -0600 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.20; Thu, 24 Nov 2022 05:07:22 -0600 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.20 via Frontend Transport; Thu, 24 Nov 2022 05:07:22 -0600 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (unknown [198.90.202.160]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 496182BA; Thu, 24 Nov 2022 11:07:22 +0000 (UTC) From: Stefan Binding To: Andy Shevchenko , Dmitry Torokhov , "Rafael J . Wysocki" , Hans de Goede , Mark Gross , Jaroslav Kysela , Takashi Iwai CC: , , , , Stefan Binding Subject: [PATCH v1 0/2] Use ACPI_COMPANION macro to obtain acpi_device in cs35l41_hda Date: Thu, 24 Nov 2022 11:07:16 +0000 Message-ID: <20221124110718.3925934-1-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: icymHGFSQCP9vNta4tdh6ta5bAP9P2DX X-Proofpoint-GUID: icymHGFSQCP9vNta4tdh6ta5bAP9P2DX X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750375968481791868?= X-GMAIL-MSGID: =?utf-8?q?1750375968481791868?= Currently, in cs35l41_hda driver, we use acpi_dev_get_first_match_dev to obtain the acpi_device used to obtain the properties and gpios. It is better to use the ACPI_COMPANION macro to do this, since it guarentees that we get the correct acpi_device for the device. However, the cs35l41_hda driver uses the serial-multi-instantiate driver to enumerate, and whilst the ACPI_CONPANION macro works with spi, it does not work with i2c. This is fixed by setting the fwnode for i2c. Stefan Binding (2): platform/x86: serial-multi-instantiate: Set fwnode for i2c ALSA: hda: cs35l41: Use ACPI_COMPANION to read acpi properties .../platform/x86/serial-multi-instantiate.c | 1 + sound/pci/hda/cs35l41_hda.c | 50 ++++++++----------- 2 files changed, 22 insertions(+), 29 deletions(-)