Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1259503rdh; Fri, 27 Oct 2023 08:57:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwx16cy7wiCfzW78cSbJnGoBKrGyWTuZQWYAVeIggDuTkVe1pWXXd9CaT4TYOfEClOQEEn X-Received: by 2002:a81:b247:0:b0:5a7:ec51:9218 with SMTP id q68-20020a81b247000000b005a7ec519218mr2626333ywh.25.1698422272770; Fri, 27 Oct 2023 08:57:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698422272; cv=none; d=google.com; s=arc-20160816; b=q/SMuSYBwQ8uDKzLPHRWIAoB4CcVO8rtOzigyZmw57zUhPi9t6xeOhJ0w27biZ4FkH pTtJnbk2dl/jUm5rEm6YfuIwuXI8hs96xnuKIy6X3zeYhNdQ/u65whJ42zfX5SNDn+MP dR/hr151/GjvLhZ01uk/Td9FD67V7287C/KJXHDlCc7easdeLJilQLk8gFWWNd6QYWuK R2Ss7QpW3+JxNZP6jO8V9FVGT5xSJuia0owKjwYOFfRoHjAZENAesBW8k/maVtaz3mgl lCuKJqiK0SuLGlycRdvF17yKikSfcNSD0RisYJaGpTohy54Qb5zlg8rJqlVDpjTiDtbn j1FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=JON0Ip3sunwC2SKo+Thn3dVPis/DzFWBh+BmMZoWDRg=; fh=3rR+aocOTDJxZmRM9/Ul6auF1cIn7H6zPEt7YUW7mag=; b=T7LvkOj8Y3IdG1RenlP/23ReHEU+nDRKlZ72Nuk6+3VsmwPK6Hb7vKYXCZji4ZK8CI K4sGfu15BqYU2Xv+U/NSLDXEk0+5fP5zv+N/xvA6goSZQUn21KF0771f3dCY7gbBhWcO eHO6MNq05NXQtkuQVUg+8whtuuolWdmfzT4yuE6Ag1EYM+McxsZaAYpTlHO9Tr+Wtsun fqW8XbxTFHHkiXq4wBfoN/NjtNBmLtjE+8GnixAHSA+7+8vW6PY5nR9qb0rWjPmPrYiU lpoPIZ+9dltlS3iQ52/evZHuxR6pWR1vRhyDn5pcojih2H8p65cYjyBB91/Rw4BB0Ufj IkjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gFHt6fdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id m5-20020a81d245000000b005a92da33e5asi3248524ywl.281.2023.10.27.08.57.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 08:57:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gFHt6fdO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 4D1E3802B0C5; Fri, 27 Oct 2023 08:57:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346331AbjJ0P5i (ORCPT + 99 others); Fri, 27 Oct 2023 11:57:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346224AbjJ0P5f (ORCPT ); Fri, 27 Oct 2023 11:57:35 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C30E0CE for ; Fri, 27 Oct 2023 08:57:33 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3F7DC433C7; Fri, 27 Oct 2023 15:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698422253; bh=5aHvOf/tPDGqmnSNEmdIU3zX9wqQNMOGtumjnNW/4ho=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=gFHt6fdOWWMG2TsxZ3ZP6RfUP+obHXohj5L35F+DACm6plNeJUbrW5WWhtr2vcWb/ Bo81e6lCaBK64uOYIDNNqPRZJ8vSiNrOmKuneRymRqYg6kZID32g5qRdiwj1r2jNit RlJkYSHIGfc+4kHqbCJXBQ24B8A4I9WImOgIoObpEEGeBe3hP8G8sUNB8tSTQ7/9HG 7w4XIhIQLa2RwQDGKApwMng72Q6ufhRzAiX5t8EBEt6NaAE+4bbTdgu3d0c1SCDvy4 2enM6cMM/iaRjS5L5NS4TKB7Zb+A94kOxukyvLIrdSqLJwQf4lWTMFxypxk9dY7GpT ehIqH3WGbHGcw== Message-ID: Date: Fri, 27 Oct 2023 17:57:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 09/13] ASoC: amd: acp: add machine driver support for pdm use case Content-Language: en-US To: Mario Limonciello , Syed Saba Kareem , broonie@kernel.org, alsa-devel@alsa-project.org Cc: Vijendar.Mukunda@amd.com, Basavaraj.Hiregoudar@amd.com, Sunil-kumar.Dommati@amd.com, venkataprasad.potturu@amd.com, arungopal.kondaveeti@amd.com, mastan.katragadda@amd.com, juan.martinez@amd.com, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Marian Postevca , Alper Nebi Yasak , Claudiu Beznea , Gaosheng Cui , Jarkko Nikula , open list References: <20231021145110.478744-1-Syed.SabaKareem@amd.com> <20231021145110.478744-9-Syed.SabaKareem@amd.com> <4d5a4c67-2f4b-4111-b98b-ef575543fa6e@kernel.org> <3ec97548-1f91-49d0-adfb-4f8051ca9a97@amd.com> From: Krzysztof Kozlowski Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJgPO8PBQkU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cZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 27 Oct 2023 08:57:46 -0700 (PDT) On 27/10/2023 17:54, Mario Limonciello wrote: > On 10/27/2023 10:51, Krzysztof Kozlowski wrote: >> On 27/10/2023 17:28, Mario Limonciello wrote: >>> On 10/27/2023 03:49, Krzysztof Kozlowski wrote: >>>> On 21/10/2023 16:50, Syed Saba Kareem wrote: >>>>> add pdm use case machine driver support >>>>> >>>>> Signed-off-by: Syed Saba Kareem >>>>> --- >>>> >>>> >>>>> dmi_id = dmi_first_match(acp_quirk_table); >>>>> if (dmi_id && dmi_id->driver_data) >>>>> @@ -214,6 +221,10 @@ static const struct platform_device_id board_ids[] = { >>>>> .name = "rmb-rt5682s-rt1019", >>>>> .driver_data = (kernel_ulong_t)&rt5682s_rt1019_rmb_data, >>>>> }, >>>>> + { >>>>> + .name = "acp-pdm-mach", >>>>> + .driver_data = (kernel_ulong_t)&acp_dmic_data, >>>>> + }, >>>>> { } >>>>> }; >>>>> static struct platform_driver acp_asoc_audio = { >>>>> @@ -235,4 +246,5 @@ MODULE_ALIAS("platform:acp3xalc5682s1019"); >>>>> MODULE_ALIAS("platform:acp3x-es83xx"); >>>>> MODULE_ALIAS("platform:rmb-nau8825-max"); >>>>> MODULE_ALIAS("platform:rmb-rt5682s-rt1019"); >>>>> +MODULE_ALIAS("platform:acp-pdm-mach"); >>>> >>>> Please stop growing the aliases. Module alias is not a substitute for >>>> missing MODULE_DEVICE_TABLE. >>>> >>>> Best regards, >>>> Krzysztof >>>> >>> >>> I thought the way that this works is that top level ACP driver (IE >>> acp-pci.c) will have MODULE_DEVICE_TABLE. This is how that module gets >>> loaded. >>> >>> Then it creates platform devices based on the detected needs for the >>> situation and the creation of those platform devices triggers a uevent >>> which due to MODULE_ALIAS will get appropriate other platform drivers >>> like this one loaded. >> >> And why you cannot use MODULE_DEVICE_TABLE here? IOW, why do you need to >> manually duplicate entire table and re-invent MODULE_DEVICE_TABLE with >> MODULE_ALIAS? > > What would actually go into MODULE_DEVICE_TABLE? The table you have few lines above aliases. > > The platform devices created are contingent upon what was found during > the top level ACP driver probe. You don't want all the "child" platform > drivers to load unless they're needed. How static alias differs here from static device ID table? Both are built into the module and always there. I don't even understand what does it mean by "loading child platform drivers". Why would unneeded driver be loaded? Best regards, Krzysztof