Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp385957yba; Thu, 18 Apr 2019 03:02:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqyi9EpypQEWyepM+1S0XnPwv4pnCkaEigrSoLuqQlbGL/SoTBdgLeDw/pqPUPUsS2OlU9rH X-Received: by 2002:a62:6004:: with SMTP id u4mr5245712pfb.257.1555581741965; Thu, 18 Apr 2019 03:02:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555581741; cv=none; d=google.com; s=arc-20160816; b=H6gGW+44X3QAxFrGlbspUL7zXP/x+a1n/6sMKOe5kos2KnHujTVGHGcJ/yP4vUyrVy k9C/NI7hTHMD8/k1V1+bSQZX/PPMA0PUPEEcUGqGAVh4qXCFn0eiQRvf5bHNrMNGFDMY EiHE6St6VNT80ZYMS0EV1WsJPmlfyfpIu4Lvjs64bq+DWGh/21bX33+1m6nQTkg50FOE DUqdB6zz+tKGlJfvDQnQykmU7Uk+/zjXL7EJqp9V3uFJD2iG7mhK88beBGSPDIhWsWQr uvYfVHyOVaQstzXigmpQUD2TaAI3uMK7Z6MxZF+IrrFfqtW8pmHd43+QUmDFcJuL/zu7 e5MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=9Z+72LPaq5ByIMu94cZ52idTiylfx29yppXFtk6e0qg=; b=WDxVaF7UK6D8xLNbH/52PYHFpdUa/Uhg8hl+ZlHHgDFqYeTLvbB/ulcJw0CiRQG6w3 ZzMV/Pfuo2Ir1NaO2rPIxj455hxqUcpP4hn2q6HsAf0lGMZJTZNBofHPvDM/h6CcBmGd RHRG9XASuBZEgeTlzKiNIR4w7EjpSC61F5AsIohw+Nun4dLevBHwLA7c9iUhJkrUyyKy leg1X25M0rC6fHQTL2ERZgdFGfq3J8C/N/xqbfwqtJVNFNAI+jfTATOqxFFWbJZw77WP sTUOz3iMhe4ui9qgdDQvGBi29+9401HyMyg0zesRgTOOaMVlidI0mt+lkOjFxTY+YVaI ycyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e184si2026434pfe.118.2019.04.18.03.02.06; Thu, 18 Apr 2019 03:02:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388593AbfDRKA5 (ORCPT + 99 others); Thu, 18 Apr 2019 06:00:57 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:53437 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733049AbfDRKA4 (ORCPT ); Thu, 18 Apr 2019 06:00:56 -0400 X-Originating-IP: 109.212.207.226 Received: from localhost (alyon-652-1-176-226.w109-212.abo.wanadoo.fr [109.212.207.226]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 5534A24001B; Thu, 18 Apr 2019 10:00:54 +0000 (UTC) From: Alexandre Belloni To: linux-rtc@vger.kernel.org Cc: Paul Cercueil , Mathieu Malaterre , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Belloni Subject: [PATCH 1/7] rtc: jz4740: set range Date: Thu, 18 Apr 2019 12:00:39 +0200 Message-Id: <20190418100045.29288-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RTC_SEC is a 32-bit seconds counter. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-jz4740.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c index d0a891777f44..079469627bd7 100644 --- a/drivers/rtc/rtc-jz4740.c +++ b/drivers/rtc/rtc-jz4740.c @@ -348,10 +348,18 @@ static int jz4740_rtc_probe(struct platform_device *pdev) device_init_wakeup(&pdev->dev, 1); - rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, - &jz4740_rtc_ops, THIS_MODULE); + rtc->rtc = devm_rtc_allocate_device(&pdev->dev); if (IS_ERR(rtc->rtc)) { ret = PTR_ERR(rtc->rtc); + dev_err(&pdev->dev, "Failed to allocate rtc device: %d\n", ret); + return ret; + } + + rtc->rtc->ops = &jz4740_rtc_ops; + rtc->rtc->range_max = U32_MAX; + + ret = rtc_register_device(rtc->rtc); + if (ret) { dev_err(&pdev->dev, "Failed to register rtc device: %d\n", ret); return ret; } -- 2.20.1