From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 3/3] RFC: net: smsc911x: add wake-up event interrupt support Date: Mon, 11 Jul 2016 01:14:52 -0700 Message-ID: <20160711081451.GX28305@atomide.com> References: <1467968852-6175-1-git-send-email-linus.walleij@linaro.org> <1467968852-6175-3-git-send-email-linus.walleij@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, "David S . Miller" , Steve Glendinning , Guenter Roeck , Jeremy Linton , Kamlakant Patel , Pavel Fedin , Sudeep Holla , Alexandre Belloni , "Rafael J . Wysocki" , John Stultz , linux-omap@vger.kernel.org To: Linus Walleij Return-path: Received: from muru.com ([72.249.23.125]:57959 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030272AbcGKIO5 (ORCPT ); Mon, 11 Jul 2016 04:14:57 -0400 Content-Disposition: inline In-Reply-To: <1467968852-6175-3-git-send-email-linus.walleij@linaro.org> Sender: netdev-owner@vger.kernel.org List-ID: * Linus Walleij [160708 02:10]: > The SMSC911x have a line out of the chip called "PME", > Power Management Event. When connected to an asynchronous > interrupt controller this is able to wake the system up > from sleep in response to certain network events. Cool, so far have not found any boards here with that connected. Should be possible to solder that on at least omap3-evm at some point though. > +static irqreturn_t smsc911x_pme_irq_thread(int irq, void *dev_id) > +{ > + struct net_device *dev = dev_id; > + struct smsc911x_data *pdata __maybe_unused = netdev_priv(dev); > + > + SMSC_TRACE(pdata, pm, "wakeup event"); > + /* This signal is active for 50 ms, wait for it to deassert */ > + usleep_range(50000, 100000); > + return IRQ_HANDLED; > +} This probably adds an extra 50 ms latency before we wake up the smsc911x driver. Maybe we can eventually come up with some nice solution to that too. Anyways, no objections on my side for this patch as it provides a nice GPIO wakeirq test case that can be automated with just ping -c 1 :) Regards, Tony