<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/rtc/rtc-mxc_v2.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-03-17T22:03:17Z</updated>
<entry>
<title>rtc: mxc_v2: Convert to platform remove callback returning void</title>
<updated>2023-03-17T22:03:17Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-03-04T13:30:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=153f56f9ce99495ca4cb6d7f2047c29940aef9f5'/>
<id>urn:sha1:153f56f9ce99495ca4cb6d7f2047c29940aef9f5</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20230304133028.2135435-21-u.kleine-koenig@pengutronix.de
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: mxc_v2: Add missing clk_disable_unprepare()</title>
<updated>2022-12-15T22:34:31Z</updated>
<author>
<name>GUO Zihua</name>
<email>guozihua@huawei.com</email>
</author>
<published>2022-11-22T08:50:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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:17Z</updated>
<author>
<name>Bixuan Cui</name>
<email>cuibixuan@huawei.com</email>
</author>
<published>2021-05-08T03:15:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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:48Z</updated>
<author>
<name>Xiaofei Tan</name>
<email>tanxiaofei@huawei.com</email>
</author>
<published>2021-02-03T12:39:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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:12Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bgolaszewski@baylibre.com</email>
</author>
<published>2020-11-09T16:34:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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:12Z</updated>
<author>
<name>Anson Huang</name>
<email>Anson.Huang@nxp.com</email>
</author>
<published>2019-07-17T08:12:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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:33Z</updated>
<author>
<name>Anson Huang</name>
<email>anson.huang@nxp.com</email>
</author>
<published>2019-04-11T02:19:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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:26Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2018-06-20T05:47:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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:03Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-05-19T08:50:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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:46Z</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2018-05-19T08:04:46Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/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>
</feed>
