summaryrefslogtreecommitdiff
path: root/drivers/power/reset
AgeCommit message (Collapse)Author
2015-06-02power: reset: gpio-restart: increase priority slightlyHeiko Stübner
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>
2015-05-23power: reset: ltc2952: use _optional variant of devm_gpiod_getUwe Kleine-König
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>
2015-05-23power: reset: gpio-poweroff: let devm_gpiod_get set direction of gpioUwe Kleine-König
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>
2015-05-23power: at91-reset: Constify platform_device_idKrzysztof Kozlowski
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>
2015-05-19Merge branch 'linus' into timers/coreThomas Gleixner
Make sure the upstream fixes are applied before adding further modifications.
2015-05-01power: reset: Add MFD_SYSCON depends for brcmstbFlorian Fainelli
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>
2015-04-30power: reset: ltc2952: Remove bogus hrtimer_start() return value checksThomas Gleixner
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>
2015-04-30power/reset: at91: fix return value check in at91_reset_platform_probe()Wei Yongjun
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>
2015-04-23power: reset: ltc2952: Remove bogus hrtimer_start() return value checksThomas Gleixner
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
2015-04-06power: reset: Add generic SYSCON register mapped poweroff.Moritz Fischer
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>
2015-03-26power/reset: at91: big endian fixes for atsama5d3xBen Dooks
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>
2015-03-20power: constify of_device_id arrayFabian Frederick
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>
2015-03-20power/reset/rmobile-reset.c: Fix !HAS_IOMEM buildRichard Weinberger
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>
2015-01-25power/reset: restart-poweroff: Remove arm dependenciesGuenter Roeck
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>
2015-01-25power/reset: st-poweroff: Fix misleading Kconfig descriptionGuenter Roeck
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>
2015-01-25power/reset: st-poweroff: Register with kernel restart handlerGuenter Roeck
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>
2015-01-25power/reset: Remove sun6i reboot driverGuenter Roeck
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>
2015-01-25power/reset: at91: Register with kernel restart handlerGuenter Roeck
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>
2015-01-25power/reset: arm-versatile: Register with kernel restart handlerGuenter Roeck
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>
2015-01-22power/reset: brcmstb: Add support for old 65nm chipsKevin Cernekee
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>
2015-01-22power/reset: brcmstb: Use the DT "compatible" string to indicate bit positionsKevin Cernekee
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>
2015-01-22power/reset: brcmstb: Make the driver buildable on MIPSKevin Cernekee
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>
2015-01-21power/reset: at91-poweroff: Fix error handling and other compiler warningsGuenter Roeck
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>
2015-01-21power: reset: Add reset driver for R-Mobile platformsGeert Uytterhoeven
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>
2015-01-21power/reset: vexpress: Remove non-DT codePawel Moll
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>
2015-01-20power: reset: ltc2952: make trigger input optionalFrans Klaver
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>
2015-01-20power: reset: ltc2952: check trigger value before starting timerFrans Klaver
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>
2015-01-20power: reset: ltc2952: disable timers in _removeFrans Klaver
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>
2015-01-20power: reset: ltc2952: fix C++ style function pointersFrans Klaver
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>
2015-01-20power: reset: ltc2952: cleanup control flow in poweroff_handlerFrans Klaver
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>
2015-01-20power: reset: ltc2952: drop empty suspend/resume functionsFrans Klaver
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>
2015-01-20power: reset: ltc2952: remove global variable poweroff_panicFrans Klaver
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>
2015-01-20power: reset: ltc2952: reduce dependency on global variablesFrans Klaver
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>
2015-01-20power: reset: ltc2952: prefer devm_gpiod_get over gpiod_getFrans Klaver
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>
2015-01-20power: reset: ltc2952: unroll gpio_desc arrayFrans Klaver
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>
2015-01-20power: reset: ltc2952: prefer devm_request_irq over request_irqFrans Klaver
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>
2015-01-20power: reset: ltc2952: prefer devm_kzalloc over kzallocFrans Klaver
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>
2015-01-20power: reset: augment versatile driver for integratorLinus Walleij
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>
2014-12-15Merge tag 'for-v3.19' of git://git.infradead.org/battery-2.6Linus Torvalds
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
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-09Merge tag 'soc-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform changes from Arnd Bergmann: "New and updated SoC support, notable changes include: - bcm: brcmstb SMP support initial iproc/cygnus support - exynos: Exynos4415 SoC support PMU and suspend support for Exynos5420 PMU support for Exynos3250 pm related maintenance - imx: new LS1021A SoC support vybrid 610 global timer support - integrator: convert to using multiplatform configuration - mediatek: earlyprintk support for mt8127/mt8135 - meson: meson8 soc and l2 cache controller support - mvebu: Armada 38x CPU hotplug support drop support for prerelease Armada 375 Z1 stepping extended suspend support, now works on Armada 370/XP - omap: hwmod related maintenance prcm cleanup - pxa: initial pxa27x DT handling - rockchip: SMP support for rk3288 add cpu frequency scaling support - shmobile: r8a7740 power domain support various small restart, timer, pci apmu changes - sunxi: Allwinner A80 (sun9i) earlyprintk support - ux500: power domain support Overall, a significant chunk of changes, coming mostly from the usual suspects: omap, shmobile, samsung and mvebu, all of which already contain a lot of platform specific code in arch/arm" * tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (187 commits) ARM: mvebu: use the cpufreq-dt platform_data for independent clocks soc: integrator: Add terminating entry for integrator_cm_match ARM: mvebu: add SDRAM controller description for Armada XP ARM: mvebu: adjust mbus controller description on Armada 370/XP ARM: mvebu: add suspend/resume DT information for Armada XP GP ARM: mvebu: synchronize secondary CPU clocks on resume ARM: mvebu: make sure MMU is disabled in armada_370_xp_cpu_resume ARM: mvebu: Armada XP GP specific suspend/resume code ARM: mvebu: reserve the first 10 KB of each memory bank for suspend/resume ARM: mvebu: implement suspend/resume support for Armada XP clk: mvebu: add suspend/resume for gatable clocks bus: mvebu-mbus: provide a mechanism to save SDRAM window configuration bus: mvebu-mbus: suspend/resume support clocksource: time-armada-370-xp: add suspend/resume support irqchip: armada-370-xp: Add suspend/resume support ARM: add lolevel debug support for asm9260 ARM: add mach-asm9260 ARM: EXYNOS: use u8 for val[] in struct exynos_pmu_conf power: reset: imx-snvs-poweroff: add power off driver for i.mx6 ARM: imx: temporarily remove CONFIG_SOC_FSL from LS1021A ...
2014-12-03power: reset: adjust priority of simple syscon reboot driverStefan Agner
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>
2014-11-23power: reset: imx-snvs-poweroff: add power off driver for i.mx6Robin Gong
This driver register pm_power_off with snvs power off function. If your boards NOT use PMIC_ON_REQ to turn on/off external pmic, or use other pin to do, please disable the driver in dts, otherwise, your pm_power_off maybe overwrote by this driver. Signed-off-by: Robin Gong <b38343@freescale.com> Acked-By: Sebastian Reichel <sre@kernel.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
2014-11-17power/reset: brcmstb: Register with kernel restart handlerGuenter Roeck
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>
2014-11-17power/reset: hisi: Register with kernel restart handlerGuenter Roeck
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>
2014-11-17power/reset: keystone: Register with kernel restart handlerGuenter Roeck
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>
2014-11-17power/reset: axxia: Register with kernel restart handlerGuenter Roeck
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>
2014-11-17power/reset: xgene: Register with kernel restart handlerGuenter Roeck
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>
2014-11-17power/reset: xgene: Use mdelay instead of jiffies based timeoutGuenter Roeck
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>
2014-11-17power/reset: xgene: Use local variable dev instead of pdev->devGuenter Roeck
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>