summaryrefslogtreecommitdiffstats
path: root/drivers/power/reset/at91-poweroff.c
Commit message (Collapse)AuthorAgeFilesLines
* power/reset: at91-poweroff: get and use slow clockAlexandre Belloni2015-09-221-0/+15
| | | | | | | | | | | | Commit dca1a4b5ff6e ("clk: at91: keep slow clk enabled to prevent system hang") added a workaround for the slow clock as it is not properly handled by its users. Get and use the slow clock as it is necessary for the at91 shutdown controller. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: at91-poweroff: allow compiling as a moduleAlexandre Belloni2015-09-221-3/+15
| | | | | | | | | It was not possible to compile at91-poweroff as a module. Implement .remove() to allow it. Also switch to module_platform_driver_probe() as it is not hotpluggable. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: constify of_device_id arrayFabian Frederick2015-03-201-1/+1
| | | | | | | | | | | | of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> [for vexpress] Acked-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: at91-poweroff: Fix error handling and other compiler warningsGuenter Roeck2015-01-211-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | at91_poweroff_get_wakeup_mode can return a negative error code and should therefore not return an enum type. Similar, its result should not be assigned to an enum type. Otherwise, the returned value is never negative, resulting in a compiler warning and a missed error condition, which in turn results in writing bad values into a chip register. Also fix other compiler warnings which can be easily avoided. drivers/power/reset/at91-poweroff.c:74:24: warning: type qualifiers ignored on function return type drivers/power/reset/at91-poweroff.c:74:24: warning: no previous prototype for 'at91_poweroff_get_wakeup_mode' drivers/power/reset/at91-poweroff.c:83:16: warning: comparison between signed and unsigned integer expressions drivers/power/reset/at91-poweroff.c:97:2: warning: comparison of unsigned expression < 0 is always false Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: at91-poweroff: fix wakeup status register indexNicolas Ferre2014-09-011-1/+1
| | | | | | | The wakeup status is read from Shutdown Status Register and not the SHDW_CR which is the one at address 0. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
* power: reset: Add AT91 poweroff driverMaxime Ripard2014-07-151-0/+156
Add a driver to handle the shutdown of the Atmel SoCs. This code used to be (and still is) in arch/arm/mach-at91. We didn't remove it yet so that we can convert all the boards to using this driver, before removing it entirely in a separate patch. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>