From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA317C2B9F2 for ; Sat, 22 May 2021 07:26:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F9C861151 for ; Sat, 22 May 2021 07:26:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230048AbhEVH1k (ORCPT ); Sat, 22 May 2021 03:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbhEVH1j (ORCPT ); Sat, 22 May 2021 03:27:39 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DE34C061574; Sat, 22 May 2021 00:26:15 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id z130so12251646wmg.2; Sat, 22 May 2021 00:26:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Oye/WdclhJDwP8mPkPCr9y4H1Z7zAK3xEJR1qvBeaso=; b=GDjzLdq47HCYuvEWQ4b6OsetImXmuisYOOQ/Cs2rqsaU5xIMzazg2ZyVBwVtTwtfAc TY9bP0852THvyYYutJ6qFm3gMjrUSVc87+YlBbo2Ev63mhbk7tnS4QfU1QvM3roGOSjF v6wxwxgH3o7gAah1WiDaXISCEqUFjNPfc9GHvHkdg6TKZB9lbg7QiOlyugIg3ZJFVDv/ MVPgSrdfhuw+XDjQHV9xlL4bOqWmnM+1/w+e6/1r3+0YPuTPZfaj8+cURvmNIjcwM193 LAyuN5P2YjXc1TR6UUyBwk/M7GJ7oOUDlLXDNLvzU1BwvuSchXJoDEL+OAn/Ipn910e4 ZnJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Oye/WdclhJDwP8mPkPCr9y4H1Z7zAK3xEJR1qvBeaso=; b=Xvl3L8RaLowmfdeRGpvNjv30ZTSbg1hu+b5oYMXVylLsvWZQmMpvGVK5JiZ/v5ROay ymgc9L54MmFPkz7l9VKSS/NJV25n3zohGg6liDnBCXFGXyRbjaXY382Ifa7TdafAi42c JdhbU1QlVpq++FFHveVWG39f0lrSD3Jeuf8GzMqil6aLNqHTX9OmCQrTi44ZgGbEs5OO 4lXJeynF+H59kXYgzxO8uD6Q0Zf43iDLd/k0YLRZXg9FElLkMIrXEJtxgzARegI7ybBq TF5viK3CsKtnaHMZ3x2yvi5mrQ13DIEITBpcg3HfFWXeAUyJkWOBZBsDv4M073iKky2+ dstQ== X-Gm-Message-State: AOAM533pT/PcPG9yib3ydYsNOBoLOtFt8U8XD2m/CTfwHGoolDBZKHEV 4/kYFH1trsW17ziPdH1BfBs= X-Google-Smtp-Source: ABdhPJzewLyrbdH2kx6GO+S9lB4qsB4HBQ/ZQpVFtt7r3rnL9WrC1zhP3+rIYl4JM/D/IIEo7ShgJw== X-Received: by 2002:a1c:49c6:: with SMTP id w189mr11727864wma.108.1621668373488; Sat, 22 May 2021 00:26:13 -0700 (PDT) Received: from kista.localnet (cpe-86-58-17-133.cable.triera.net. [86.58.17.133]) by smtp.gmail.com with ESMTPSA id k205sm1781849wmf.13.2021.05.22.00.26.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 22 May 2021 00:26:12 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: Maxime Ripard , Chen-Yu Tsai , Andre Przywara Cc: Rob Herring , Icenowy Zheng , Samuel Holland , Ondrej Jirman , linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , linux-rtc@vger.kernel.org Subject: Re: [PATCH v6 04/17] rtc: sun6i: Add support for linear day storage Date: Sat, 22 May 2021 09:26:11 +0200 Message-ID: <5920087.Glgd6ahW17@kista> In-Reply-To: <20210519104152.21119-5-andre.przywara@arm.com> References: <20210519104152.21119-1-andre.przywara@arm.com> <20210519104152.21119-5-andre.przywara@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andre! Dne sreda, 19. maj 2021 ob 12:41:39 CEST je Andre Przywara napisal(a): > Newer versions of the Allwinner RTC, as for instance found in the H616 > SoC, no longer store a broken-down day/month/year representation in the > RTC_DAY_REG, but just a linear day number. > The user manual does not give any indication about the expected epoch > time of this day count, but the BSP kernel uses the UNIX epoch, which > allows easy support due to existing conversion functions in the kernel. > > Allow tagging a compatible string with a flag, and use that to mark > those new RTCs. Then convert between a UNIX day number (converted into > seconds) and the broken-down day representation using mktime64() and > time64_to_tm() in the set_time/get_time functions. > > That enables support for the RTC in those new chips. > > Reviewed-by: Andre Przywara Change ^ to Signed-of-by. After that, you can add: Reviewed-by: Jernej Skrabec Best regards, Jernej