<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/rtc/rtc-mxc_v2.c, branch docs-6.4-2</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.4-2</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=docs-6.4-2'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2022-12-15T22:34:31+00:00</updated>
<entry>
<title>rtc: mxc_v2: Add missing clk_disable_unprepare()</title>
<updated>2022-12-15T22:34:31+00:00</updated>
<author>
<name>GUO Zihua</name>
<email>guozihua@huawei.com</email>
</author>
<published>2022-11-22T08:50:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=55d5a86618d3b1a768bce01882b74cbbd2651975'/>
<id>urn:sha1:55d5a86618d3b1a768bce01882b74cbbd2651975</id>
<content type='text'>
The call to clk_disable_unprepare() is left out in the error handling of
devm_rtc_allocate_device. Add it back.

Fixes: 5490a1e018a4 ("rtc: mxc_v2: fix possible race condition")
Signed-off-by: GUO Zihua &lt;guozihua@huawei.com&gt;
Link: https://lore.kernel.org/r/20221122085046.21689-1-guozihua@huawei.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: mxc_v2: add missing MODULE_DEVICE_TABLE</title>
<updated>2021-05-24T22:33:17+00:00</updated>
<author>
<name>Bixuan Cui</name>
<email>cuibixuan@huawei.com</email>
</author>
<published>2021-05-08T03:15:09+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=206e04ec7539e7bfdde9aa79a7cde656c9eb308e'/>
<id>urn:sha1:206e04ec7539e7bfdde9aa79a7cde656c9eb308e</id>
<content type='text'>
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Signed-off-by: Bixuan Cui &lt;cuibixuan@huawei.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210508031509.53735-1-cuibixuan@huawei.com
</content>
</entry>
<entry>
<title>rtc: mxc_v2: Replace spin_lock_irqsave with spin_lock in hard IRQ</title>
<updated>2021-02-05T23:50:48+00:00</updated>
<author>
<name>Xiaofei Tan</name>
<email>tanxiaofei@huawei.com</email>
</author>
<published>2021-02-03T12:39:41+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0c1095d334dafda22463454b0519c926447b555e'/>
<id>urn:sha1:0c1095d334dafda22463454b0519c926447b555e</id>
<content type='text'>
It is redundant to do irqsave and irqrestore in hardIRQ context, where
it has been in a irq-disabled context.

Signed-off-by: Xiaofei Tan &lt;tanxiaofei@huawei.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/1612355981-6764-7-git-send-email-tanxiaofei@huawei.com
</content>
</entry>
<entry>
<title>rtc: rework rtc_register_device() resource management</title>
<updated>2020-11-19T11:50:12+00:00</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-11-09T16:34:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fdcfd854333be5b30377dc5daa9cd0fa1643a979'/>
<id>urn:sha1:fdcfd854333be5b30377dc5daa9cd0fa1643a979</id>
<content type='text'>
rtc_register_device() is a managed interface but it doesn't use devres
by itself - instead it marks an rtc_device as "registered" and the devres
callback for devm_rtc_allocate_device() takes care of resource release.

This doesn't correspond with the design behind devres where managed
structures should not be aware of being managed. The correct solution
here is to register a separate devres callback for unregistering the
device.

While at it: rename rtc_register_device() to devm_rtc_register_device()
and add it to the list of managed interfaces in devres.rst. This way we
can avoid any potential confusion of driver developers who may expect
there to exist a corresponding unregister function.

