Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5080326rwe; Tue, 18 Apr 2023 01:35:10 -0700 (PDT) X-Google-Smtp-Source: AKy350Z1BeJvMV/CasVgW3UwY7Gr9hu+kqYeVuP5UCNnmgW7qvtwhX2Ojr5X8tYvdoF2kxHS0t2Q X-Received: by 2002:a17:90a:7022:b0:246:d1ae:5fce with SMTP id f31-20020a17090a702200b00246d1ae5fcemr1195016pjk.35.1681806910151; Tue, 18 Apr 2023 01:35:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681806910; cv=none; d=google.com; s=arc-20160816; b=zzfBKM/hyu5SwM0qqFVC5LmZBPk92K0Y2PmQiJ53r6i4gyc1OCPee7rj7NVw9XR8GS W4IubTQ5Y8MT97GSsnho+ALwVQbqiI3VP1xnsJ0Nl5YzCBZeSIC3CiVHTEibG85fLFBw gk0s3DtM8mkrVQdx4yo1MmQoFVg8OUo5d0EOc6C60bK/oLFM1+oZHzVqictc7jIDrGkY +X2UiJF35/UPCH4fP6hkabDq5y171TPLHAHDKiLfACUhEF3gBFEztJkZyNh4qby/4QIs dor65b5F85AjSmPE7v1qFPZM/5FgibC58C3iTkG/G/OJLpN/3N41zjTavcl9D9LJynGX mvRw== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=NER7E2tIy4C9f7YN78pLwyujIq9Yo6zWQEwmdMaeBDA=; b=gF0+vekYTCVdO0MW/bM0feXLxcOgkaRAKQGtiTNgrXiOtqcVyoY7X63BbjhrHXwnYc SoB0+MEScHK1U5HON1QIJXCdAMJjFHONorBqeNPSAvHJpscJjcHo2foBVN7DdxJ6mWeV ssuJ0UEKfV9IxiR/quVRzE0TSz7VZ3sv2NeCc8U7kyg1P+JYtMOE8mJKRrx8kKuYg8UG z6+VQlE7kV0zh8Ec+Yf+lE5rBmUasFqwx/hlDh9gPLmqAywTx1QA2u4loP8TN/O8iKXM b56yqhZZXd9vXLX+qzfItjx8W17LTBtqd3JsKawmo/zp6wWASbA0ppuUoMHTYAQJf0Qf +PLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=I6eVjHo4; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp10-20020a17090b4a8a00b002474c0c63ebsi1293730pjb.0.2023.04.18.01.34.58; Tue, 18 Apr 2023 01:35:10 -0700 (PDT) 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=@denx.de header.s=phobos-20191101 header.b=I6eVjHo4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230340AbjDRIbI (ORCPT + 99 others); Tue, 18 Apr 2023 04:31:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjDRIbG (ORCPT ); Tue, 18 Apr 2023 04:31:06 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93BE2E63; Tue, 18 Apr 2023 01:31:04 -0700 (PDT) Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 4D9B085AEC; Tue, 18 Apr 2023 10:31:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1681806662; bh=NER7E2tIy4C9f7YN78pLwyujIq9Yo6zWQEwmdMaeBDA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=I6eVjHo4vpZiCrxLUgi7n+p+dKPGuhcgJWLCstM5xs3PigsNjAhpryGV6rOLeEt4n VVLOe8qBaeKICa1SFxitaY7sk2YMlNtuy7CaqPxU91n7mbiORqgEeKZK4Fn+106ij6 v8d7iNSLu4Dqfxmn9BWc3BwN2aapyUYG1lJPqiARIVprDH/B4slbnUJzEmIBH7RD9h kPbmqAxWJYKnHukinQE8LyBhiYyM1X79Fk4/XVWVXdkI3lhQDMY8FV2Dn+DMfVmqXQ Lvno3k5PRx1NMcu9mkR8fCxMXeggCVc4lGIgF8wtmA91wBzvZ1CD7j9cykWIbTF6Zn KwRSsgDb0TxoQ== Message-ID: <56085a0f-02f7-6f45-f351-1f9ee612b748@denx.de> Date: Tue, 18 Apr 2023 10:30:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 3/6] drm: bridge: samsung-dsim: Fetch pll-clock-frequency automatically Content-Language: en-US To: Adam Ford Cc: dri-devel@lists.freedesktop.org, m.szyprowski@samsung.com, aford@beaconembedded.com, Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Inki Dae , Jagan Teki , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20230415104104.5537-1-aford173@gmail.com> <20230415104104.5537-3-aford173@gmail.com> <7eed74e8-9f67-a410-3cec-f61a6db85238@denx.de> From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On 4/18/23 04:29, Adam Ford wrote: > On Sun, Apr 16, 2023 at 5:08 PM Marek Vasut wrote: >> >> On 4/15/23 12:41, Adam Ford wrote: >>> Fetch the clock rate of "sclk_mipi" (or "pll_clk") instead of >>> having an entry in the device tree for samsung,pll-clock-frequency. >>> >>> Signed-off-by: Adam Ford >>> --- >>> drivers/gpu/drm/bridge/samsung-dsim.c | 12 ++++++------ >>> 1 file changed, 6 insertions(+), 6 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c >>> index 9fec32b44e05..73f0c3fbbdf5 100644 >>> --- a/drivers/gpu/drm/bridge/samsung-dsim.c >>> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c >>> @@ -1744,11 +1744,6 @@ static int samsung_dsim_parse_dt(struct samsung_dsim *dsi) >>> struct device_node *node = dev->of_node; >>> int ret; >>> >>> - ret = samsung_dsim_of_read_u32(node, "samsung,pll-clock-frequency", >>> - &dsi->pll_clk_rate); >>> - if (ret < 0) >>> - return ret; >>> - >>> ret = samsung_dsim_of_read_u32(node, "samsung,burst-clock-frequency", >>> &dsi->burst_clk_rate); >>> if (ret < 0) >> >> Does this break compatibility with old samsung DTs ? > > My goal here was to declutter the device tree stuff and fetch data > automatically if possible. What if I changed this to make them > optional? If they exist, we can use them, if they don't exist, we > could read the clock rate. Would that be acceptable? If you do not see any potential problem with ignoring the DT property altogether, that would be better of course, but I think you cannot do that with old DTs, so you should retain backward compatibility fallback, yes. What do you think ?