<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/rtc/rtc-mxc.c, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-08-23T20:33:38+00:00</updated>
<entry>
<title>rtc: mxc: Use devm_clk_get_enabled() helper</title>
<updated>2022-08-23T20:33:38+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2022-08-15T16:59:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25bcfaad5ec4e82aede4270d4925967f8520d4cf'/>
<id>urn:sha1:25bcfaad5ec4e82aede4270d4925967f8520d4cf</id>
<content type='text'>
The devm_clk_get_enabled() helper:
   - calls devm_clk_get()
   - calls clk_prepare_enable() and registers what is needed in order to
     call clk_disable_unprepare() when needed, as a managed resource.

This simplifies the code, the error handling paths and avoid the need of
a dedicated function used with devm_add_action_or_reset().

Based on my test with allyesconfig, this reduces the .o size from:
   text	   data	    bss	    dec	    hex	filename
   6705	   1968	      0	   8673	   21e1	drivers/rtc/rtc-mxc.o
down to:
   6212	   1968	      0	   8180	   1ff4	drivers/rtc/rtc-mxc.o

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/1b5ad1877304b01ddbba73ca615274a52f781aa2.1660582728.git.christophe.jaillet@wanadoo.fr
</content>
</entry>
<entry>
<title>rtc: mxc: Silence a clang warning</title>
<updated>2022-06-01T21:19:17+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@gmail.com</email>
</author>
<published>2022-05-26T01:14:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f78e3d407a339ffdd2620140300f821ea41118f4'/>
<id>urn:sha1:f78e3d407a339ffdd2620140300f821ea41118f4</id>
<content type='text'>
Change the of_device_get_match_data() cast to (uintptr_t)
to silence the following clang warning:

drivers/rtc/rtc-mxc.c:315:19: warning: cast to smaller integer type 'enum imx_rtc_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]

Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Fixes: ba7aa63000f2 ("rtc: mxc: use of_device_get_match_data")
Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20220526011459.1167197-1-festevam@gmail.com
</content>
</entry>
<entry>
<title>rtc: mxc: Remove unneeded of_match_ptr()</title>
<updated>2021-03-16T07:48:44+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@gmail.com</email>
</author>
<published>2021-03-15T23:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9346ff0bc6ff3c3a495d50a43b57df8fed7bc562'/>
<id>urn:sha1:9346ff0bc6ff3c3a495d50a43b57df8fed7bc562</id>
<content type='text'>
i.MX is a DT-only platform, so of_match_ptr() can be safely
removed.

Remove the unneeded of_match_ptr().

Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20210315235800.200137-1-festevam@gmail.com
</content>
</entry>
<entry>
<title>rtc: mxc: 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:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f2d30184773e408c4e6f9e15c350828e482480c'/>
<id>urn:sha1:3f2d30184773e408c4e6f9e15c350828e482480c</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-6-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='https://git.radix-linux.su/kernel/linux.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: use of_device_get_match_data</title>
<updated>2020-11-17T20:55:02+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2020-11-17T20:30:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba7aa63000f26c5a2c87d5a716601499a02a3156'/>
<id>urn:sha1:ba7aa63000f26c5a2c87d5a716601499a02a3156</id>
<content type='text'>
Use of_device_get_match_data to simplify mxc_rtc_probe.

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Reviewed-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Link: https://lore.kernel.org/r/20201117203035.1280099-1-alexandre.belloni@bootlin.com
</content>
</entry>
<entry>
<title>rtc: mxc: Convert the driver to DT-only</title>
<updated>2020-11-17T19:33:29+00:00</updated>
<author>
<name>Fabio Estevam</name>
<email>festevam@gmail.com</email>
</author>
<published>2020-11-16T18:03:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42882a8a22a86513c8c8c6bc7e0822bb14791999'/>
<id>urn:sha1:42882a8a22a86513c8c8c6bc7e0822bb14791999</id>
<content type='text'>
Since 5.10-rc1 i.MX is a devicetree-only platform, so simplify the code
by removing the unused non-DT support.

Signed-off-by: Fabio Estevam &lt;festevam@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Link: https://lore.kernel.org/r/20201116180326.5199-1-festevam@gmail.com
</content>
</entry>
<entry>
<title>rtc: mxc: Use devm_add_action_or_reset() for calls to clk_disable_unprepare()</title>
<updated>2020-03-22T21:10:41+00:00</updated>
<author>
<name>Anson Huang</name>
<email>Anson.Huang@nxp.com</email>
</author>
<published>2020-03-16T09:09:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fdc9f0eace99b288d5ef5cc7489699bf7b2d9e36'/>
<id>urn:sha1:fdc9f0eace99b288d5ef5cc7489699bf7b2d9e36</id>
<content type='text'>
Use devm_add_action_or_reset() for calls to clk_disable_unprepare(),
which can simplify the error handling, and .remove callback can be dropped.

Signed-off-by: Anson Huang &lt;Anson.Huang@nxp.com&gt;
Link: https://lore.kernel.org/r/1584349785-27042-1-git-send-email-Anson.Huang@nxp.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: mxc: use spin_lock_irqsave instead of spin_lock_irq in IRQ context</title>
<updated>2019-08-12T21:04:25+00:00</updated>
<author>
<name>Fuqian Huang</name>
<email>huangfq.daxian@gmail.com</email>
</author>
<published>2019-08-07T08:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b0a3fa44659ccee87215600b4235982bc0f3e828'/>
<id>urn:sha1:b0a3fa44659ccee87215600b4235982bc0f3e828</id>
<content type='text'>
As spin_unlock_irq will enable interrupts.
mxc_rtc_irq_enable is called from interrupt handler mxc_rtc_interrupt.
Interrupts are enabled in interrupt handler.
Use spin_lock_irqsave/spin_unlock_irqrestore instead of spin_(un)lock_irq
in IRQ context to avoid this.

Signed-off-by: Fuqian Huang &lt;huangfq.daxian@gmail.com&gt;
Link: https://lore.kernel.org/r/20190807082310.10135-1-huangfq.daxian@gmail.com
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
</content>
</entry>
<entry>
<title>rtc: mxc: use .set_time</title>
<updated>2019-04-29T13:53:43+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2019-04-16T08:30:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=02bc723579a8ec84c4a320985e9cae44b087d292'/>
<id>urn:sha1:02bc723579a8ec84c4a320985e9cae44b087d292</id>
<content type='text'>
Use .set_time instead of the deprecated .set_mmss64.

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