Signed-off-by: Bartosz Golaszewski &lt;bgolaszewski@baylibre.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201109163409.24301-8-brgl@bgdev.pl
</content>
</entry>
<entry>
<title>rtc: mxc_v2: use devm_platform_ioremap_resource() to simplify code</title>
<updated>2019-07-22T20:16:12+00:00</updated>
<author>
<name>Anson Huang</name>
<email>Anson.Huang@nxp.com</email>
</author>
<published>2019-07-17T08:12:17+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=874532cdeefefa4c531189ceaf57d05d2daafdbb'/>
<id>urn:sha1:874532cdeefefa4c531189ceaf57d05d2daafdbb</id>
<content type='text'>
Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang &lt;Anson.Huang@nxp.com&gt;
Link: https://lore.kernel.org/r/20190717081217.30518-1-Anson.Huang@nxp.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: mxc_v2: use dev_pm_set_wake_irq() to simplify code</title>
<updated>2019-04-11T21:18:33+00:00</updated>
<author>
<name>Anson Huang</name>
<email>anson.huang@nxp.com</email>
</author>
<published>2019-04-11T02:19:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fbc5ee9a6955e6e1a10b736856f9f8f8984ce809'/>
<id>urn:sha1:fbc5ee9a6955e6e1a10b736856f9f8f8984ce809</id>
<content type='text'>
With calling dev_pm_set_wake_irq() to set MXC_V2 RTC as wakeup source
for suspend, generic wake irq mechanism will automatically enable
it as wakeup source when suspend, then the suspend/resume callback
which are ONLY for enabling/disabling irq wake can be removed, it
simplifies the code.

Signed-off-by: Anson Huang &lt;Anson.Huang@nxp.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>headers: separate linux/mod_devicetable.h from linux/platform_device.h</title>
<updated>2018-07-07T15:52:26+00:00</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2018-06-20T05:47:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ac3167257b9fe16c9426c2087ead1c9f1b0992b1'/>
<id>urn:sha1:ac3167257b9fe16c9426c2087ead1c9f1b0992b1</id>
<content type='text'>
At over 4000 #includes, &lt;linux/platform_device.h&gt; is the 9th most
#included header file in the Linux kernel.  It does not need
&lt;linux/mod_devicetable.h&gt;, so drop that header and explicitly add
&lt;linux/mod_devicetable.h&gt; to source files that need it.

   4146 #include &lt;linux/platform_device.h&gt;

After this patch, there are 225 files that use &lt;linux/mod_devicetable.h&gt;,
for a reduction of around 3900 times that &lt;linux/mod_devicetable.h&gt;
does not have to be read &amp; parsed.

    225 #include &lt;linux/mod_devicetable.h&gt;

This patch was build-tested on 20 different arch-es.

It also makes these drivers SubmitChecklist#1 compliant.

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Reported-by: kbuild test robot &lt;lkp@intel.com&gt; # drivers/media/platform/vimc/
Reported-by: kbuild test robot &lt;lkp@intel.com&gt; # drivers/pinctrl/pinctrl-u300.c
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rtc: mxc_v2: use rtc_time64_to_tm in mxc_rtc_read_alarm</title>
<updated>2018-05-19T08:50:03+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-05-19T08:50:03+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=7e83f03fad3e404778fbcfb16f91a09aecf27e04'/>
<id>urn:sha1:7e83f03fad3e404778fbcfb16f91a09aecf27e04</id>
<content type='text'>
Use the 64-bit version of rtc_time_to_tm in mxc_rtc_read_alarm

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: mxc_v2: let the core handle rtc range</title>
<updated>2018-05-19T08:47:46+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-05-19T08:04:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=95fbfa14b431d4d7213b8e0e167563f7a11dd5e7'/>
<id>urn:sha1:95fbfa14b431d4d7213b8e0e167563f7a11dd5e7</id>
<content type='text'>
This RTC is a 32-bit second counter.

This also solves an issue where mxc_rtc_set_alarm() can return with the
lock taken.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: mxc_v2: fix possible race condition</title>
<updated>2018-05-19T08:47:46+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-05-19T08:01:42+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5490a1e018a4b447c1fdb49ec274a620e60a4d42'/>
<id>urn:sha1:5490a1e018a4b447c1fdb49ec274a620e60a4d42</id>
<content type='text'>
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.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
</feed>
