27 Jan, 2017
1 commit
-
By using kernel_halt() instead of machine_halt(), we can make the driver
build as a module.
However, jz4740 platforms not loading this module will not be able to power
off.Suggested-by: Geert Uytterhoeven
Signed-off-by: Alexandre BelloniRevert "rtc: jz4740: make the driver builtin only"
This reverts commit b9168c539c0b2de756aaffd380384dbde8adbe07.
09 Nov, 2016
2 commits
-
Since the driver is now calling machine_halt() that is not exported, it has
to be built in the kernel. Building it as a module will fail at linking
time.Signed-off-by: Alexandre Belloni
-
jz4740_rtc_poweroff() is only called from the driver, stop exporting it.
Signed-off-by: Alexandre Belloni
05 Nov, 2016
3 commits
-
The 'system-power-controller' singleton entry can be used in the
devicetree node of the jz4740-rtc driver to specify that the driver is
granted the right to power off the system through the registers of the
RTC unit.See the documentation for more details:
Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txtSigned-off-by: Paul Cercueil
Acked-by: Maarten ter Huurne
Signed-off-by: Alexandre Belloni -
See
Documentation/devicetree/bindings/rtc/ingenic,jz4740-rtc.txt
for a description of the bindings.Signed-off-by: Paul Cercueil
Acked-by: Maarten ter Huurne
Signed-off-by: Alexandre Belloni -
The RTC unit present in the JZ4780 works mostly the same as the one in
the JZ4740. The major difference is that register writes need to be
explicitly enabled, by writing a magic code (0xA55A) to a "write
enable" register before each access.Signed-off-by: Paul Cercueil
Acked-by: Maarten ter Huurne
Signed-off-by: Alexandre Belloni
02 Sep, 2016
1 commit
-
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/)//
@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,&i@p,e3)
|
rtc_device_register(e1,e2,&i@p,e3)
|
platform_device_register_data(e1,e2,e3,&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 = { ... };
//Signed-off-by: Julia Lawall
Acked-by: Baruch Siach
Acked-by: Hans Ulli Kroll
Acked-by: Linus Walleij
Acked-by: Thierry Reding
Signed-off-by: Alexandre Belloni
20 Oct, 2014
1 commit
-
A platform_driver does not need to set an owner, it will be populated by the
driver core.Signed-off-by: Wolfram Sang
04 Apr, 2014
1 commit
-
Use devm_ioremap_resource() in order to make the code simpler, and move
'struct resource *mem' from 'struct jz4740_rtc' to jz4740_rtc_probe()
because the 'mem' variable is used only in jz4740_rtc_probe(). Also the
redundant return value check of platform_get_resource() is removed,
because the value is checked by devm_ioremap_resource().Signed-off-by: Jingoo Han
Cc: Lars-Peter Clausen
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Jul, 2013
2 commits
-
Use devm_*() functions to make cleanup paths simpler.
Signed-off-by: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The driver core clears the driver data to NULL after device_release or
on probe failure, since commit 0998d063100 ("device-core: Ensure drvdata
= NULL when no driver is bound"). Thus, it is not needed to manually
clear the device driver data to NULL.Signed-off-by: Jingoo Han
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Jan, 2013
1 commit
-
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.This change removes the use of __devinit, __devexit_p, __devinitdata,
__devinitconst, and __devexit from these drivers.Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.Cc: Bill Pemberton
Cc: Alessandro Zummo
Cc: Srinidhi Kasagar
Cc: Linus Walleij
Cc: Mike Frysinger
Cc: Wan ZongShun
Cc: Guan Xuetao
Cc: Mark Brown
Signed-off-by: Greg Kroah-Hartman
06 Oct, 2012
1 commit
-
The irq field of the jz4740_irc struct is unsigned. Yet we assign the
result of platform_get_irq() to it. platform_get_irq() may return a
negative error code and the code checks for this condition by checking if
'irq' is less than zero. But since 'irq' is unsigned this test will
always be false. Fix it by making 'irq' signed.The issue was found using the following coccinelle semantic patch:
//
@@
type T;
unsigned T i;
@@
(
*i < 0
|
*i >= 0
)
//Signed-off-by: Lars-Peter Clausen
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Jan, 2012
2 commits
-
Signed-off-by: Axel Lin
Cc: Lars-Peter Clausen
Cc: Alessandro Zummo
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch converts the drivers in drivers/rtc/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.Signed-off-by: Axel Lin
Acked-by: Mark Brown
Acked-by: Mike Frysinger
Acked-by: Guan Xuetao
Acked-by: Linus Walleij
Acked-by: Haojian Zhuang
Cc: Alessandro Zummo
Cc: Srinidhi Kasagar
Cc: Lars-Peter Clausen
Cc: Ben Dooks
Cc: John Stultz
Acked-by: Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Mar, 2011
1 commit
-
Now that the generic code handles UIE mode irqs via periodic
alarm interrupts, no one calls the
rtc_class_ops->update_irq_enable() method anymore.This patch removes the driver hooks and implementations of
update_irq_enable if no one else is calling it.CC: Thomas Gleixner
CC: Alessandro Zummo
CC: Marcelo Roberto Jimenez
CC: rtc-linux@googlegroups.com
Signed-off-by: John Stultz
28 Oct, 2010
1 commit
-
Add the "alarm" function to the jz4740 RTC. Interrupts will now be raised
when the "alarm" time is reached.[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Paul Cercueil
Cc: Wan ZongShun
Cc: Alessandro Zummo
Cc: Lars-Peter Clausen
Cc: Paul Gortmaker
Cc: Ralf Baechle
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 Aug, 2010
1 commit
-
Add support for the RTC unit on JZ4740 SoCs.
Signed-off-by: Lars-Peter Clausen
Cc: Alessandro Zummo
Cc: Paul Gortmaker
Cc: rtc-linux@googlegroups.com
Acked-by: Wan ZongShun
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: Alessandro Zummo ,
Patchwork: https://patchwork.linux-mips.org/patch/1424/
Signed-off-by: Ralf Baechle