Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp285550pxj; Wed, 16 Jun 2021 02:16:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwzCDYiLt8DzxyNqSLlGhui85K1ZN3Vl9oyiADc4n3/y7EoUz5yIi4G6d/GFCLwEtSTaZk X-Received: by 2002:a50:b2c5:: with SMTP id p63mr2874869edd.5.1623834977770; Wed, 16 Jun 2021 02:16:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623834977; cv=none; d=google.com; s=arc-20160816; b=GKYNyqZ5c38uLM/VURaPmMiqefDDHZDxz9irJ/NXpbhaE9O7yjCKJ5v0NcC6GWysz3 gir2DOrBZtqH68q4Ptk1xZM37ytCr9vjNqAUSh/TdZpR3TgIPkv4f8/iqZwEiLjfujMU TGujE6zx2s4Ko2NWOoIV/AFVVb13xdI0IcDTkVgOk4j0qY0f6MhtQzuzRCdqAq8lXMwz oSob6ZkYYxR/uae3nYhzWwhULYHjlRjo9zJUij2LI/bwuHdARyuvZ3c/5v7BGoBkShxI eIduuyTsfIgkGlCkWb3CUc+Uvics9LIgaXjSF7bJkKyoMVDJesoI/mogkCqEzoqfy2rR +26g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=OQ3mH14ssHehAX5EBuHe0ZN2vZKDVl/XkALKv3ydHts=; b=v2qIx5PAeKnWfBNp6jaASvZ2zPJ8L8pIVx/7VjK23BI8wb+1CBfOaCRQbyygDNmEJ6 z69d+CggMo0p8wVViWVBvXxVG7cbHqa9QK9JlE7P3qG/Eg3b8+aFciB8qd3JU/agvC17 39oAF0t4r7rLfk9XTg7R04Ai1mYew1d/Dy9f5B2u+iBFcxD4UXPiL5W0kTJFTXEoSf3E NBBsYXlemNCtwDSxzjpqTj/FvQST5RqNr00qxAJHqP4SeR2df3L5mq74IFohtXK26ION RaqEnI6jcHZ6cmE2rzSugq5GR3fl0o4eQKzGi9FlbcJ19k4g+CG6+YQRgofE8dmfvLHM xWTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=kRkGMEkt; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=A9fvZqOB; 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=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s26si1639713ejq.633.2021.06.16.02.15.55; Wed, 16 Jun 2021 02:16:17 -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; dkim=pass header.i=@cerno.tech header.s=fm3 header.b=kRkGMEkt; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=A9fvZqOB; 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=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232058AbhFPJRG (ORCPT + 99 others); Wed, 16 Jun 2021 05:17:06 -0400 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:57505 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231491AbhFPJQl (ORCPT ); Wed, 16 Jun 2021 05:16:41 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id E05DE580064; Wed, 16 Jun 2021 05:14:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 16 Jun 2021 05:14:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm3; bh=O Q3mH14ssHehAX5EBuHe0ZN2vZKDVl/XkALKv3ydHts=; b=kRkGMEktwO4/GNbKL B/M6Cs/SVuLdcXQbvM/ZQuzuGVu+MEHIYcPbqTtxEfqQfs5n0MZd2v3L5dHENFyI qm5qTiH7zpI68Uo6yxBtUXTgGTWKQ8qvVXvfuYxXNPPcEMsxtp9tCHhwz4EItqzK jjizIw9c/R2yTp8og2V9fMqGH20A3dp9TARyTxit1xSwBqrQr5CJvecXeN78+E4s iaI6ZfqRnE4N/ppWya61GA2i3iWuv/r+qPEjrNm2NSjHdqsdUwLPamOmV0m6Sksw jOwP/UTAXcdhCYn3wO+epfkGBfqOQUn2njycYxL1NvRLWBw0hoynt+iGgDfciNBe 9r4pg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=OQ3mH14ssHehAX5EBuHe0ZN2vZKDVl/XkALKv3ydH ts=; b=A9fvZqOB5fAh2U3yGwclU35hepaDf0GnTr59uPJSIjkrAC49P+/gWEm+x 10zJttYuB/rnUKEfw9kL/lyjTaO550YCIrX/Euf9OS8SahTIx/EK8pSYOXMzibcz u+p1Js1ZgEtO3u24fsZai4iOzxNdtsOzJBzx9GdnFWAu536z120kMFDbiwxagct+ gZB8+F7Qmb1sIazCkWY5Y5Qy8BZMXVfMjDdLyR+MKeR46ecDYQckIL9SgJN2eMz0 42zcfMtzHgpPWFThXljU4EOe35Zl9jvVNUZZV1DuFmzmSqmjoaQGauHPCW1N/Q/U 142cHenOo+DQEUOkww1/NWuDlPo8A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvledgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtugfgjgesthhqredttddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpefgjeettdejgffgffdvteeutdehtdehgeehueetkeefgefhtdetjeekledu gedvudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 16 Jun 2021 05:14:33 -0400 (EDT) Date: Wed, 16 Jun 2021 11:14:31 +0200 From: Maxime Ripard To: Andre Przywara Cc: Chen-Yu Tsai , Jernej Skrabec , Rob Herring , Icenowy Zheng , Samuel Holland , linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Ondrej Jirman , Alessandro Zummo , Alexandre Belloni , linux-rtc@vger.kernel.org Subject: Re: [PATCH v7 06/19] rtc: sun6i: Add support for RTCs without external LOSCs Message-ID: <20210616091431.6tm3zdf77p2x3upc@gilmour> References: <20210615110636.23403-1-andre.przywara@arm.com> <20210615110636.23403-7-andre.przywara@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20210615110636.23403-7-andre.przywara@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, Jun 15, 2021 at 12:06:23PM +0100, Andre Przywara wrote: > Some newer Allwinner RTCs (for instance the one in the H616 SoC) lack > a pin for an external 32768 Hz oscillator. As a consequence, this LOSC > can't be selected as the RTC clock source, and we must rely on the > internal RC oscillator. > To allow additions of clocks to the RTC node, add a feature bit to ignore > any provided clocks for now (the current code would think this is the > external LOSC). Later DTs and code can then for instance add the PLL > based clock input, and older kernel won't get confused. >=20 > Signed-off-by: Andre Przywara Honestly, I don't really know if it's worth it at this point. If we sums this up: - The RTC has 2 features that we use, mostly centered around 2 registers set plus a global one - Those 2 features are programmed in a completely different way - Even the common part is different, given the discussion around the clocks that we have. What is there to share in that driver aside from the probe, and maybe the interrupt handling? Instead of complicating this further with more special case that you were (rightfully) complaining about, shouldn't we just acknowledge the fact that it's a completely separate design and should be treated as such, with a completely separate driver? Maxime