Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp410125img; Fri, 22 Mar 2019 00:17:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjAnX1FngCpG8o8SHISg06Ay8caqr+MmD92FyQwNmTg9QyCZ/AUGqqAvcZZrjvzvlc0BDL X-Received: by 2002:a17:902:848b:: with SMTP id c11mr7539445plo.279.1553239038401; Fri, 22 Mar 2019 00:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553239038; cv=none; d=google.com; s=arc-20160816; b=qeoiCAubndcx+nIeg7qmciTWuMG+8XE7AtSIYJqrww13FyEbhlk1GchlRXT8+Doeow pDf/R9ReWP3nu/yQqK6iH2w4eERhKNqW9S2j+lgUZHFNjixP3Mxiyr0Gljf5776dlgbT 2vb4uXRhgymfdzR0dGTz7bVjDgHSXVMvDkakrjGd9akxP4jJt+HvOT4n1IP1w+gN9fkO mkwRClzUMHW/AMLSvqhY8uTyGovFW7QyZxZV3UXpryU38eB6H822YaVMpIIAs8H11dcA e9QVNcq68XS5YFIfYE8FoSWeKPxVedFj5UfDAJZgrpEI5ZRntGBrF6pLtZ4xhZZkEp3x dFxw== 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=PYLP83ZNGVuBP9PThvtGAwZ78EanvcZcSOV2sxWRq2E=; b=bCEaZcRq3oE69cQAea6h5QzkuN9GD97ZkGKeHOx6lzeyZH/BH+qHHUF61f+4cK6aBh SPwqLq+sU82M3vS9eSwN6uwsBE39OKGJh7Ayh4bPaGwtkSCCB9q+UTWNHs4+KOPD9pDd 4IBf0vlYH4Q1dIC+gYPuM07vn5o5YQTqzYMv9pdsJ6r51ktgXzs4fSuSmJPBcg3PSs7T qbOrY1/LmkP3VPh50WWGKa20iw5Gd7iKBfiz/uPkCu/yvKdxFQmqYYxilFHlEFdaz7MZ 1Hrw5giAzlMzfNkEzOsW+fzHSkpfY9f3RP+L/VVtWRPZBZxmtS51qKhOXRs4xnCtkxFJ 2udQ== 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 k1si5955257pfi.25.2019.03.22.00.17.03; Fri, 22 Mar 2019 00:17:18 -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 S1727849AbfCVHQT (ORCPT + 99 others); Fri, 22 Mar 2019 03:16:19 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:54979 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727574AbfCVHQS (ORCPT ); Fri, 22 Mar 2019 03:16:18 -0400 Received: from localhost (unknown [182.72.246.220]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id BF233100002; Fri, 22 Mar 2019 07:16:15 +0000 (UTC) From: Alexandre Belloni To: linux-rtc@vger.kernel.org Cc: linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, Alexandre Belloni Subject: [PATCH 1/4] rtc: wm831x: set range Date: Fri, 22 Mar 2019 08:16:08 +0100 Message-Id: <20190322071611.16407-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 The wm831x has a 32bit second counter. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-wm831x.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-wm831x.c b/drivers/rtc/rtc-wm831x.c index 7b824dabf104..deaffe0eaf2f 100644 --- a/drivers/rtc/rtc-wm831x.c +++ b/drivers/rtc/rtc-wm831x.c @@ -436,12 +436,16 @@ static int wm831x_rtc_probe(struct platform_device *pdev) device_init_wakeup(&pdev->dev, 1); - wm831x_rtc->rtc = devm_rtc_device_register(&pdev->dev, "wm831x", - &wm831x_rtc_ops, THIS_MODULE); - if (IS_ERR(wm831x_rtc->rtc)) { - ret = PTR_ERR(wm831x_rtc->rtc); - goto err; - } + wm831x_rtc->rtc = devm_rtc_allocate_device(&pdev->dev); + if (IS_ERR(wm831x_rtc->rtc)) + return PTR_ERR(wm831x_rtc->rtc); + + wm831x_rtc->rtc->ops = &wm831x_rtc_ops; + wm831x_rtc->rtc->range_max = U32_MAX; + + ret = rtc_register_device(wm831x_rtc->rtc); + if (ret) + return ret; ret = devm_request_threaded_irq(&pdev->dev, alm_irq, NULL, wm831x_alm_irq, -- 2.20.1