Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4801638rwe; Mon, 17 Apr 2023 19:45:10 -0700 (PDT) X-Google-Smtp-Source: AKy350Y3i3Fw5JihwPIqnt9Qjo2mf4+64Fh54jhdTekcl93ky3kGA1LmS2ebYfdD/UeNcUMmzJFn X-Received: by 2002:a05:6a20:cf5a:b0:d7:3b62:3cf with SMTP id hz26-20020a056a20cf5a00b000d73b6203cfmr13647920pzb.54.1681785910049; Mon, 17 Apr 2023 19:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681785910; cv=none; d=google.com; s=arc-20160816; b=U/d2IxOZpSxURmUZTpJX5twhvgj16llRV4OJJrI13ckPGTwNlhUo/J+0H7gdtg7IQq 1OR7CVbFZUQBHhkkX1zc7iyxGD1nMFwo7r636QKLNlAOomOMyi+zbnkyaBaex4DpvovQ bSW8Y6YECXZmc7FmcpWLShjUP4cOvDZKUtcUefMqW7eyX8H+LJgDXPP8I8SgyE84mnaz nK3gUP4si9TZDKgs5IM7Mx7cQnVeRRuHxkeqVUUflmUeBJe5s1J/hpLe/18h4NJ8W7H1 OcMT2Mt67Fm9pPtzYt97KyRpl8PoI4imvxgS1rwHhJfVxtPUDSZ1qh6LlY/l5g7Hq/fu GDrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=67tDMZwaozkC/4h2hdsCG2SkbsBh10T01ijQGIySkUo=; b=JigXnliJ7adgLFOLHpPw3MmWiaCuKFCqT/WvbonFQyY8b2Bu1fdfr8jz2aKhntLz7A EcZMr5kIzCXkFz6IwfwUO5CYSk0TJ9JAtY9DcX+uGuOFjznLf+m1kBUCcPTsl5owKnvL PVb9S/cLKWT4mOR1BL4QXHTLMQD7+PIUvze0ouOSj2Vv3BnecI8GHNTAZbE8db+5hqNR Z5OW7qNmdi7cZ1L6RbnTlRpTD0QTp5x44I90oHyFIcy8yCXWqYyOjHtQFtXhCIEbip16 lZN/Zh6JmKVxeZdi4Y4qApYGlzWpIVt2y+ek5iZFoQYRWHY+2+eDKb/FpZINlCa61iEm Rurg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=VJarTu7u; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r13-20020a17090aa08d00b00233e561533dsi14700427pjp.61.2023.04.17.19.44.59; Mon, 17 Apr 2023 19:45: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=@gmail.com header.s=20221208 header.b=VJarTu7u; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230499AbjDRC37 (ORCPT + 99 others); Mon, 17 Apr 2023 22:29:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229682AbjDRC36 (ORCPT ); Mon, 17 Apr 2023 22:29:58 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57711172C; Mon, 17 Apr 2023 19:29:57 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1a524c999d9so15928385ad.3; Mon, 17 Apr 2023 19:29:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681784997; x=1684376997; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=67tDMZwaozkC/4h2hdsCG2SkbsBh10T01ijQGIySkUo=; b=VJarTu7ueI5jKfXJfk+sjPdWWMUCCCD6nLfSLTw6040i2UYSycKSAllI/xAR7zCoYu OItvn0Oeemlm5n9LFQCXKTfuy8D8a0KV/HJTU9e5FTaY1m789aYYem58VdwQbzozMGuO o6DOc+DXHNLkHxf0SrVu/H9w/aiTxiARFSfOOmT1zNos5os7TTkg2fmWd4aIe8siOduN 5cIo1HFO6CvnO5qWrKf7sYcZekO9EVXSC3gy7qjeeE0gr8lDbA8mAXZ8fd03elp3hfrL aHdZWThvlq6kFwPX927MP9zOSAuNMOusekXfci4qH8FVvoVgT2Bh2CF9FbRVPD+QpIoi y8bA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681784997; x=1684376997; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=67tDMZwaozkC/4h2hdsCG2SkbsBh10T01ijQGIySkUo=; b=CnUPEwNK3ckFB8Yo1Rl7S0xsV8VzlZ7ix1V6ouwCy/yMBajc6vSLJ98QN9j2SD1HM7 2lAc1i2I18vHpWw5AhKJMIQYpHs6DCQq20m0Lq/o/ZLT8UmQkOqUf89KdXUErOPLwvjk bZamHdGC6WWwRor6emclLQQkuWI+GmVxi1OKfpMAjCsy5NXQZbsIncSp/zm7iLcci4s1 RxxDbcugCQ4HEffjPuPUT7+F/AaCDy0m36aK4MmbMWt8jqesfqRROMUAM7fu+z3+/MC2 q2YJ8LSXyZhU+k2qjuEykhsCYpHSCeFRMTtJJAwKau2s9+PTQgDXp2YG7KIpIFQP0+Uz O8gA== X-Gm-Message-State: AAQBX9eZddxubmXbq7h77gJ6ipGIZ4lq6gHJWbSY+rFv/7GyA2s6ze01 8scXwAloJNzD+k+JvSa/D403khEV9llThXRgY0c= X-Received: by 2002:a17:902:e88e:b0:1a5:25db:5bc0 with SMTP id w14-20020a170902e88e00b001a525db5bc0mr217740plg.3.1681784996433; Mon, 17 Apr 2023 19:29:56 -0700 (PDT) MIME-Version: 1.0 References: <20230415104104.5537-1-aford173@gmail.com> <20230415104104.5537-3-aford173@gmail.com> <7eed74e8-9f67-a410-3cec-f61a6db85238@denx.de> In-Reply-To: <7eed74e8-9f67-a410-3cec-f61a6db85238@denx.de> From: Adam Ford Date: Mon, 17 Apr 2023 21:29:44 -0500 Message-ID: Subject: Re: [PATCH 3/6] drm: bridge: samsung-dsim: Fetch pll-clock-frequency automatically To: Marek Vasut 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Sun, Apr 16, 2023 at 5:08=E2=80=AFPM 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/br= idge/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 =3D dev->of_node; > > int ret; > > > > - ret =3D samsung_dsim_of_read_u32(node, "samsung,pll-clock-frequen= cy", > > - &dsi->pll_clk_rate); > > - if (ret < 0) > > - return ret; > > - > > ret =3D samsung_dsim_of_read_u32(node, "samsung,burst-clock-frequ= ency", > > &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? adam