From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CC2DC433E6 for ; Fri, 12 Mar 2021 08:34:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1FCD264FD6 for ; Fri, 12 Mar 2021 08:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231823AbhCLIdm (ORCPT ); Fri, 12 Mar 2021 03:33:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232294AbhCLIdI (ORCPT ); Fri, 12 Mar 2021 03:33:08 -0500 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7275FC061574 for ; Fri, 12 Mar 2021 00:33:08 -0800 (PST) Received: by mail-wm1-x32c.google.com with SMTP id r15-20020a05600c35cfb029010e639ca09eso15262231wmq.1 for ; Fri, 12 Mar 2021 00:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vAtjNiJI1qKKGx5S42wVjbuS4/WPVdr+MZcPW8+RobY=; b=Yb2CA3Uvk4FTp1X0XSzcIlRiSLJrML0hKWk9vYGVtCigmOAot2S16a+V+92DSIDFFp XcRdIPhrmvpNIp/pgahzoTyhzqa4hNimV8VcSwDqJkU1Od+yqFHOO+Gi21w9n8heloqW 7EcgmLxQW8uPWfRWR2NxqagdA8jYYJBPh/pWt7iiRX7MkBski7DnArKy9oLWC4xq/DAl Z7eBgydDG9gy2be5Wa1PpV1aZdQcahl80HXuEQ1gB8IQ5EjeM76e4VrboFMJ5P9PuRS4 4HzGd/87j29OB9po8J/EKfcScdXcOPD59K6oNBWA2qiXgNo1l9sKLzEyR+9MwK+B4xih 3+2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vAtjNiJI1qKKGx5S42wVjbuS4/WPVdr+MZcPW8+RobY=; b=td0LjDJAAs1RNglzpUpLz9xabn0EOLyKu8MPkeSqdPnpSXACRjZJMuYqHrKntO7f06 0+ZGe+tAcldLTf399VFQwK2qIvkqKCUy8MjXmsBNN7b5iRuuKCR88iwHBRCOZ5qLx/b0 2WWO/08axkwdFlhq3ttCGZS5DZdvdtbcq8MW5kQyhc8oe7C/kCGQpJD0Nh3dy1aopysF tOxRDwWwKFyUJrNF1Y9NIoA6CvUsKEnmz5GCg4KVTsqcsjz1SQsfrngH3IEQWqRGcAiw KV604pi68apXU9d5YSVmKB1VxkYZCHF9phaIRo9dPeeOj09jw+awqjTslqZdDtSJBRLP 7nDg== X-Gm-Message-State: AOAM531pqx7sjF0NyPpYWezNOhkdsxsQnhdwMfBfjym6strba/1XGVVd 5PjQEqW0l2mW0nudF35wk64JuRh8Y1pIQqYbgTA= X-Google-Smtp-Source: ABdhPJyKZ0nMvRCdLUBbGOrKqHKyK3qzoA5pK9cwadvVMavLaFfap4/egdikXhfiZirr/3x+J4LMJaZTm4o697jfWd4= X-Received: by 2002:a05:600c:2109:: with SMTP id u9mr11906684wml.44.1615537987205; Fri, 12 Mar 2021 00:33:07 -0800 (PST) MIME-Version: 1.0 References: <20210309082328.38388-1-daniel.baluta@oss.nxp.com> <20210309153455.GB4878@sirena.org.uk> In-Reply-To: <20210309153455.GB4878@sirena.org.uk> From: Daniel Baluta Date: Fri, 12 Mar 2021 10:32:54 +0200 Message-ID: Subject: Re: [PATCH] ASoC: core: Don't set platform name when of_node is set To: Mark Brown Cc: Daniel Baluta , Linux-ALSA , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Linux Kernel Mailing List , dl-linux-imx , Ranjani Sridharan , Pierre-Louis Bossart , "S.j. Wang" , Daniel Baluta Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 9, 2021 at 5:38 PM Mark Brown wrote: > > On Tue, Mar 09, 2021 at 10:23:28AM +0200, Daniel Baluta wrote: > > From: Daniel Baluta > > > > Platform may be specified by either name or OF node but not > > both. > > > > For OF node platforms (e.g i.MX) we end up with both platform name > > and of_node set and sound card registration will fail with the error: > > > > asoc-simple-card sof-sound-wm8960: ASoC: Neither/both > > platform name/of_node are set for sai1-wm8960-hifi > > This doesn't actually say what the change does. Will send v2 with a better explanation. > > > - dai_link->platforms->name = component->name; > > + > > + if (!dai_link->platforms->of_node) > > + dai_link->platforms->name = component->name; > > Why would we prefer the node name over something explicitly configured? Not sure I follow your question. I think the difference stands in the way we treat OF vs non-OF platforms. With OF-platforms, dai_link->platforms->of_node is always set! So we no longer need to set dai->platforms->name. Actually setting both of_node and name will make sound card registration fail! In this is the case I'm trying to fix here.