Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp146881pxf; Wed, 17 Mar 2021 01:23:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5ngk5iLHSlBzZ9BgP7Yb7YTiGvrfXCJFTyTiUr93vIOPB77d+zgSHv8QRgt05tC5dfbMC X-Received: by 2002:a50:fd83:: with SMTP id o3mr41604843edt.90.1615969418012; Wed, 17 Mar 2021 01:23:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615969418; cv=none; d=google.com; s=arc-20160816; b=Nbe4jm9z9uDdOPL8CUZrgF+oq6LEvP7JMw7oRM+HfijmuZDYdmlVn0Y/fxByU+esKD KEezjSY3Bsgmz2vST0NqzAX/L4xf2Loc4lSvRsOnxuKX0q+QV6YdVpfn5qD4tDTBIRgO Tj6SZ+HDJDEqv/mOASq5i95tr0ErmRxspzmN3kAERMzWR0tmPBIEgLB7l+U277nJ3QHS pv8VdPu/XJjwJ1iDN/EO3WS/SFIGogNFR53AvA8kWWul5YOXOKk5MGIbsczvbl+hWT8i znTGFDf+q+2yKDMi5y8+yWYB5W2COTJBmWUS0krby+C6HGvKQSh/nvsw3uKU8bxuHo7u jOmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :organization:mime-version:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter; bh=G4CEsHOeaP5pcztqVl2L6dMz4bHf39tKQXQToxGQVGc=; b=cUOODdxKB8/u0ec0gJJJvWZkxucFsgVIckELIH7n1v11idape5P6XjUAmAIGIQlDf4 SS6K5Iy+AF4iGJUD8rhhGfY19zQOFWcmgPGt/UjSQjTx7sxoLbYrfmua3VWA6878bPt0 zQQAzd6mbMPPRoXLl/pYivWpuIi/Ok/kLBUa9xVNTuzsgxz7UE9FJJ8Hmf+FOOMXODgv iBytwNNRxVbCV8c2ff4fEb5qmTerwyiaslvAIdJHUhLY+N1ykZms4DwE8hGeucsm/Odt zWoxWzgDBnPZctUVPZqppXvu+jNq0yfqRyd64i195q0vxAdV9zOX4B+FFW1MSJm42QSf /e8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mDIdOoyQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hb37si16123476ejc.81.2021.03.17.01.23.15; Wed, 17 Mar 2021 01:23:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=mDIdOoyQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229657AbhCQIT7 (ORCPT + 99 others); Wed, 17 Mar 2021 04:19:59 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:11940 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbhCQITu (ORCPT ); Wed, 17 Mar 2021 04:19:50 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20210317081948euoutp0149a32d2b517d401816803b63d066a4ea~tE2piNuhl1262012620euoutp01g for ; Wed, 17 Mar 2021 08:19:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20210317081948euoutp0149a32d2b517d401816803b63d066a4ea~tE2piNuhl1262012620euoutp01g DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1615969188; bh=G4CEsHOeaP5pcztqVl2L6dMz4bHf39tKQXQToxGQVGc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mDIdOoyQ2hGsLqfSlJhEOEAH0JG+cT+fis+aXel2Id2ib+C4FPCgRRf57YPALKTwp QjIEUnXmzuiUV7sG/gIK1+qYYeij1p2e88flKEXNzrH11O2AVxGBXJGEBZ1OoCPX1h 0CY3+3mzz0tTpNdUWrnBfpf5dwoMWkHdsBlA9N5U= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20210317081948eucas1p2667d018a543623129ded9d61e9147376~tE2pEELNY1615916159eucas1p2D; Wed, 17 Mar 2021 08:19:48 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id CB.56.09452.4ABB1506; Wed, 17 Mar 2021 08:19:48 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20210317081947eucas1p15a31b346977fba94bf154716c3d89cb0~tE2oplhr51281712817eucas1p16; Wed, 17 Mar 2021 08:19:47 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20210317081947eusmtrp102c4cd63ae4c762407fc779cb32e0655~tE2oo5zcr2416624166eusmtrp1f; Wed, 17 Mar 2021 08:19:47 +0000 (GMT) X-AuditID: cbfec7f2-a9fff700000024ec-fd-6051bba4f72d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 25.B7.08705.3ABB1506; Wed, 17 Mar 2021 08:19:47 +0000 (GMT) Received: from localhost (unknown [106.120.51.46]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20210317081947eusmtip1c130131e95b52183d1dea83961747a32~tE2ocnME11518915189eusmtip1f; Wed, 17 Mar 2021 08:19:47 +0000 (GMT) From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= To: alexandre.belloni@bootlin.com Cc: l.stelmach@samsung.com, a.zummo@towertech.it, b.zolnierkie@samsung.com, linux-kernel@vger.kernel.org, linux-rtc@vger.kernel.org, m.szyprowski@samsung.com Subject: [PATCH 2/2] WIP: Provide has_alarm method Date: Wed, 17 Mar 2021 09:19:36 +0100 Message-Id: <20210317081936.26583-2-l.stelmach@samsung.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210317081936.26583-1-l.stelmach@samsung.com> MIME-Version: 1.0 Organization: Samsung R&D Institute Poland Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupileLIzCtJLcpLzFFi42LZduznOd0luwMTDP5OFLVYcvEqu0X7u2Xs FhtnrGe1uHloBaPF5V1z2CyOrb7CZrH2yF12B3aPeWuqPfq2rGL0mD7vJ5PH501yASxRXDYp qTmZZalF+nYJXBlt/5+wFnxnr7g7YRprA+Nlti5GDg4JAROJpl25XYycHEICKxglVhwK7mLk ArK/MEr0Pb7DBuF8ZpRY/rmbBaQKpGHr/ztMEInljBKTlh5ghnCeM0o83LkCrIpNwFGif+kJ VhBbREBR4va+h2BFzAILGSUerFrHBJIQFjCSOLZmFzOIzSKgKvHqUBs7iM0rYC3x595ERoh1 8hLty7ezgdicAjYSB5csZ4SoEZQ4OfMJ2DJ+AS2JNU3XwWxmoPrmrbPBlkkI3OCQuDp7HRvE IBeJNU/uMUPYwhKvjm9hh7BlJE5P7mGBBEa9xORJZhC9PYwS2+b8gPrZWuLOuV/gAGMW0JRY v0sfIuwo0XZmGStEK5/EjbeCECfwSUzaNp0ZIswr0dEmBFGtIrGufw/UQCmJ3lcrGCcwKs1C 8swsJA/MQti1gJF5FaN4amlxbnpqsWFearlecWJucWleul5yfu4mRmByOf3v+KcdjHNffdQ7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NDMwNTQxszQwtTQzVhLn3Tp3TbyQQHpiSWp2ampBahFM HxMHp1QD09Hd8z/+eDz9x8UQBQnefz2nfb1qyp5fPff8uJo3w7IjIZtuK5w7Ys+V25YqKbT0 U8IN7aooloc8u6RvvWxftfFE8ZYvi7V2uthVGgS8+ecSqqXzW063daX8GxP9/TOZjd5f1eAU td228ZTVIu2Wb/zKq74L6RgZGV7/cvP1/9RdJ9ZKaUyqqp52L9vj2JqDc7Ztn8PhX3PUcb/q c/OCU+an1sguCpNf8u/m2nT5WS/efLQuq2gsPZ40aadYzXOVCbLpvan3P2xTN9E2ONMf1/hs 4o5tJQmPBX6+ONenmH7t3DJGf+17ETPyX38z1y9q5UmYoRx68wdTasP0c9pG5hypr9zcXvP4 PT/I7lHG9l2JpTgj0VCLuag4EQBNaBetLwMAAA== X-CMS-MailID: 20210317081947eucas1p15a31b346977fba94bf154716c3d89cb0 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20210317081947eucas1p15a31b346977fba94bf154716c3d89cb0 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20210317081947eucas1p15a31b346977fba94bf154716c3d89cb0 References: <20210317081936.26583-1-l.stelmach@samsung.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Ɓukasz Stelmach --- drivers/rtc/rtc-ds1307.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index b21e06583bd5..dee60f459a3e 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -387,6 +387,13 @@ static int ds1307_set_time(struct device *dev, struct rtc_time *t) return 0; } +static int ds1307_has_alarm(struct device *dev) +{ + struct ds1307 *ds1307 = dev_get_drvdata(dev); + + return test_bit(HAS_ALARM, &ds1307->flags); +} + static int ds1337_read_alarm(struct device *dev, struct rtc_wkalrm *t) { struct ds1307 *ds1307 = dev_get_drvdata(dev); @@ -1201,6 +1208,7 @@ static const struct rtc_class_ops ds13xx_rtc_ops = { .read_alarm = ds1337_read_alarm, .set_alarm = ds1337_set_alarm, .alarm_irq_enable = ds1307_alarm_irq_enable, + .has_alarm = ds1307_has_alarm, }; static ssize_t frequency_test_store(struct device *dev, -- 2.26.2