Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3215522ybt; Mon, 29 Jun 2020 19:09:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/qxb/VLCGmazqo6w7bPJok2QwHIv8eF+RUCAlQqlwzAlkx41rhjotMHS/l0m9yCRLXkyc X-Received: by 2002:a50:8465:: with SMTP id 92mr20056816edp.388.1593482966403; Mon, 29 Jun 2020 19:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593482966; cv=none; d=google.com; s=arc-20160816; b=SWcDYQolxNtQy6PdYl5FWQwG2+9VPnYSsvAheLV2LvFJbwwQoy9umGtBdqgiJ8GF2B SzFRqpzQijII78Tusy4iwKtGUkSdHfylgu+jVccOYzQzutZMOwLOYrm/rOKp7OIhNcIf zS/7MQH3d11yKruM7xyVp8CT9MDbY/XKGn6qFz+ZQ3RkKzRPl8r0V0J0p3Ycd1RgImrB jpuwuGUmFgSI8V9zxNWDf3KBg4kPPvAKi0S/KshkKLKQET4aG0Mdasbqt/XMLGu1cUNf cwWkQmJ2Wqq3JNZEIE8zHNeAwnInQkioaNCVmDliVCDYfhN1ZRLMHdhsUEOsfXYKLxOe DgcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date; bh=wudCW8R5UVz2esuLj9QCEmf+1Dzh1xZ4ekrGSqzu2kg=; b=KvyaW/yZ6MJqNjCudyXb2I/gxfqqZ7GyJnK3DO5JnLZpNf6XLfMDfpIgmZO4Bj82Hy WlU0OSQHaY/QsuAMOXRhM5uvZ85Ki3ECAJ+3J6ERPTfIylnMT1KRAeueqm0lceXOy9Hx qTCA7aM+XyTULE1ZPC/lN11ASeMiAPIBLljsv+Ou7P6ixzO4X4xDkCJwOK1k9cQduofa 1eit8UFv4ZuX5jg9zEdX11thvI3fOlb6imepFvu3xZGpigLpWcEImkxbfKtJRjmw6mwf ubSmS8UN3m0vw3K0pWWl7sJBulBDl/i9UBoK7odGXn00DfKAdTn+5Ri7GD6C4IkWsTKs ay/Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo14si789902edb.112.2020.06.29.19.09.02; Mon, 29 Jun 2020 19:09:26 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727997AbgF3CIf (ORCPT + 99 others); Mon, 29 Jun 2020 22:08:35 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:12662 "EHLO relmlie6.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726227AbgF3CIe (ORCPT ); Mon, 29 Jun 2020 22:08:34 -0400 Date: 30 Jun 2020 11:08:33 +0900 X-IronPort-AV: E=Sophos;i="5.75,296,1589209200"; d="scan'208";a="50683838" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie6.idc.renesas.com with ESMTP; 30 Jun 2020 11:08:33 +0900 Received: from mercury.renesas.com (unknown [10.166.252.133]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id CF456400493A; Tue, 30 Jun 2020 11:08:33 +0900 (JST) Message-ID: <87lfk5z4ov.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Sameer Pujar Cc: , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v4 11/23] ASoC: simple-card: Loop over all children for 'mclk-fs' In-Reply-To: <58000bd3-861c-bbc2-75e1-128cf0199a76@nvidia.com> References: <1593233625-14961-1-git-send-email-spujar@nvidia.com> <1593233625-14961-12-git-send-email-spujar@nvidia.com> <875zba1y28.wl-kuninori.morimoto.gx@renesas.com> <58000bd3-861c-bbc2-75e1-128cf0199a76@nvidia.com> User-Agent: Wanderlust/2.15.9 Emacs/26.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sameer > >> snprintf(prop, sizeof(prop), "%smclk-fs", prefix); > >> of_property_read_u32(node, prop, &props->mclk_fs); > >> of_property_read_u32(cpu, prop, &props->mclk_fs); > >> - of_property_read_u32(codec, prop, &props->mclk_fs); > >> + > >> + if (cpu != codec) > >> + of_property_read_u32(codec, prop, &props->mclk_fs); > > Maybe we want to have "cpu" in simple_dai_link_of_dpcm() side > > without using magical code in simple_parse_mclk_fs() side ? > > Are you suggesting if we should simplify simple_parse_mclk_fs() by > either passing 'cpu' or 'codec'? Oops, sorry I was misunderstand. But I still not 100% understand what do you want to do here. Maybe 50% is my English skill, but in your code (C) of_property_read_u32(cpu, prop, &props->mclk_fs); - of_property_read_u32(codec, prop, &props->mclk_fs); + + if (cpu != codec) (B) + of_property_read_u32(codec, prop, &props->mclk_fs); and - simple_parse_mclk_fs(top, np, codec, dai_props, prefix); (A) + simple_parse_mclk_fs(top, np, np, dai_props, prefix); Because of (A), cpu = codec = np in simple_parse_mclk_fs(). Do we have chance to call (B) ? And it still have read_u32(cpu, ...) at (C), this means all np will read mclk_fs anyway ? For me, if you don't want/need mclk_fs, don't set it on DT is the best answer, but am I misunderstanding ? Thank you for your help !! Best regards --- Kuninori Morimoto