Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1064310pxf; Fri, 12 Mar 2021 00:35:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNRlKvu9tq2dfF7ZOsTnZn6XMUoXpAWC1aVLZ81OmbTVUACsoo6S07lN93l8SdEAlaVmLi X-Received: by 2002:a17:906:1e4f:: with SMTP id i15mr7165386ejj.349.1615538125446; Fri, 12 Mar 2021 00:35:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615538125; cv=none; d=google.com; s=arc-20160816; b=V/cNxFWg9pS/kwHnphCNmiqaGAsk73RUBkVXXhLw1rwmKXh22X85Va+qr029mFI961 Tx0iUiyeXTSNmq8xKgjDWIQHt9dHO1f++/UQVSkyPG9WGTj/ASoO47G3U46BV/pf7pma XTAbZPNpmy7zGknTHVD/U5Q4WUa+mdD/JHuu2/xBRjLZkrmuFbx3g9jB8rFXlBy1rPbd Ky3HmzuuLwFAvHL7uXUkX1q1iVCmOZAoDERSdAe9Dp+qKD5yi+kFOHV7RMYctI28VSo/ OVvDlb42VpRnlAEMrKv1T87jP6GIAUhlekPuoNUM5A+85e1dOnfBEDS+KPHmD+uEycbb /4NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vAtjNiJI1qKKGx5S42wVjbuS4/WPVdr+MZcPW8+RobY=; b=KnCaTP6IK/aJ9OUSv2GWRpvO5yccSpX0zPQ4/PU1f8WcrTnnQQWKZQzoc2+tJka+y1 ofdoE4axmZUHiXRN89D5FAOItQlpTLgf1BUYhxEvEkCgiCyk1cTPPaMrNOwW+ia2oitL E/92rSN8o/58UMIya3hgqQ61PuHLGooGQXk42sJRho8mkLlBe7KElowzbvlZtFY9PlTL +CA4WK2sDTpVRFwFdKN/RkxZjcVuTA5HHyoxTwfOYy4MuDjq2r2MLTWGQ8jGfMD+JgX1 zis0m6PwIfnKfPS4duQYezrRRrabFpbhIzOKwzQCRVo+sYvQj8LQyaP3XV7TnVAGt8vS dxag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Yb2CA3Uv; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k24si3868900eja.161.2021.03.12.00.35.02; Fri, 12 Mar 2021 00:35:25 -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=@gmail.com header.s=20161025 header.b=Yb2CA3Uv; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232289AbhCLIdl (ORCPT + 99 others); Fri, 12 Mar 2021 03:33:41 -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-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.