Re: [PATCH] power: reset: Add MAX77620 support

2017-01-29 Thread Sebastian Reichel
Hi, On Sun, Jan 29, 2017 at 12:47:57PM -0800, Guenter Roeck wrote: > On 01/29/2017 12:02 PM, Sebastian Reichel wrote: > > > > > > > To keep things simple, I think it would be okay to allow only one of > > > each type of controller in any running system. It's very unlikely that > > > board design

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-29 Thread Guenter Roeck
On 01/29/2017 12:02 PM, Sebastian Reichel wrote: To keep things simple, I think it would be okay to allow only one of each type of controller in any running system. It's very unlikely that board designers would devise two different ways of powering off or restarting a system, while in a similar

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-29 Thread Sebastian Reichel
Hi, On Fri, Jan 20, 2017 at 09:38:04AM +0100, Thierry Reding wrote: > On Thu, Jan 19, 2017 at 03:29:34PM -0800, Guenter Roeck wrote: > > On Fri, Jan 20, 2017 at 12:00:36AM +0100, Sebastian Reichel wrote: > > > Hi Thierry, > > > > > > > > > [...] > > > > > > > > > > Please use register_restart_han

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-20 Thread Guenter Roeck
On Fri, Jan 20, 2017 at 09:38:04AM +0100, Thierry Reding wrote: > > > > > No such thing exists for poweroff. Guenter also wrote something for > > > that [1], but Linus intervened [2]. Anyways, pm_power_off is at > > > least architecture independent. > > > > > That was by far the most frustrating

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-20 Thread Guenter Roeck
On 01/20/2017 05:11 AM, Thierry Reding wrote: On Fri, Jan 20, 2017 at 01:44:04PM +0100, Sebastian Reichel wrote: Hi, On Thu, Jan 19, 2017 at 03:29:34PM -0800, Guenter Roeck wrote: On Fri, Jan 20, 2017 at 12:00:36AM +0100, Sebastian Reichel wrote: I actually have a set of patches somewhere whic

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-20 Thread Sebastian Reichel
Hi, On Fri, Jan 20, 2017 at 02:11:16PM +0100, Thierry Reding wrote: > On Fri, Jan 20, 2017 at 01:44:04PM +0100, Sebastian Reichel wrote: > > Hi, > > > > On Thu, Jan 19, 2017 at 03:29:34PM -0800, Guenter Roeck wrote: > > > On Fri, Jan 20, 2017 at 12:00:36AM +0100, Sebastian Reichel wrote: > > > I

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-20 Thread Thierry Reding
On Fri, Jan 20, 2017 at 01:44:04PM +0100, Sebastian Reichel wrote: > Hi, > > On Thu, Jan 19, 2017 at 03:29:34PM -0800, Guenter Roeck wrote: > > On Fri, Jan 20, 2017 at 12:00:36AM +0100, Sebastian Reichel wrote: > > I actually have a set of patches somewhere which transforms the remaining > > direc

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-20 Thread Sebastian Reichel
Hi, On Thu, Jan 19, 2017 at 03:29:34PM -0800, Guenter Roeck wrote: > On Fri, Jan 20, 2017 at 12:00:36AM +0100, Sebastian Reichel wrote: > I actually have a set of patches somewhere which transforms the remaining > direct users of arm_pm_restart to use the framework (unless I removed it > from my t

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-20 Thread Thierry Reding
On Thu, Jan 19, 2017 at 03:29:34PM -0800, Guenter Roeck wrote: > On Fri, Jan 20, 2017 at 12:00:36AM +0100, Sebastian Reichel wrote: > > Hi Thierry, > > > > > > > [...] > > > > > > > > Please use register_restart_handler() instead. It has support for > > > > priorities, is not arm specific and prop

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-19 Thread Guenter Roeck
On Fri, Jan 20, 2017 at 12:00:36AM +0100, Sebastian Reichel wrote: > Hi Thierry, > > > > > [...] > > > > > > Please use register_restart_handler() instead. It has support for > > > priorities, is not arm specific and properly supports unregistering > > > (some handler with lower priority will take

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-19 Thread Sebastian Reichel
Hi Thierry, > > > [...] > > > > Please use register_restart_handler() instead. It has support for > > priorities, is not arm specific and properly supports unregistering > > (some handler with lower priority will take over). You can check > > gpio-restart as an example for the API. > > > > If you

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-19 Thread Thierry Reding
On Thu, Jan 12, 2017 at 11:05:05PM +0530, Laxman Dewangan wrote: > > On Thursday 12 January 2017 11:05 PM, Thierry Reding wrote: > > * PGP Signed by an unknown key > > > > On Thu, Jan 12, 2017 at 10:06:24PM +0530, Laxman Dewangan wrote: > > > On Thursday 12 January 2017 09:45 PM, Thierry Reding w

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-19 Thread Thierry Reding
On Fri, Jan 13, 2017 at 04:44:25AM +0100, Sebastian Reichel wrote: > On Thu, Jan 12, 2017 at 05:15:07PM +0100, Thierry Reding wrote: [...] > > + if (!of_property_read_bool(np, "system-power-controller")) > > + return 0; > > + > > + power = devm_kzalloc(&pdev->dev, sizeof(*power), GFP_

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-12 Thread Sebastian Reichel
Hi Thierry, I have a few comments inline. On Thu, Jan 12, 2017 at 05:15:07PM +0100, Thierry Reding wrote: > The Maxim MAX77620 PMIC has the ability to power off and restart the > system. Add a driver that supports power off (via pm_power_off()) and > restart (via arm_pm_restart() on 32-bit and 64

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-12 Thread Laxman Dewangan
On Thursday 12 January 2017 11:05 PM, Thierry Reding wrote: * PGP Signed by an unknown key On Thu, Jan 12, 2017 at 10:06:24PM +0530, Laxman Dewangan wrote: On Thursday 12 January 2017 09:45 PM, Thierry Reding wrote: + dev_dbg(&pdev->dev, "event recorder: %#x\n", value); + + syste

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-12 Thread Thierry Reding
On Thu, Jan 12, 2017 at 10:06:24PM +0530, Laxman Dewangan wrote: > > On Thursday 12 January 2017 09:45 PM, Thierry Reding wrote: > > From: Thierry Reding > > > > The Maxim MAX77620 PMIC has the ability to power off and restart the > > system. Add a driver that supports power off (via pm_power_of

Re: [PATCH] power: reset: Add MAX77620 support

2017-01-12 Thread Laxman Dewangan
On Thursday 12 January 2017 09:45 PM, Thierry Reding wrote: From: Thierry Reding The Maxim MAX77620 PMIC has the ability to power off and restart the system. Add a driver that supports power off (via pm_power_off()) and restart (via arm_pm_restart() on 32-bit and 64-bit ARM). Based on work by

[PATCH] power: reset: Add MAX77620 support

2017-01-12 Thread Thierry Reding
From: Thierry Reding The Maxim MAX77620 PMIC has the ability to power off and restart the system. Add a driver that supports power off (via pm_power_off()) and restart (via arm_pm_restart() on 32-bit and 64-bit ARM). Based on work by Chaitanya Bandi . Cc: Chaitanya Bandi Signed-off-by: Thierry