Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3920460imu; Mon, 28 Jan 2019 13:21:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN5tjAmS8s4XamKzF2Nr1VDTtrSSp49fKXy0O/8siWd8v1sFEStbByEn487jnvkV+hoUHGel X-Received: by 2002:a17:902:8641:: with SMTP id y1mr23291256plt.159.1548710461846; Mon, 28 Jan 2019 13:21:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548710461; cv=none; d=google.com; s=arc-20160816; b=KAlh+blwewrAWe51CyQdf94VXR/687lZzmSq2fY9GiL1hXY7SXyfyLSQhvy/Z4O+3T piHYrZN7pcd/hZgKsSCT8DzeX2cVsH7cEAhTeXCkrZGFqWCtXy8yAuq6pvh0rmwrALuw wIEb3uqgwAGBHr2vkTiJURB9EACoNloCRL+GrRkH53fy+J3xd0vDUiTJrw4Eh4v0aBnT zhNZaXlaF5yzviaFqaVawL25WMMaMXGyYquqfxMBbovzJUZCabH7ImNCS+HPhNJZZ7GW kUmD8hVHS5Aer8Ws02b9SVYUivmxvr4dnXvVIrFHbZbT+7e1mcdgSzOxWRvnLFTj7ets 9kJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JXC54N7LnVrvZfdveaIcHCv9Wp8Qk2oC6Dh5vZ/hbyw=; b=dAPxOUevyhFUL9DgoSrSYgvIaQXB1ofZTz4GV7pTjdGzrO94EmlejotX8l+p6Jb2iD XHUuxGtRoE5sgHKza7LPkeg2mGOBaYmp+mOTVcVvlGHouovJU0DextaVStJD6h+J++Lf vmkVtydrRXXI55kI9tantSVAn9cJsplHQQCeSbvkKIDIjzDQrA4A2YfobtekXpe3M0sj lHPiEODuOwdy/QMiiOdLznsdjes29m3Nq/ehE9AZiOAQAWa/0SwFMrWbCvWCklCTYw0s mU2eQ95Pds2ctHyTPP+rojs3iUGSgMnVsVKB9bIYqTYd7o9wuTHBqi3kJ0fu6BoHqWHQ TN4w== 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 v9si5286098pgo.23.2019.01.28.13.20.46; Mon, 28 Jan 2019 13:21:01 -0800 (PST) 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 S1727687AbfA1VUS (ORCPT + 99 others); Mon, 28 Jan 2019 16:20:18 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:46333 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726744AbfA1VUR (ORCPT ); Mon, 28 Jan 2019 16:20:17 -0500 X-Originating-IP: 86.202.150.119 Received: from localhost (lfbn-lyo-1-59-119.w86-202.abo.wanadoo.fr [86.202.150.119]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id C8CD424000F; Mon, 28 Jan 2019 21:20:10 +0000 (UTC) Date: Mon, 28 Jan 2019 22:20:09 +0100 From: Alexandre Belloni To: Matti Vaittinen Cc: mazziesaccount@gmail.com, heikki.haikola@fi.rohmeurope.com, mikko.mutanen@fi.rohmeurope.com, lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, broonie@kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, linus.walleij@linaro.org, bgolaszewski@baylibre.com, sre@kernel.org, lgirdwood@gmail.com, a.zummo@towertech.it, wim@linux-watchdog.org, linux@roeck-us.net, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-watchdog@vger.kernel.org Subject: Re: [RFC PATCH v2 08/10] rtc: bd70528: Initial support for ROHM bd70528 RTC Message-ID: <20190128212009.GE18309@piout.net> References: <20190125110536.GA29321@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190125110536.GA29321@localhost.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On 25/01/2019 13:05:36+0200, Matti Vaittinen wrote: > +static const struct rtc_class_ops bd70528_rtc_ops = { > + .read_time = bd70528_get_time, > + .set_time = bd70528_set_time, > + .read_alarm = bd70528_read_alarm, > + .set_alarm = bd70528_set_alarm, You actually need to provide a .alarm_irq_enable callback, else there is no way to disable a set alarm. > + rtc = devm_rtc_device_register(&pdev->dev, "bd70528-rtc", > + &bd70528_rtc_ops, THIS_MODULE); > + if (IS_ERR(rtc)) { > + dev_err(&pdev->dev, "Registering RTC failed\n"); > + return PTR_ERR(rtc); > + } Please use devm_rtc_allocate_device() and set rtc->range_min and rtc->range_max before registering with rtc_register_device() (which can be done after trying to request the irq). -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com