Re: [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-07 Thread Ravi Chandra Sadineni
hi Merek, I tried booting a snow device and could not get it to boot it to the console. I assume i don't have right kernel config. Can you share your config if possible. Thanks, RaviOn Mon, Aug 6, 2018 at 4:05 PM Ravi Chandra Sadineni wrote: > > Hi Merek, > > Thanks for the

Re: [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-06 Thread Ravi Chandra Sadineni
M Marek Szyprowski > > wrote: > >> Hi Ravi, > >> > >> On 2018-08-03 18:53, Ravi Chandra Sadineni wrote: > >>> Understood. I am trying to reproduce this issue locally. Wanted to > >>> know the version of the kernel so I can give a try. Ma

Re: [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-03 Thread Ravi Chandra Sadineni
Understood. I am trying to reproduce this issue locally. Wanted to know the version of the kernel so I can give a try. Marek, can you please confirm the kernel version. Thanks, On Fri, Aug 3, 2018 at 9:08 AM Dmitry Torokhov wrote: > On Fri, Aug 3, 2018 at 8:51 AM Ravi Chandra Sadin

Re: [PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-08-03 Thread Ravi Chandra Sadineni
i Chandra Sadineni wrote: > > Remove the unnecessary check before calling pm_wakeup_event. If the > > device is not wake enabled, this call is no-op anyway. > > > > Signed-off-by: Ravi Chandra Sadineni > > This patch breaks suspend/resume on Samsung Exynos5250 Snow Ch

[PATCH V3] ACPI LID: increment wakeup count only when notified.

2018-06-27 Thread Ravi Chandra Sadineni
confuses user space deamons using wakeup_count to identify the potential system wakeup source. To avoid the confusion, only trigger acpi_pm_wakeup_event() in the acpi_button_notify() path and don't do that in the acpi_lid_initialize_state() path. Signed-off-by: Ravi Chandra Sadineni --- v3: Change

Re: [PATCH] ACPI LID: increment wakeup count only when notified.

2018-06-11 Thread Ravi Chandra Sadineni
Hi Rafael, Hopefully this will clear things a bit. 1. Why is this patch needed ? Consider the following scenario. 1. User left the device idle for some time. 2. A deamon in the userland that controls suspend policy might suspend the device. The lid is still open. 3. Now the

[PATCH V2] ACPI LID: increment wakeup count only when notified.

2018-06-11 Thread Ravi Chandra Sadineni
only when there is a FIXED_HARDWARE/NOTFIY_STATUS event. Signed-off-by: Ravi Chandra Sadineni --- V2: Increment the wakeup count only when the lid is open. drivers/acpi/button.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/button.c b/drivers

Re: [PATCH] power: Print wakeup_count instead of event_count in the sysfs attribute.

2018-06-07 Thread Ravi Chandra Sadineni
Hi Rafeal, Soft ping. Is this patch good to be merged ? Thanks, Ravi On Sun, Jun 3, 2018 at 10:14 AM, Ravi Chandra Sadineni wrote: > Hi Rafael, > > On Sun, Jun 3, 2018 at 1:05 AM, Rafael J. Wysocki wrote: >> On Sat, Jun 2, 2018 at 4:32 AM, Ravi Chandra Sadineni >> wr

[PATCH] Input: cros_ec_keyb: Remove check before calling pm_wakeup_event.

2018-06-05 Thread Ravi Chandra Sadineni
Remove the unnecessary check before calling pm_wakeup_event. If the device is not wake enabled, this call is no-op anyway. Signed-off-by: Ravi Chandra Sadineni --- drivers/input/keyboard/cros_ec_keyb.c | 30 ++- 1 file changed, 11 insertions(+), 19 deletions(-) diff

Re: [PATCH V2] i8042: Increment wakeup_count for the respective port.

2018-06-05 Thread Ravi Chandra Sadineni
On Tue, Jun 5, 2018 at 2:14 AM, Rafael J. Wysocki wrote: > On Mon, Jun 4, 2018 at 11:53 PM, Dmitry Torokhov > wrote: >> On Fri, Jun 01, 2018 at 06:07:08PM -0700, Ravi Chandra Sadineni wrote: >>> Call pm_wakeup_event on every irq. This should help us in identifying if >>

[PATCH V3] i8042: Increment wakeup_count for the respective port.

2018-06-05 Thread Ravi Chandra Sadineni
Call pm_wakeup_event on every irq. This should help us in identifying if keyboard was a potential wake reason for the last resume. Signed-off-by: Ravi Chandra Sadineni --- V3: Remove the unnecessary device_may_wakeup check. V2: Increment the wakeup count only when there is a irq and not when

[PATCH] ACPI LID: increment wakeup count only when notified.

2018-06-04 Thread Ravi Chandra Sadineni
only when there is a FIXED_HARDWARE/NOTFIY_STATUS event. Signed-off-by: Ravi Chandra Sadineni --- drivers/acpi/button.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index f1cc4f9d31cd9..d40fef7241f08 100644 --- a/drivers

Re: [PATCH] power: Print wakeup_count instead of event_count in the sysfs attribute.

2018-06-03 Thread Ravi Chandra Sadineni
Hi Rafael, On Sun, Jun 3, 2018 at 1:05 AM, Rafael J. Wysocki wrote: > On Sat, Jun 2, 2018 at 4:32 AM, Ravi Chandra Sadineni > wrote: >> Currently we show event_count instead of wakeup_count as part of per >> device wakeup_count sysfs attribute. Change it to wakeup_count

[PATCH] power: Print wakeup_count instead of event_count in the sysfs attribute.

2018-06-01 Thread Ravi Chandra Sadineni
Currently we show event_count instead of wakeup_count as part of per device wakeup_count sysfs attribute. Change it to wakeup_count to make it more meaningful. Signed-off-by: Ravi Chandra Sadineni --- drivers/base/power/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH V2] i8042: Increment wakeup_count for the respective port.

2018-06-01 Thread Ravi Chandra Sadineni
Call pm_wakeup_event on every irq. This should help us in identifying if keyboard was a potential wake reason for the last resume. Signed-off-by: Ravi Chandra Sadineni --- V2: Increment the wakeup count only when there is a irq and not when the method is called internally. drivers/input/serio

[PATCH] i8042: Increment wakeup_count for the respective port.

2018-06-01 Thread Ravi Chandra Sadineni
Call pm_wakeup_event on every irq. This should help us in identifying if i8042 port was a potential wake reason for the last resume. Signed-off-by: Ravi Chandra Sadineni --- drivers/input/serio/i8042.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/serio/i8042.c b/drivers

[PATCH V2] cros_ec_keyb: Mark cros_ec_keyb driver as wake enabled device.

2018-05-25 Thread Ravi Chandra Sadineni
Mark cros_ec_keyb has wake enabled by default. If we see a MKBP event related to keyboard, call pm_wakeup_event() to make sure wakeup triggers are accounted to keyb during suspend resume path. Signed-off-by: Ravi Chandra Sadineni <ravisadin...@chromium.org> --- V2: Marked the ckdev a

[PATCH] cros_ec_keyb: Increment the wakeup count to the specific mfd device.

2018-05-23 Thread Ravi Chandra Sadineni
If the IRQ is processed during resume, increment the wakeup count to the specific mfd device based on the event, if the mfd device is wake enabled. This helps in identifying the specific device that caused the wake. Signed-off-by: Ravi Chandra Sadineni <ravisadin...@chromium.org> --- d

Re: [PATCH V5] USB: Increment wakeup count on remote wakeup.

2018-04-21 Thread Ravi Chandra Sadineni
Sure. Pushing it to the older kernels will definitely help. Thanks, Ravi On Sat, Apr 21, 2018 at 1:59 AM, Greg KH <gre...@linuxfoundation.org> wrote: > On Fri, Apr 20, 2018 at 11:08:21AM -0700, Ravi Chandra Sadineni wrote: >> On chromebooks we depend on wakeup count to identify th

Re: [PATCH V3] USB: Increment wakeup count on remote wakeup.

2018-04-20 Thread Ravi Chandra Sadineni
On Fri, Apr 20, 2018 at 10:29 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Fri, 20 Apr 2018, Ravi Chandra Sadineni wrote: > >> On chromebooks we depend on wakeup count to identify the wakeup source. >> But currently USB devices do not increment the wakeup co

[PATCH V5] USB: Increment wakeup count on remote wakeup.

2018-04-20 Thread Ravi Chandra Sadineni
Notification to the host (USB3.0 spec section 8.5.6.4) Thus on receiving the Function Wake, increment the wakeup count. Signed-off-by: Ravi Chandra Sadineni <ravisadin...@chromium.org> --- V5: Added the description of changes between different versions of patches. V4: Moved the wakeup count increment

[PATCH V4] USB: Increment wakeup count on remote wakeup.

2018-04-20 Thread Ravi Chandra Sadineni
Notification to the host (USB3.0 spec section 8.5.6.4) Thus on receiving the Function Wake, increment the wakeup count. Signed-off-by: Ravi Chandra Sadineni <ravisadin...@chromium.org> --- drivers/usb/core/hcd.c | 1 + drivers/usb/core/hub.c | 10 +- 2 files changed, 10 insertions(+), 1 de

Re: [PATCH V2] USB: Increment wakeup count on remote wakeup.

2018-04-20 Thread Ravi Chandra Sadineni
On Fri, Apr 20, 2018 at 7:12 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Thu, 19 Apr 2018, Ravi Chandra Sadineni wrote: > >> On chromebooks we depend on wakeup count to identify the wakeup source. >> But currently USB devices do not increment the wakeup co

[PATCH V3] USB: Increment wakeup count on remote wakeup.

2018-04-20 Thread Ravi Chandra Sadineni
Notification to the host (USB3.0 spec section 8.5.6.4) Thus on receiving the Function Wake, increment the wakeup count. Signed-off-by: Ravi Chandra Sadineni <ravisadin...@chromium.org> --- drivers/usb/core/hcd.c | 2 ++ drivers/usb/core/hub.c | 10 +- 2 files changed, 11 insertions(+), 1 de

Re: [PATCH] USB: Increment wakeup count on remote wakeup.

2018-04-19 Thread Ravi Chandra Sadineni
Hi Alan, Thanks for reviewing the change. Appreciate your time. I tried to address your comments in the V2 of the patch. On Thu, Apr 19, 2018 at 8:01 AM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Wed, 18 Apr 2018, Ravi Chandra Sadineni wrote: > >> On chromebooks w

[PATCH V2] USB: Increment wakeup count on remote wakeup.

2018-04-19 Thread Ravi Chandra Sadineni
Notification to the host (USB3.0 spec section 8.5.6.4) Thus on receiving the Function Wake, increment the wakeup count. Signed-off-by: Ravi Chandra Sadineni <ravisadin...@chromium.org> --- drivers/usb/core/hcd.c | 2 ++ drivers/usb/core/hub.c | 10 +- 2 files changed, 11 insertions(+), 1 de

[PATCH] USB: Increment wakeup count on remote wakeup.

2018-04-18 Thread Ravi Chandra Sadineni
On chromebooks we depend on wakeup count to identify the wakeup source. But currently USB devices do not increment the wakeup count when they trigger the remote wake. This patch addresses the same. Resume condition is reported differently on USB 2.0 and USB 3.0 devices. On USB 2.0 devices, a