From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757669AbcDGVXU (ORCPT ); Thu, 7 Apr 2016 17:23:20 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:54312 "HELO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751673AbcDGVXT (ORCPT ); Thu, 7 Apr 2016 17:23:19 -0400 From: "Rafael J. Wysocki" To: Tony Lindgren , Grygorii Strashko Cc: linux-pm@vger.kernel.org, Pavel Machek , nsekhar@ti.com, nm@ti.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Len Brown , linux-omap@vger.kernel.org Subject: Re: [RFC PATCH] PM / wakeirq: fix wakeirq setting after wakup re-configuration from sysfs Date: Thu, 07 Apr 2016 23:25:50 +0200 Message-ID: <1664339.h6rI5IB9Xd@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/4.5.0-rc1+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160407175600.GN16484@atomide.com> References: <1459943153-2553-1-git-send-email-grygorii.strashko@ti.com> <20160407175600.GN16484@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, April 07, 2016 10:56:01 AM Tony Lindgren wrote: > * Grygorii Strashko [160406 04:47]: > > Now wakeirq stops working for device if wakeup option for > > this device will be reconfigured through sysfs, like: > > > > echo disabled > /sys/devices/platform/extcon_usb1/power/wakeup > > echo enabled > /sys/devices/platform/extcon_usb1/power/wakeup > > > > Once above set of commands is executed the device's wakeup_source > > opject will be recreated and dev->power.wakeup->wakeirq field will > > contain NULL. As result, device_wakeup_arm_wake_irqs() will not arm > > wakeirq for the affected device. > > > > Hece, lets try to fix it in the following way: > > check for dev->wakeirq field when device_wakeup_attach() is called > > and if !NULL re-attach wakeirq to the device > > Yeah I think that's all there is to it, thanks for fixing it: > > Acked-by: Tony Lindgren Applied, thanks!