Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-23 Thread Doug Berger
On 10/20/2017 05:54 PM, Gregory Fong wrote: > On Thu, Oct 19, 2017 at 11:39 AM, Doug Berger wrote: +static int brcmstb_gpio_resume(struct device *dev) +{ +struct brcmstb_gpio_priv *priv = dev_get_drvdata(dev); +struct brcmstb_gpio_bank *bank; +

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-23 Thread Doug Berger
On 10/20/2017 05:54 PM, Gregory Fong wrote: > On Thu, Oct 19, 2017 at 11:39 AM, Doug Berger wrote: +static int brcmstb_gpio_resume(struct device *dev) +{ +struct brcmstb_gpio_priv *priv = dev_get_drvdata(dev); +struct brcmstb_gpio_bank *bank; +u32 wake_mask =

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-20 Thread Gregory Fong
On Thu, Oct 19, 2017 at 11:39 AM, Doug Berger wrote: >>> +static int brcmstb_gpio_resume(struct device *dev) >>> +{ >>> +struct brcmstb_gpio_priv *priv = dev_get_drvdata(dev); >>> +struct brcmstb_gpio_bank *bank; >>> +u32 wake_mask = 0; >> >> This isn't really being

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-20 Thread Gregory Fong
On Thu, Oct 19, 2017 at 11:39 AM, Doug Berger wrote: >>> +static int brcmstb_gpio_resume(struct device *dev) >>> +{ >>> +struct brcmstb_gpio_priv *priv = dev_get_drvdata(dev); >>> +struct brcmstb_gpio_bank *bank; >>> +u32 wake_mask = 0; >> >> This isn't really being used as a mask,

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-19 Thread Doug Berger
On 10/19/2017 02:03 AM, Gregory Fong wrote: > Hi Doug, > > Nice description of the problem with dealing with a pending disabled > wake interrupt and the solution. A few remarks: > > On Fri, Sep 29, 2017 at 08:40:57PM -0700, Doug Berger wrote: >> diff --git a/drivers/gpio/gpio-brcmstb.c

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-19 Thread Doug Berger
On 10/19/2017 02:03 AM, Gregory Fong wrote: > Hi Doug, > > Nice description of the problem with dealing with a pending disabled > wake interrupt and the solution. A few remarks: > > On Fri, Sep 29, 2017 at 08:40:57PM -0700, Doug Berger wrote: >> diff --git a/drivers/gpio/gpio-brcmstb.c

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-19 Thread Gregory Fong
Hi Doug, Nice description of the problem with dealing with a pending disabled wake interrupt and the solution. A few remarks: On Fri, Sep 29, 2017 at 08:40:57PM -0700, Doug Berger wrote: > diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c > index 752a46ce3589..c964ed71a68d

Re: [PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-10-19 Thread Gregory Fong
Hi Doug, Nice description of the problem with dealing with a pending disabled wake interrupt and the solution. A few remarks: On Fri, Sep 29, 2017 at 08:40:57PM -0700, Doug Berger wrote: > diff --git a/drivers/gpio/gpio-brcmstb.c b/drivers/gpio/gpio-brcmstb.c > index 752a46ce3589..c964ed71a68d

[PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-09-29 Thread Doug Berger
This commit corrects problems with the previous wake implementation by implementing suspend and resume power management operations and the driver shutdown operation. Wake masks are used to keep track of which GPIO should wake the device. On suspend the GPIO state is saved and the possible wakeup

[PATCH 7/7] gpio: brcmstb: implement suspend/resume/shutdown

2017-09-29 Thread Doug Berger
This commit corrects problems with the previous wake implementation by implementing suspend and resume power management operations and the driver shutdown operation. Wake masks are used to keep track of which GPIO should wake the device. On suspend the GPIO state is saved and the possible wakeup