- 20 3月, 2015 2 次提交
-
-
由 Fabian Frederick 提交于
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: NFabian Frederick <fabf@skynet.be> [for vexpress] Acked-by: NSudeep Holla <sudeep.holla@arm.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Richard 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: NRichard Weinberger <richard@nod.at> Acked-by: NGeert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 26 1月, 2015 6 次提交
-
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Guenter Roeck 提交于
sun6i restart is now handled by its watchdog driver directly, so this driver is no longer needed. Signed-off-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 22 1月, 2015 4 次提交
-
-
由 Kevin Cernekee 提交于
The register bit fields are a little different, so add an entry and a compatible string to accommodate them. Signed-off-by: NKevin Cernekee <cernekee@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Kevin 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: NKevin Cernekee <cernekee@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Kevin 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: NKevin Cernekee <cernekee@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 21 1月, 2015 2 次提交
-
-
由 Geert 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: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Pawel Moll 提交于
Now, as all VE platforms have to be booted with DT, the code handling non-DT case can be removed. Signed-off-by: NPawel Moll <pawel.moll@arm.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 20 1月, 2015 13 次提交
-
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans Klaver 提交于
This reduces cleanup code and chance of errors. Signed-off-by: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Frans 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: NFrans Klaver <frans.klaver@xsens.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Linus 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: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 04 12月, 2014 1 次提交
-
-
由 Stefan 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: NStefan Agner <stefan@agner.ch> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NMark Rutland <mark.rutland@arm.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 23 11月, 2014 1 次提交
-
-
由 Robin 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: NRobin Gong <b38343@freescale.com> Acked-By: NSebastian Reichel <sre@kernel.org> Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
-
- 17 11月, 2014 11 次提交
-
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Register with kernel restart handler instead of setting arm_pm_restart directly. Cc: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter 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: NSantosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: NIvan Khoronzhuk <ivan.khoronzhuk@ti.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Register with kernel restart handler instead of setting arm_pm_restart directly. Cc: Anders Berg <anders.berg@lsi.com> Tested-by: NAnders Berg <anders.berg@avagotech.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter 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: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
Calling devm_kfree is unnecessary. Drop it. Cc: Loc Ho <lho@apm.com> Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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: NGuenter Roeck <linux@roeck-us.net>
-
由 Guenter Roeck 提交于
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: NGuenter Roeck <linux@roeck-us.net>
-
由 Robin 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: NRobin Gong <b38343@freescale.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-