From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F21D92FAF for ; Sat, 22 May 2021 07:26:14 +0000 (UTC) Received: by mail-wm1-f54.google.com with SMTP id o127so12242368wmo.4 for ; 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=Yy1OyOEgUtgJWUeNHlNq4uQJSIvHTW9/CUBl45uxAb7n+9ZQ5WRWzI+l/1J64wOqRk GVj2L/1FxMJ9o/1z+1rcuIlRtoqw7MaQw92qyKUZCxiDXGsWiPUqPCoiA7xyvhBtJjcF UHBwK2OibMPZYmQcK58BqwrYTb70pWYUWiy/Wg2dv4jO/37FphVuQuyInij+4l7OEe0c MmT4fe4Lwmejo6/bJQKr99phS52dbLg18i9P2HECvY5o4VmGbpwi36mr+qb0O1W7kILx jnqbHJtc4Axb3z7I5eR1/BZ0HWr0xNYcTTgKg3C0V9HiT7RWIkulJqKbReccj1YUZC+a vwxg== X-Gm-Message-State: AOAM533dr8QwhXMZg7SghFUnmhQWVjp4KCzlf9pZzMQtFWSJLw+G/VgR +wuafvEpRxaPYCe5O64Rh6M= 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> X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 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=-5.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,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 0BAD0C2B9F2 for ; Sat, 22 May 2021 07:28:40 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 705CD61182 for ; Sat, 22 May 2021 07:28:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 705CD61182 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HomsH1JgD3qXmz2JYxrgv7P0Yz40e3a0dh1f6mIAwJw=; b=UNPjmBzjsPSenmCnbQ8Wt1vjf5 lt+M3hwK4UQYQ8c4endo+W88cnQ//Px9YWyDt+m8TFAflS8IQXydVZdXH7ZN5R6vmVWBFfGLNrlG7 rNvQAOaeIXCBP20NNYYaQulXdAuczFehrFUA6ZkBDIKEztTITeeJ6RWiNVaKgYPfIYeI/e7YFr4uh vGyDreX6oerXB+qbP9kxUjhuqnxK34+LG7A1fQVy4/g01kQtPhnrxQwsDm11Q6HVwh0a743LECMK4 ISnGL8gJoL7ywV31UXuKoSElw7ryZDcF1FgEIE0TKCkdNKSyzRXfeK3kyImpLk6KcWHkSm87RLa1N z4yE8l3w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lkM1b-002257-VJ; Sat, 22 May 2021 07:26:20 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lkM1Z-00224v-NK for linux-arm-kernel@desiato.infradead.org; Sat, 22 May 2021 07:26:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description; bh=Oye/WdclhJDwP8mPkPCr9y4H1Z7zAK3xEJR1qvBeaso=; b=CjwdBkrvgcRWP7HG5oKwZfvD0x LSzmewbB6m7hXvgEPQC7SIPJMzf+kXbwNjZfCjtr6lgyCVTGsGPeEex9FFrAdJdbfLpyqDfr1IlTT wn2segjkdyhR8XZcX6Bg78u2WqcWpQppJfC5MGwiTwKuWileo8PTpzmem1pz7GkujNSQzWpWGE6eZ q/dNVrPO+3oWb/eTprahvh+v8+D2s7bLDdB1Lgzq93rX4/+9+JYeTdMLfuSn5dWSDJ1RxwW8mum7n E6zs1HcHvC4uYhteiTao36z52VwzBjFWVtLsqmsx+WjUweRe4bYegMG3nhr7IuhW/AC688wMqnk0l ozDmgGpA==; Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lkM1X-0002CC-3n for linux-arm-kernel@lists.infradead.org; Sat, 22 May 2021 07:26:16 +0000 Received: by mail-wm1-x32e.google.com with SMTP id o127so12242370wmo.4 for ; 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=d/PGstCrVt8UZ49wszV/jC/WF3U0tPjA9pyn16sgbRVddK1t2+yIZL/ipFWUHGVLBO m4Y/EV0eb3Ex7oMUFlcNPc8A1aCvRf90a30flodd7ia+nq/8Ko5vAdJbG8atYScGUaGO 0WpDUPe6+OJnFysxx6RFSZLIRpdeawhGipUTtWvyv42JtlIbRYlKkszgUgRp0DT8jcC9 Hyz+cxRS0glGklwbL7N59qIgRXyLyj9XYC5EtwSEkS1muOsnKuwAoQJtevqP3aH1EF2M Q244ixFjz5wZw08Jjk8lsEgtt0qfGOY0lBhS6PrGKd3UZphdcRljFy4NqZ1hoTsnhePQ cKpA== X-Gm-Message-State: AOAM531ZX65HLOAmAVCiW4m8Jp+FXY+/Yw9ItAW5CsElvTuhl0Yr590B GlhE9SDq9/k8pmoa2NW+FXo= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210522_002615_204408_475DEDE0 X-CRM114-Status: GOOD ( 14.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel