<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/rtc/rtc-mt6397.c, branch v4.14.217</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.14.217'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-01-17T18:45:44+00:00</updated>
<entry>
<title>rtc: mt6397: fix alarm register overwrite</title>
<updated>2020-01-17T18:45:44+00:00</updated>
<author>
<name>Ran Bi</name>
<email>ran.bi@mediatek.com</email>
</author>
<published>2019-12-11T09:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f1545409a5e179e4bc94a0fc28eebb61b2e1ff33'/>
<id>urn:sha1:f1545409a5e179e4bc94a0fc28eebb61b2e1ff33</id>
<content type='text'>
commit 653997eeecef95c3ead4fba1b2d27e6a5854d6cd upstream.

Alarm registers high byte was reserved for other functions.
This add mask in alarm registers operation functions.
This also fix error condition in interrupt handler.

Fixes: fc2979118f3f ("rtc: mediatek: Add MT6397 RTC driver")

Signed-off-by: Ran Bi &lt;ran.bi@mediatek.com&gt;
Signed-off-by: Hsin-Hsiung Wang &lt;hsin-hsiung.wang@mediatek.com&gt;
Link: https://lore.kernel.org/r/1576057435-3561-6-git-send-email-hsin-hsiung.wang@mediatek.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>rtc: mt6397: fix possible race condition</title>
<updated>2019-11-20T16:59:51+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-09-09T20:38:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9a7a5487408d0d0fb4a269085f36f1129f3b8538'/>
<id>urn:sha1:9a7a5487408d0d0fb4a269085f36f1129f3b8538</id>
<content type='text'>
[ Upstream commit babab2f86440352d24e76118fdd7d40cab5fd7bf ]

The IRQ is requested before the struct rtc is allocated and registered, but
this struct is used in the IRQ handler. This may lead to a NULL pointer
dereference.

Switch to devm_rtc_allocate_device/rtc_register_device to allocate the rtc
before requesting the IRQ.

Acked-by: Eddie Huang &lt;eddie.huang@mediatek.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>rtc: constify rtc_class_ops structures</title>
<updated>2016-09-01T23:24:06+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>julia.lawall@lip6.fr</email>
</author>
<published>2016-08-31T08:05:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=34c7b3ac4ccb6a972f81a4102c8ef216ca1fb155'/>
<id>urn:sha1:34c7b3ac4ccb6a972f81a4102c8ef216ca1fb155</id>
<content type='text'>
Check for rtc_class_ops structures that are only passed to
devm_rtc_device_register, rtc_device_register,
platform_device_register_data, all of which declare the corresponding
parameter as const.  Declare rtc_class_ops structures that have these
properties as const.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct rtc_class_ops i@p = { ... };

@ok@
identifier r.i;
expression e1,e2,e3,e4;
position p;
@@
(
devm_rtc_device_register(e1,e2,&amp;i@p,e3)
|
rtc_device_register(e1,e2,&amp;i@p,e3)
|
platform_device_register_data(e1,e2,e3,&amp;i@p,e4)
)

@bad@
position p != {r.p,ok.p};
identifier r.i;
@@
i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct rtc_class_ops i = { ... };
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Acked-by: Baruch Siach &lt;baruch@tkos.co.il&gt;
Acked-by: Hans Ulli Kroll &lt;ulli.kroll@googlemail.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: mt6397: Remove plaform module alias</title>
<updated>2016-03-14T16:08:26+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier@osg.samsung.com</email>
</author>
<published>2016-02-24T17:26:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=582841a4f66f64ed08450fcb8f716cacc51ac7d7'/>
<id>urn:sha1:582841a4f66f64ed08450fcb8f716cacc51ac7d7</id>
<content type='text'>
The driver uses the MODULE_ALIAS() macro to export a platform module alias
to allow the module to be autoloaded if the device is registered using the
legacy platform registration mechanism but the driver is always used by OF
only machines so the alias is not needed and should just be removed.

Suggested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: Fix module autoload for OF platform drivers</title>
<updated>2015-09-05T17:37:22+00:00</updated>
<author>
<name>Javier Martinez Canillas</name>
<email>javier@osg.samsung.com</email>
</author>
<published>2015-08-27T11:52:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=73798d5c41fdb434ccbeeec76afc8106869a98c3'/>
<id>urn:sha1:73798d5c41fdb434ccbeeec76afc8106869a98c3</id>
<content type='text'>
These platform drivers have a OF device ID table but the OF module
alias information is not created so module autoloading won't work.

Signed-off-by: Javier Martinez Canillas &lt;javier@osg.samsung.com&gt;
Acked-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: mt6397: implement suspend/resume function in rtc-mt6397 driver</title>
<updated>2015-09-05T11:19:08+00:00</updated>
<author>
<name>Henry Chen</name>
<email>henryc.chen@mediatek.com</email>
</author>
<published>2015-07-30T14:53:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d7f9777de884daf5721211bddfd21e7c8c156b17'/>
<id>urn:sha1:d7f9777de884daf5721211bddfd21e7c8c156b17</id>
<content type='text'>
Implement the suspend/resume function in order to control rtc's irq_wake flag and handle as wakeup source.

Signed-off-by: Henry Chen &lt;henryc.chen@mediatek.com&gt;
Acked-by: Eddie Huang &lt;eddie.huang@mediatek.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: mt6397: enable wakeup before registering rtc device</title>
<updated>2015-07-17T22:42:15+00:00</updated>
<author>
<name>Wei-Ning Huang</name>
<email>wnhuang@chromium.org</email>
</author>
<published>2015-07-02T08:36:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=baeca4495f53bd0c51c24e5467ef1a7ba5e17f6d'/>
<id>urn:sha1:baeca4495f53bd0c51c24e5467ef1a7ba5e17f6d</id>
<content type='text'>
rtc_sysfs_add_device checks if device can wakeup before creating the
wakealarm file in sysfs. Thus the driver must set wakeup capability
before registering the rtc device.

Signed-off-by: Wei-Ning Huang &lt;wnhuang@google.com&gt;
Acked-by: Eddie Huang &lt;eddie.huang@mediatek.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: mt6397: fix build on some 32bits platforms</title>
<updated>2015-06-24T23:13:36+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@free-electrons.com</email>
</author>
<published>2015-05-14T20:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9393996761e23280f259d706133c8f0cd139fd58'/>
<id>urn:sha1:9393996761e23280f259d706133c8f0cd139fd58</id>
<content type='text'>
On some !ARM 32bits platforms, the following compilation error happens
because of the division on a 64bits value in mtk_rtc_read_time():

drivers/built-in.o: In function `mtk_rtc_read_time':
rtc-mt6397.c:(.text+0x265d13f): undefined reference to `__divdi3'
rtc-mt6397.c:(.text+0x265d150): undefined reference to `__moddi3'

Use div_s64() as done in rtc_time64_to_tm() to solve that.

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Acked-by: Eddie Huang &lt;eddie.huang@mediatek.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
<entry>
<title>rtc: mediatek: Add MT6397 RTC driver</title>
<updated>2015-06-24T23:13:35+00:00</updated>
<author>
<name>Tianping Fang</name>
<email>tianping.fang@mediatek.com</email>
</author>
<published>2015-05-06T07:23:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fc2979118f3f5193475cb53d5df7bdaa7e358a42'/>
<id>urn:sha1:fc2979118f3f5193475cb53d5df7bdaa7e358a42</id>
<content type='text'>
Add Mediatek MT6397 RTC driver

Signed-off-by: Tianping Fang &lt;tianping.fang@mediatek.com&gt;
Signed-off-by: Eddie Huang &lt;eddie.huang@mediatek.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@free-electrons.com&gt;
</content>
</entry>
</feed>
