Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1534619

RE: [RFC PATCH] rtc/nxp: add FTM alarm driver as the wakeup source

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Meng Yi <meng.yi@nxp.com>
Newsgroups linux.kernel
Subject RE: [RFC PATCH] rtc/nxp: add FTM alarm driver as the wakeup source
Date Fri, 02 Dec 2016 03:30:01 +0100
Message-ID <sJLLP-5MM-1@gated-at.bofh.it> (permalink)
References <sz2mZ-5I7-25@gated-at.bofh.it> <sz2mZ-5I7-23@gated-at.bofh.it> <sJnzP-4We-5@gated-at.bofh.it>
X-Original-To Alexandre Belloni <alexandre.belloni@free-electrons.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=31gcmXH5d0NsmNzEvYJbDQ8IVCP1mtisOr49pINDruQ=; b=L7xZI/YUVU/mnc1QOqfeAgo9ddS1eQnnMLapoS4rC+PISq7ZIFqj7iwFvrpOmeOU9hkDYA0XHAAH/X8BANFEJN59drKNYfAUbVRd6xN9yJnWtQfRL1T6WvCCbznl032t3TWFaxgqYhafcLDOF4JatY0LmJLEkj/pouOxImGJ9AE=
Thread-Topic [RFC PATCH] rtc/nxp: add FTM alarm driver as the wakeup source
Thread-Index AQHSLZmfOcr+I159UUKSnEgqrnRCnaDFZ7EwgC0R3gCAAbF/oA==
Accept-Language en-US
Content-Language en-US
Authentication-Results spf=none (sender IP is ) smtp.mailfrom=meng.yi@nxp.com;
X-Originating-IP [199.59.226.141]
X-Ms-Office365-Filtering-Correlation-ID 032e206d-d740-401f-1ba1-08d41a5ab5c4
X-Microsoft-Antispam UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB6PR0401MB2632;
X-Microsoft-Exchange-Diagnostics 1;DB6PR0401MB2632;7:cZ1Ge3nUFu4F3zJsBVse18ehVHa74jFQ2M9aiNvM1aBTeYlgkJkCwK9V0Qv1rReQ6BivqRoEOLddg1XGFrE9mj/wUVrcwh3gd8oRusl9wRKW9xJ+o1WMmsD+KExS58T/QIbqutiwOwN/S+ijcvr+QZS2JVeWZthPd/4hUKN31e7E2zsuH4nLpb7I4SEP2A2oZ2TqqbmfEJCO1kF7nmj/zcqnwjGJKVh+JXsQ6PWzajOB+McrKxl9rV0mURIGSjDipAzMWssH67bY56ch5T+j7fcb8NxyXwBgA0RKIP9fmFPFmYpCFuQ/6L7Fh9EEXeFx/yJ6OgZLMiz7Nxo46WOg7/FuxCmXjnJIkQ++gPe7919MuO+ZvG/0Ay403MUAFh/Sh9T6xWV5vzZomkYbFy8ZIeLy1niZnTw4afXFgaHDW6RdVesEkdDPfus4KrgVS2zbpShMjMZ1du8ITDNyhk9Jtg==
X-Microsoft-Antispam-Prvs <DB6PR0401MB2632F71AAF311A033E644D81EC8E0@DB6PR0401MB2632.eurprd04.prod.outlook.com>
X-Exchange-Antispam-Report-Test UriScan:(58145275503218);
X-Exchange-Antispam-Report-Cfa-Test BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(20161123558021)(6047074)(6072148);SRVR:DB6PR0401MB2632;BCL:0;PCL:0;RULEID:;SRVR:DB6PR0401MB2632;
X-Forefront-Prvs 0144B30E41
X-Forefront-Antispam-Report SFV:NSPM;SFS:(10009020)(6009001)(7916002)(189002)(199003)(305945005)(110136003)(2906002)(105586002)(7696004)(7846002)(7736002)(68736007)(66066001)(2950100002)(6916009)(189998001)(16601075003)(74316002)(54356999)(76176999)(50986999)(4326007)(9686002)(122556002)(2900100001)(5660300001)(106116001)(92566002)(76576001)(229853002)(8936002)(77096006)(106356001)(6506004)(38730400001)(102836003)(101416001)(6116002)(3846002)(86362001)(3660700001)(39450400002)(3280700002)(39410400001)(33656002)(8676002)(97736004)(81166006)(81156014);DIR:OUT;SFP:1101;SCL:1;SRVR:DB6PR0401MB2632;H:DB6PR0401MB2631.eurprd04.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en;
Received-Spf None (protection.outlook.com: nxp.com does not designate permitted sender hosts)
Spamdiagnosticoutput 1:99
Spamdiagnosticmetadata NSPM
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-Originatororg nxp.com
X-Ms-Exchange-Crosstenant-Originalarrivaltime 02 Dec 2016 02:27:06.3428 (UTC)
X-Ms-Exchange-Crosstenant-Fromentityheader Hosted
X-Ms-Exchange-Crosstenant-ID 686ea1d3-bc2b-4c6f-a92c-d99c5c301635
X-Ms-Exchange-Transport-Crosstenantheadersstamped DB6PR0401MB2632
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 34
Organization linux.* mail to news gateway
X-Original-Cc "a.zummo@towertech.it" <a.zummo@towertech.it>, "rtc-linux@googlegroups.com" <rtc-linux@googlegroups.com>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
X-Original-Date Fri, 2 Dec 2016 02:27:06 +0000
X-Original-Message-ID <DB6PR0401MB26316D0BABB3652FB008D931EC8E0@DB6PR0401MB2631.eurprd04.prod.outlook.com>
X-Original-References <1477273336-48449-1-git-send-email-meng.yi@nxp.com> <DB6PR0401MB263163BD3E6AF420934DC6FAECA00@DB6PR0401MB2631.eurprd04.prod.outlook.com> <20161201003222.ih3lxuyfv7xyaget@piout.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1534619

Show key headers only | View raw


> > > +
> > > +static int nxp_ftm_rtc_read_time(struct device *dev, struct
> > > +rtc_time
> > > +*tm) {
> > > +	struct timeval time;
> > > +	unsigned long local_time;
> > > +
> > > +	do_gettimeofday(&time);
> > > +	local_time = (u32)(time.tv_sec - (sys_tz.tz_minuteswest * 60));
> > > +	rtc_time_to_tm(local_time, tm);
> > > +
> > > +	return 0;
> > > +}
> > > +
> >
> > This is not really getting time from the RTC since FTM is not a RTC
> > device, But we need to get the time to setup alarm, so we are using system
> time for now.
> > Anybody have better idea?
> >
> 
> No, that seems fine to me. I'll review the rest of the driver.

Thanks for your review, any feedback is welcomed!

> 
> 
> --
> Alexandre Belloni, Free Electrons
> Embedded Linux and Kernel engineering
> http://free-electrons.com

Meng

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH] rtc/nxp: add FTM alarm driver as the wakeup source Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-12-01 01:40 +0100
  RE: [RFC PATCH] rtc/nxp: add FTM alarm driver as the wakeup source Meng Yi <meng.yi@nxp.com> - 2016-12-02 03:30 +0100

csiph-web