1. 28 Oct, 2014 2 commits
  2. 15 Oct, 2014 1 commit
  3. 05 Oct, 2014 1 commit
  4. 03 Oct, 2014 2 commits
  5. 01 Oct, 2014 3 commits
  6. 26 Sep, 2014 14 commits
    • Pramod Gurav's avatar
      power: reset: use restart_notifier mechanism for msm-poweroff · 18a702e0
      Pramod Gurav authored
      This change replaces use of arm_pm_restart with recently introduced
      reset mechanism in Linux kernel called restart_notifier.
      
      Choosing priority 128, which is default priority, as according to
      documentation, this mechanism is sufficient to restart the entire system.
      
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Josh Cartwright <joshc@codeaurora.org>
      Cc: Sebastian Reichel <sre@kernel.org>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: linux-pm@vger.kernel.org
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarPramod Gurav <pramod.gurav@smartplayin.com>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      18a702e0
    • David Riley's avatar
      power: Add simple gpio-restart driver · 371bb20d
      David Riley authored
      This driver registers a restart handler to set a GPIO line high/low
      to reset a board based on devicetree bindings.
      Signed-off-by: default avatarDavid Riley <davidriley@chromium.org>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      371bb20d
    • Sebastian Reichel's avatar
      Merge tag 'tags/restart-handler-for-v3.18' into next · 1670d856
      Sebastian Reichel authored
      Immutable branch with restart handler patches for v3.18
      1670d856
    • Lee Jones's avatar
    • Lee Jones's avatar
      power: reset: Add restart functionality for STiH41x platforms · f0745f36
      Lee Jones authored
      This driver adds the restart functionality for STiH415 and STiH416
      platforms from STMicroelectronics.  This driver registers an
      arm_pm_restart function to reset the platform.
      Signed-off-by: default avatarChristophe Kerello <christophe.kerello@st.com>
      Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      f0745f36
    • Krzysztof Kozlowski's avatar
      power: charger-manager: Fix NULL pointer exception with missing cm-fuel-gauge · 661a8886
      Krzysztof Kozlowski authored
      NULL pointer exception happens during charger-manager probe if
      'cm-fuel-gauge' property is not present.
      
      [    2.448536] Unable to handle kernel NULL pointer dereference at virtual address 00000000
      [    2.456572] pgd = c0004000
      [    2.459217] [00000000] *pgd=00000000
      [    2.462759] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
      [    2.468047] Modules linked in:
      [    2.471089] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.17.0-rc6-00251-ge44cf96cd525-dirty #969
      [    2.479765] task: ea890000 ti: ea87a000 task.ti: ea87a000
      [    2.485161] PC is at strcmp+0x4/0x30
      [    2.488719] LR is at power_supply_match_device_by_name+0x10/0x1c
      [    2.494695] pc : [<c01f4220>]    lr : [<c030fe38>]    psr: a0000113
      [    2.494695] sp : ea87bde0  ip : 00000000  fp : eaa97010
      [    2.506150] r10: 00000004  r9 : ea97269c  r8 : ea3bbfd0
      [    2.511360] r7 : eaa97000  r6 : c030fe28  r5 : 00000000  r4 : ea3b0000
      [    2.517869] r3 : 0000006d  r2 : 00000000  r1 : 00000000  r0 : c057c195
      [    2.524381] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
      [    2.531671] Control: 10c5387d  Table: 4000404a  DAC: 00000015
      [    2.537399] Process swapper/0 (pid: 1, stack limit = 0xea87a240)
      [    2.543388] Stack: (0xea87bde0 to 0xea87c000)
      [    2.547733] bde0: ea3b0210 c026b1c8 eaa97010 eaa97000 eaa97010 eabb60a8 ea3b0210 00000000
      [    2.555891] be00: 00000008 ea2db210 ea1a3410 c030fee0 ea3bbf90 c03138fc c068969c c013526c
      [    2.564050] be20: eaa040c0 00000000 c068969c 00000000 eaa040c0 ea2da300 00000002 00000000
      [    2.572208] be40: 00000001 ea2da3c0 00000000 00000001 00000000 eaa97010 c068969c 00000000
      [    2.580367] be60: 00000000 c068969c 00000000 00000002 00000000 c026b71c c026b6f0 eaa97010
      [    2.588527] be80: c0e82530 c026a330 00000000 eaa97010 c068969c eaa97044 00000000 c061df50
      [    2.596686] bea0: ea87a000 c026a4dc 00000000 c068969c c026a448 c0268b5c ea8054a8 eaa8fd50
      [    2.604845] bec0: c068969c ea2db180 c06801f8 c0269b18 c0590f68 c068969c c0656c98 c068969c
      [    2.613004] bee0: c0656c98 ea3bbe40 c06988c0 c026aaf0 00000000 c0656c98 c0656c98 c00088a4
      [    2.621163] bf00: 00000000 c0055f48 00000000 00000004 00000000 ea890000 c05dbc54 c062c178
      [    2.629323] bf20: c0603518 c005f674 00000001 ea87a000 eb7ff83b c0476440 00000091 c003d41c
      [    2.637482] bf40: c05db344 00000007 eb7ff858 00000007 c065a76c c0647d24 00000007 c062c170
      [    2.645642] bf60: c06988c0 00000091 c062c178 c0603518 00000000 c0603cc4 00000007 00000007
      [    2.653801] bf80: c0603518 c0c0c0c0 00000000 c0453948 00000000 00000000 00000000 00000000
      [    2.661959] bfa0: 00000000 c0453950 00000000 c000e728 00000000 00000000 00000000 00000000
      [    2.670118] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
      [    2.678277] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 c0c0c0c0 c0c0c0c0
      [    2.686454] [<c01f4220>] (strcmp) from [<c030fe38>] (power_supply_match_device_by_name+0x10/0x1c)
      [    2.695303] [<c030fe38>] (power_supply_match_device_by_name) from [<c026b1c8>] (class_find_device+0x54/0xac)
      [    2.705106] [<c026b1c8>] (class_find_device) from [<c030fee0>] (power_supply_get_by_name+0x1c/0x30)
      [    2.714137] [<c030fee0>] (power_supply_get_by_name) from [<c03138fc>] (charger_manager_probe+0x3d8/0xe58)
      [    2.723683] [<c03138fc>] (charger_manager_probe) from [<c026b71c>] (platform_drv_probe+0x2c/0x5c)
      [    2.732532] [<c026b71c>] (platform_drv_probe) from [<c026a330>] (driver_probe_device+0x10c/0x224)
      [    2.741384] [<c026a330>] (driver_probe_device) from [<c026a4dc>] (__driver_attach+0x94/0x98)
      [    2.749813] [<c026a4dc>] (__driver_attach) from [<c0268b5c>] (bus_for_each_dev+0x54/0x88)
      [    2.757969] [<c0268b5c>] (bus_for_each_dev) from [<c0269b18>] (bus_add_driver+0xd4/0x1d0)
      [    2.766123] [<c0269b18>] (bus_add_driver) from [<c026aaf0>] (driver_register+0x78/0xf4)
      [    2.774110] [<c026aaf0>] (driver_register) from [<c00088a4>] (do_one_initcall+0x80/0x1bc)
      [    2.782276] [<c00088a4>] (do_one_initcall) from [<c0603cc4>] (kernel_init_freeable+0x100/0x1cc)
      [    2.790952] [<c0603cc4>] (kernel_init_freeable) from [<c0453950>] (kernel_init+0x8/0xec)
      [    2.799029] [<c0453950>] (kernel_init) from [<c000e728>] (ret_from_fork+0x14/0x2c)
      [    2.806572] Code: e12fff1e e1a03000 eafffff7 e4d03001 (e4d12001)
      [    2.812832] ---[ end trace 7f12556111b9e7ef ]---
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Cc: <stable@vger.kernel.org>
      Fixes: 856ee611 ("charger-manager: Support deivce tree in charger manager driver")
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      661a8886
    • Guenter Roeck's avatar
      arm/arm64: unexport restart handlers · 6cd6d94d
      Guenter Roeck authored
      Implementing a restart handler in a module don't make sense as there would
      be no guarantee that the module is loaded when a restart is needed.
      Unexport arm_pm_restart to ensure that no one gets the idea to do it
      anyway.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jonas Jensen <jonas.jensen@gmail.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      6cd6d94d
    • Guenter Roeck's avatar
      watchdog: sunxi: register restart handler with kernel restart handler · d20a1d90
      Guenter Roeck authored
      The kernel core now provides an API to trigger a system restart.  Register
      with it instead of setting arm_pm_restart.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jonas Jensen <jonas.jensen@gmail.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      d20a1d90
    • Guenter Roeck's avatar
      watchdog: alim7101: register restart handler with kernel restart handler · 87ffc69e
      Guenter Roeck authored
      The kernel core now provides an API to trigger a system restart.  Register
      with it to restart the system instead of misusing the reboot notifier.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jonas Jensen <jonas.jensen@gmail.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      87ffc69e
    • Guenter Roeck's avatar
      watchdog: moxart: register restart handler with kernel restart handler · ad0e0e68
      Guenter Roeck authored
      The kernel now provides an API to trigger a system restart.  Register with
      it instead of setting arm_pm_restart.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jonas Jensen <jonas.jensen@gmail.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      ad0e0e68
    • Guenter Roeck's avatar
      arm: support restart through restart handler call chain · 1a9607a3
      Guenter Roeck authored
      The kernel core now supports a restart handler call chain for system
      restart functions.
      
      With this change, the arm_pm_restart callback is now optional, so drop its
      initialization and check if it is set before calling it.  Only call the
      kernel restart handler if arm_pm_restart is not set.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jonas Jensen <jonas.jensen@gmail.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      1a9607a3
    • Guenter Roeck's avatar
      arm64: support restart through restart handler call chain · 1c7ffc32
      Guenter Roeck authored
      The kernel core now supports a restart handler call chain to restart the
      system.  Call it if arm_pm_restart is not set.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jonas Jensen <jonas.jensen@gmail.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      1c7ffc32
    • Guenter Roeck's avatar
      power/restart: call machine_restart instead of arm_pm_restart · 0713e143
      Guenter Roeck authored
      machine_restart is supported on non-ARM platforms, and and ultimately
      calls arm_pm_restart, so dont call arm_pm_restart directly but use the
      more generic function.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jonas Jensen <jonas.jensen@gmail.com>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      0713e143
    • Guenter Roeck's avatar
      kernel: add support for kernel restart handler call chain · b63adb97
      Guenter Roeck authored
      Various drivers implement architecture and/or device specific means to
      restart (reset) the system.  Various mechanisms have been implemented to
      support those schemes.  The best known mechanism is arm_pm_restart, which
      is a function pointer to be set either from platform specific code or from
      drivers.  Another mechanism is to use hardware watchdogs to issue a reset;
      this mechanism is used if there is no other method available to reset a
      board or system.  Two examples are alim7101_wdt, which currently uses the
      reboot notifier to trigger a reset, and moxart_wdt, which registers the
      arm_pm_restart function.
      
      The existing mechanisms have a number of drawbacks.  Typically only one
      scheme to restart the system is supported (at least if arm_pm_restart is
      used).  At least in theory there can be multiple means to restart the
      system, some of which may be less desirable (for example one mechanism may
      only reset the CPU, while another may reset the entire system).  Using
      arm_pm_restart can also be racy if the function pointer is set from a
      driver, as the driver may be in the process of being unloaded when
      arm_pm_restart is called.  Using the reboot notifier is always racy, as it
      is unknown if and when other functions using the reboot notifier have
      completed execution by the time the watchdog fires.
      
      Introduce a system restart handler call chain to solve the described
      problems.  This call chain is expected to be executed from the
      architecture specific machine_restart() function.  Drivers providing
      system restart functionality (such as the watchdog drivers mentioned
      above) are expected to register with this call chain.  By using the
      priority field in the notifier block, callers can control restart handler
      execution sequence and thus ensure that the restart handler with the
      optimal restart capabilities for a given system is called first.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Wim Van Sebroeck <wim@iguana.be>
      Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Jonas Jensen <jonas.jensen@gmail.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Tomasz Figa <t.figa@samsung.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      b63adb97
  7. 25 Sep, 2014 1 commit
    • Krzysztof Kozlowski's avatar
      power: max14577: Fix circular config SYSFS dependency · 6a91e854
      Krzysztof Kozlowski authored
      Make the max14577 charger driver depending on SYSFS instead selecting
      it. This fixes warning on x86_64 with allmodconfig:
      
      scripts/kconfig/conf --allmodconfig Kconfig
      fs/sysfs/Kconfig:1:error: recursive dependency detected!
      fs/sysfs/Kconfig:1:	symbol SYSFS is selected by CHARGER_MAX14577
      drivers/power/Kconfig:327:	symbol CHARGER_MAX14577 depends on POWER_SUPPLY
      drivers/power/Kconfig:1:	symbol POWER_SUPPLY is selected by HID_SONY
      drivers/hid/Kconfig:638:	symbol HID_SONY depends on NEW_LEDS
      drivers/leds/Kconfig:8:	symbol NEW_LEDS is selected by SENSORS_APPLESMC
      drivers/hwmon/Kconfig:299:	symbol SENSORS_APPLESMC depends on HWMON
      drivers/hwmon/Kconfig:5:	symbol HWMON is selected by EEEPC_LAPTOP
      drivers/platform/x86/Kconfig:496:	symbol EEEPC_LAPTOP depends on HOTPLUG_PCI
      drivers/pci/hotplug/Kconfig:5:	symbol HOTPLUG_PCI depends on SYSFS
      Signed-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
      6a91e854
  8. 24 Sep, 2014 13 commits
  9. 16 Sep, 2014 3 commits