Commit graph

5 commits

Author SHA1 Message Date
Alexandre Belloni
06030d5001 rtc: mt2712: switch to devm_platform_ioremap_resource
Using devm_platform_ioremap_resource instead of open coding it reduces the
size of the binary.

   text	   data	    bss	    dec	    hex	filename
   3728	    216	      0	   3944	    f68	drivers/rtc/rtc-mt2712.o
   3744	    216	      0	   3960	    f78	drivers/rtc/rtc-mt2712.o.old

Link: https://lore.kernel.org/r/20200415200021.157118-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2020-04-18 22:42:04 +02:00
Alexandre Belloni
3642b17e9a rtc: mt2712: remove unnecessary error string
Remove the unnecessary error string as the core will already display error
messages when registration fails (i.e. never).

Link: https://lore.kernel.org/r/20200415200021.157118-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2020-04-18 22:42:03 +02:00
Markus Elfring
944ed452eb rtc: remove unnecessary error message after platform_get_irq
The function “platform_get_irq” can log an error already.
Thus omit redundant messages for the exception handling in the
calling functions.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Link: https://lore.kernel.org/r/04116352-b464-041c-1939-96440133aa6f@web.de
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2020-04-15 09:56:17 +02:00
Alexandre Belloni
30a790653d rtc: mt2712: fix build without PM_SLEEP
Fix this build error when PM_SLEEP is not selected:

drivers/rtc/rtc-mt2712.c:412:10: error: ‘mt2712_pm_ops’ undeclared here (not in a function); did you mean ‘mt2712_rtc_ops’?
  412 |   .pm = &mt2712_pm_ops,
      |          ^~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20200317143421.9551-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2020-03-17 15:34:47 +01:00
Ran Bi
64823360a8 rtc: add support for the MediaTek MT2712 RTC
This add support for the MediaTek MT2712 RTC. It was SoC based RTC, but
had different architecture compared with MT7622 RTC.

Signed-off-by: Ran Bi <ran.bi@mediatek.com>
Link: https://lore.kernel.org/r/20200226051303.22560-3-ran.bi@mediatek.com
Link: https://lore.kernel.org/r/20200316104701.209293-2-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2020-03-16 11:55:40 +01:00