summaryrefslogtreecommitdiffstats
path: root/drivers/power/reset
Commit message (Collapse)AuthorAgeFilesLines
...
| * | power: reset: gpio-restart: increase priority slightlyHeiko Stübner2015-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gpio-restart uses a priority of 128 and currently most soc-level restart mechanisms use the same - with some exceptions even using 192. But while the soc-level restarts are provided by the soc itself, gpio-restarts will most of the time be board-specfic and be used when some special board condition makes the soc-level restart only a second choice. The problem at hand manifested itself on the rk3288-veyron devices. While the soc-level restart can sucessfully restart all other rockchip boards I have, the veyron devices use an external restart mechanism that seems to not only reset the soc but also some external needed components. With both restart handlers having priority 128 in my tests the soc-specific variant took precedent in all cases. While it could restart the soc sucessfully in all cases, firmware then got an issue when talking to an external component, resulting in the device being put into recovery mode. So, give the board-specific restart handler a slight push and move it to priority 129 to make it more important than the generic soc-specific restart-handler. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * | power: reset: ltc2952: use _optional variant of devm_gpiod_getUwe Kleine-König2015-05-231-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_gpiod_get_optional returns NULL if devm_gpiod_get would return an ENOENT error pointer. There is no semantic change intended. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * | power: reset: gpio-poweroff: let devm_gpiod_get set direction of gpioUwe Kleine-König2015-05-231-17/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) which appeared in v3.17-rc1, the gpiod_get* functions take an additional parameter that allows to specify direction and initial value for output. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * | power: at91-reset: Constify platform_device_idKrzysztof Kozlowski2015-05-231-1/+1
| |/ | | | | | | | | | | | | | | | | The platform_device_id is not modified by the driver and core uses it as const. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | Merge branch 'linus' into timers/coreThomas Gleixner2015-05-192-2/+3
|\| | | | | | | | | Make sure the upstream fixes are applied before adding further modifications.
| * power: reset: Add MFD_SYSCON depends for brcmstbFlorian Fainelli2015-05-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | The Broadcom STB reboot driver depends on MFD_SYSCON, it uses syscon_regmap_lookup_by_phandle() which will not lookup syscon phandles if MFD_SYSCON is disabled, and instead will return -ENOSYS since it is turned into an inline stub. Fixes: 030494e75064c ("power: reset: Add reboot driver for brcmstb") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: reset: ltc2952: Remove bogus hrtimer_start() return value checksThomas Gleixner2015-04-301-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The return value of hrtimer_start() tells whether the timer was inactive or active already when hrtimer_start() was called. The code emits a bogus warning if the timer was active already claiming that the timer could not be started. Remove it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Sebastian Reichel <sre@kernel.org> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Frans Klaver <frans.klaver@xsens.com> Cc: "René Moll" <linux@r-moll.nl> Cc: Wolfram Sang <wsa@the-dreams.de> Cc: linux-pm@vger.kernel.org Acked-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power/reset: at91: fix return value check in at91_reset_platform_probe()Wei Yongjun2015-04-301-2/+2
| | | | | | | | | | | | | | | | | | | | In case of error, the function devm_ioremap() returns NULL not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: ecfe64d8c55f ("power: reset: Add AT91 reset driver") Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | power: reset: ltc2952: Remove bogus hrtimer_start() return value checksThomas Gleixner2015-04-231-16/+3
|/ | | | | | | | | | | | | | | | | | The return value of hrtimer_start() tells whether the timer was inactive or active already when hrtimer_start() was called. The code emits a bogus warning if the timer was active already claiming that the timer could not be started. Remove it along with the bogus comment in the else path. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Frans Klaver <frans.klaver@xsens.com> Cc: Sebastian Reichel <sre@kernel.org> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Wolfram Sang <wsa@the-dreams.de> Cc: linux-pm@vger.kernel.org
* power: reset: Add generic SYSCON register mapped poweroff.Moritz Fischer2015-04-063-0/+110
| | | | | | | Add a generic SYSCON register mapped poweroff mechanism. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: at91: big endian fixes for atsama5d3xBen Dooks2015-03-261-4/+4
| | | | | | | | Fix the passing of big endian data to routines that will be writing it to the bus in the wrong order. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: constify of_device_id arrayFabian Frederick2015-03-208-9/+9
| | | | | | | | | | | | 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/rmobile-reset.c: Fix !HAS_IOMEM buildRichard Weinberger2015-03-201-0/+1
| | | | | | | | | | | Fixes: drivers/power/reset/rmobile-reset.c: In function ‘rmobile_reset_probe’: drivers/power/reset/rmobile-reset.c:61:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration] iounmap(sysc_base2); Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: restart-poweroff: Remove arm dependenciesGuenter Roeck2015-01-252-2/+0
| | | | | | | | | This driver is now arm specific anymore, so there is no need to include an arm specific include file. Also drop unnecessary depencency on ARM from Kconfig. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: st-poweroff: Fix misleading Kconfig descriptionGuenter Roeck2015-01-251-2/+2
| | | | | | | | | The st-poweroff driver does not really power off the system but resets it, so Kconfig should not claim that the driver would handle power-off. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: st-poweroff: Register with kernel restart handlerGuenter Roeck2015-01-251-6/+11
| | | | | | | | | Register with kernel restart handler instead of setting arm_pm_restart directly. Select high priority since the restart handler is instantiated through devicetree, indicating that it should be used if configured. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: Remove sun6i reboot driverGuenter Roeck2015-01-253-92/+0
| | | | | | | | | sun6i restart is now handled by its watchdog driver directly, so this driver is no longer needed. 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: Register with kernel restart handlerGuenter Roeck2015-01-251-10/+18
| | | | | | | | | Register with kernel restart handler instead of setting arm_pm_restart directly. Register with high priority since the driver unconditionally overwrites other restart handlers if instantiated. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: arm-versatile: Register with kernel restart handlerGuenter Roeck2015-01-251-3/+14
| | | | | | | | | Register with kernel restart handler instead of setting arm_pm_restart directly. Select high priority since the restart handler is instantiated through devicetree, indicating that it should be used if configured. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: brcmstb: Add support for old 65nm chipsKevin Cernekee2015-01-221-0/+6
| | | | | | | | The register bit fields are a little different, so add an entry and a compatible string to accommodate them. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: brcmstb: Use the DT "compatible" string to indicate bit positionsKevin Cernekee2015-01-221-7/+28
| | | | | | | | | Some of the older chips used different bits to arm and trigger the reset. Add the infrastructure needed to specify this through the "compatible" string. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: brcmstb: Make the driver buildable on MIPSKevin Cernekee2015-01-221-5/+4
| | | | | | | | Now that the driver doesn't use any ARM-specific headers, it is safe to build on MIPS or with COMPILE_TEST. Signed-off-by: Kevin Cernekee <cernekee@gmail.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: Add reset driver for R-Mobile platformsGeert Uytterhoeven2015-01-213-0/+98
| | | | | | | | | | | | | | | | | Add a reset driver for Renesas R-Mobile and SH-Mobile SoCs. It registers a restart handler to trigger a soft power-on reset through the R-Mobile System Controller. The priority of this restart handler is 192, to allow a watchdog driver to use priority 128. Note that we do not use syscon-reboot, as the HPB (Peripheral Bus Bridge) semaphore should be acquired on systems where both the ARM and SH core are in use. The driver can be extended later to support this, when needed. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power/reset: vexpress: Remove non-DT codePawel Moll2015-01-211-14/+3
| | | | | | | | Now, as all VE platforms have to be booted with DT, the code handling non-DT case can be removed. Signed-off-by: Pawel Moll <pawel.moll@arm.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: make trigger input optionalFrans Klaver2015-01-201-32/+55
| | | | | | | | | | | | | | | | | Currently the ltc2952 supports only one button sequence to initiate powerdown. This is not always desirable, as even prolonged button presses can happen in use. Allow ltc2952 users to pick their own power down sequence, by making the trigger input optional. Since this still means that the ltc2952 may power down the platform if the power button is pressed for about 5 seconds, we still need to make sure to start the watchdog toggle to prolong the system power for as long as we need it. This will still allow the system to control power using the kill signal. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: check trigger value before starting timerFrans Klaver2015-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ltc2952_poweroff_handler it is theoretically possible that the timer fails to start on first pass (button press), but succeeds in starting on the second (button release). This will cause the button press to be misinterpreted, and will incorrectly shut down the system. Because a picture says more than a thousand words: Expected behavior: tmr: ++++++++++ btn: -----__________----- Faulty behavior: tmr: +++++ btn: -----__________----- Legend: + timer runs _ button pressed - button depressed To prevent this from happening, check the value of the gpio before starting the timer. If the button is active, we should start the timer, else we should stop it. The situation described can now still occur if the polarity of the input pin is set incorrectly, but that at least is predictable behavior and can be detected during the first tests. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: disable timers in _removeFrans Klaver2015-01-201-0/+2
| | | | | | | | Disable the timers when ltc2952_poweroff is removed. We don't want to risk calling functions on data that no longer exist. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: fix C++ style function pointersFrans Klaver2015-01-201-3/+3
| | | | | | | | | | | | The function pointers for the timers and pm_power_off are assigned with C++ style foo = &func; Let's change it instead to the more C style foo = func; Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: cleanup control flow in poweroff_handlerFrans Klaver2015-01-201-13/+5
| | | | | | | | | | | ltc2952_poweroff_handler uses gotos to return from the function. Since we don't do cleanups exiting this function, just return IRQ_HANDLED on the spot and be done with it. While at it, remove the variable 'ret'. It was never used very much. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: drop empty suspend/resume functionsFrans Klaver2015-01-201-13/+0
| | | | | | | | | | | | Documentation/SubmittingDrivers suggests these be implemented even when they do nothing. On the other hand, the platform code calls these functions 'legacy'. Suspend and resume operations should go into a pm_ops structure, pointed at by the driver's pm field. This approach would lead to a lot of boiler plate, while achieving nothing. Drop the functions instead. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: remove global variable poweroff_panicFrans Klaver2015-01-201-35/+22
| | | | | | | | | | | | As per Documentation/CodingStyle ch.4, we should keep global variables to a mininum. Move the panic state into the driver data, regardless of whether panic is a system state or not. This removes the need for the custom _init and _exit functions, so replace them with a call to the module_platform_driver() macro. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: reduce dependency on global variablesFrans Klaver2015-01-201-34/+41
| | | | | | | | | | | | | Documentation/CodingStyle ch.4 mentions in a side node that global variables should only be used if you really need them. Reduce the use of the global instance of ltc2952_poweroff so we may eventually remove it entirely. While at it, rename ltc2952_poweroff_data to ltc2952_poweroff, just to save that little bit of typing. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: prefer devm_gpiod_get over gpiod_getFrans Klaver2015-01-201-34/+10
| | | | | | | This reduces cleanup code and chance of errors. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: unroll gpio_desc arrayFrans Klaver2015-01-201-48/+38
| | | | | | | | | | The three gpio's used by this driver are stored in an array of pointers. This doesn't add much besides cleanups in a loop. In fact, it makes most of the usage sites harder to read. Unroll the loop, and live with the fact that cleanups become slightly larger. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: prefer devm_request_irq over request_irqFrans Klaver2015-01-201-13/+6
| | | | | | | | | | Make use of the fact that we allocated resources can be automatically deallocated. This reduces cleanup code and chance of errors. It also removes the need for the virq member of the ltc2952_poweroff_data struct. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: ltc2952: prefer devm_kzalloc over kzallocFrans Klaver2015-01-201-8/+3
| | | | | | | | Make use of the fact that the allocated resources can be automatically deallocated. This reduces cleanup code and chance of leaks. Signed-off-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* power: reset: augment versatile driver for integratorLinus Walleij2015-01-201-3/+29
| | | | | | | | | | | | Augment the Versatile reset driver to also handle the core module reset sequence used on the Integrator/AP and Integrator/CP. Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* Merge tag 'for-v3.19' of git://git.infradead.org/battery-2.6Linus Torvalds2014-12-157-61/+126
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull power supply updates from Sebastian Reichel:: "Power supply and reset changes for the v3.19 series - update power/reset drivers to use kernel restart handler - add power off driver for i.mx6 - add DT support for gpio-charger" * tag 'for-v3.19' of git://git.infradead.org/battery-2.6: power: reset: adjust priority of simple syscon reboot driver power: ds2782_battery: Simplify the PM hooks power/reset: brcmstb: Register with kernel restart handler power/reset: hisi: Register with kernel restart handler power/reset: keystone: Register with kernel restart handler power/reset: axxia: Register with kernel restart handler power/reset: xgene: Register with kernel restart handler power/reset: xgene: Use mdelay instead of jiffies based timeout power/reset: xgene: Use local variable dev instead of pdev->dev power/reset: xgene: Drop devm_kfree power/reset: xgene: Return -ENOMEM if out of memory power/reset: vexpress: Register with kernel restart handler power: reset: imx-snvs-poweroff: add power off driver for i.mx6 power: gpio-charger: add device tree support dt-bindings: document gpio-charger bindings
| * power: reset: adjust priority of simple syscon reboot driverStefan Agner2014-12-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, all restart handler use the priority 128, including watchdogs. Probably most SoC have a watchdog, and some of them register it also as a restart handler. But if a SoC specifies a dedicated reboot capability using this syscon driver, this is usually the preferred reboot method. Hence, raise the priority of this driver to 192. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power/reset: brcmstb: Register with kernel restart handlerGuenter Roeck2014-11-171-9/+19
| | | | | | | | | | | | | | | | Register with kernel restart handler instead of setting arm_pm_restart directly. Cc: Marc Carino <marc.ceeeee@gmail.com> Cc: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * power/reset: hisi: Register with kernel restart handlerGuenter Roeck2014-11-171-4/+16
| | | | | | | | | | | | | | Register with kernel restart handler instead of setting arm_pm_restart directly. Cc: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * power/reset: keystone: Register with kernel restart handlerGuenter Roeck2014-11-171-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Register with kernel restart handler instead of setting arm_pm_restart directly. Move notifier registration to the end of the probe function to avoid having to implement error handling. Cc: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * power/reset: axxia: Register with kernel restart handlerGuenter Roeck2014-11-171-6/+15
| | | | | | | | | | | | | | | | | | Register with kernel restart handler instead of setting arm_pm_restart directly. Cc: Anders Berg <anders.berg@lsi.com> Tested-by: Anders Berg <anders.berg@avagotech.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * power/reset: xgene: Register with kernel restart handlerGuenter Roeck2014-11-171-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Register with kernel restart handler instead of setting arm_pm_restart directly. This patch also addresses the following compile warning. drivers/power/reset/xgene-reboot.c: In function 'xgene_reboot_probe': drivers/power/reset/xgene-reboot.c:77:17: warning: assignment from incompatible pointer type [enabled by default] The warning was due to a mismatch between the type of arm_pm_restart and the restart function. Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * power/reset: xgene: Use mdelay instead of jiffies based timeoutGuenter Roeck2014-11-171-4/+2
| | | | | | | | | | | | | | | | jiffies are not running at this stage of system shutdown, meaning an error in the reset function would never be reported. Replace with mdelay(). Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * power/reset: xgene: Use local variable dev instead of pdev->devGuenter Roeck2014-11-171-7/+8
| | | | | | | | | | | | | | | | Using a local variable dev to point to the device is simpler then repeatedly dereferencing pdev->dev. Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * power/reset: xgene: Drop devm_kfreeGuenter Roeck2014-11-171-1/+0
| | | | | | | | | | | | | | Calling devm_kfree is unnecessary. Drop it. Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * power/reset: xgene: Return -ENOMEM if out of memoryGuenter Roeck2014-11-171-4/+2
| | | | | | | | | | | | | | | | | | It is customary to return an error code of -ENOMEM if the system is out of memory. Also, in that case, the infrastructure will report an error, so it is unnecessary to report it again. Cc: Loc Ho <lho@apm.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
| * power/reset: vexpress: Register with kernel restart handlerGuenter Roeck2014-11-171-10/+30
| | | | | | | | | | | | | | Use the kernel restart handler instead of setting arm_pm_restart directly. This allows for more than one restart handler in the system. Signed-off-by: Guenter Roeck <linux@roeck-us.net>