Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp753176yba; Wed, 15 May 2019 09:20:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgAwqTNlaeIKauiNhSAsFOJsQQ70HSKaNKFrO6pK5UimFuMzcK7DkDUIHKeNCVZmlVhnMP X-Received: by 2002:a65:57ce:: with SMTP id q14mr31091735pgr.109.1557937205810; Wed, 15 May 2019 09:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557937205; cv=none; d=google.com; s=arc-20160816; b=pBSZmOsHg2OEUR60cSQsicgL7K9QZsCoo9WeNN9Hm193k1UmMmwThs1SCoaNeSIP7q ii5Fc8KIRhz9Wl0ipZJu0iECNeHeQlIkaL8LjkFjGZZkRE9euQjUwfO5wfc4hAcIOnly Pt6BThWc9ge8lMTyGM5nTaxqwHFCcY2rXURlRlBeZLVEVdas1ooay0ZQAATN+CZsSx1d ADYz1oD+5t4Z+VkOo2DFxaqM9fz6GneIspn10FN+9r6HbMdbNBtYxxlMtaTOzA0pm9UT buFEePXNgWwgf2QNzwkxV/Qn+r+9DZ+HxaSsrmfO7aQO68P3jckGnW1VfiQJtwpxZ9CH +2Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wKJWA2gYy8hkL7h9RJYBNbZLfdoFycnmyjs/dg+DBhI=; b=RBgd14F4ZiMFH+lWCYJnacsPauCXGbDLsW78mZ8SumaU/3ljrcORg2WkCsx2BEkYCb IRd475HdSpMV8/uDMswf+XY6ltlBDxmxaBZrv2csGmzMP9jv9wIb7vkita/zc9VqOXK0 SwF6BhDadSCot4dlj1b6Hp/ThcwPPQwOPgezLAtu9Ct1hNzhyd/HWNJh7oOYFNWmZs2d 3h1yPzNy9SnKGo49BMFK5/Uy5EE5Ytc8Knarj2EEx8XXNpJZHKS2bP1TCRhy3PTrNx8o C+/jom0IIRTU/aeSEqtm3neqy4qKBBS1GjiM4AftVpGD4OgE/eMe/8cFDkL/XjSYHbQS Ae4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nqADupGE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si2077543pgs.364.2019.05.15.09.19.50; Wed, 15 May 2019 09:20:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nqADupGE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727024AbfEOQSL (ORCPT + 99 others); Wed, 15 May 2019 12:18:11 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:45117 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbfEOQSL (ORCPT ); Wed, 15 May 2019 12:18:11 -0400 Received: by mail-qk1-f195.google.com with SMTP id j1so308708qkk.12 for ; Wed, 15 May 2019 09:18:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wKJWA2gYy8hkL7h9RJYBNbZLfdoFycnmyjs/dg+DBhI=; b=nqADupGETekpQGxSasrfeywHHy3SYg0lZm05IeXauZpYwkicj0KwonpEd1x2ET9RhQ 50LV0Qm23En3mVyamgg4DrsgqAIARvRC650+m7BvHXoYYg6AS5TI7cw/VUAKJN/17wgw HzrQ4/m4lX2iLB2MmUZPu1aHzEQS7j9t8fkSM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wKJWA2gYy8hkL7h9RJYBNbZLfdoFycnmyjs/dg+DBhI=; b=SF1rezyhOnRbUozhcV0S8R2TORupI5x5mk0+WhTvARkR+9+atYIdviZohbBTQHKWk0 f4CR1+w6dJrYc5hUiFAAd2a3usWzH3e7a315h9oZ9mxALrSw9AjDSVh73SLs8r2PRN0l 51a4UASJSNS2XaTRVXWjMbIt3gPvaMLJ5wtKYcS2398h7YMaK7eg0EbJYFdQDsmYpypG Jg6UNSIGfuH/dUIpzWU8Iu8I7evGwDt8l8Km9DVUK0JyaGGIvYAryXKm9WVr85zlFX0O 3cRQaQM0HoVQW+TY+aifo3KAgV+zZWgfPiEXz2V6TJrVT9SNtv4E1glqP9Z+Lx2zzywl kDig== X-Gm-Message-State: APjAAAVf8108I/SfN+drC90tzxnJwV1Um0Y4UDqgU8d/SY/vyB4XzXEw sEOi/yZ52sXoJ/8kT8fm9BnnRaXe/R5SJ+T/x+37IQ== X-Received: by 2002:a37:a5c6:: with SMTP id o189mr34016558qke.318.1557937090254; Wed, 15 May 2019 09:18:10 -0700 (PDT) MIME-Version: 1.0 References: <20190513220610.177489-1-ravisadineni@chromium.org> In-Reply-To: From: Ravi Chandra Sadineni Date: Wed, 15 May 2019 09:17:59 -0700 Message-ID: Subject: Re: [PATCH V1] elan_i2c: Increment wakeup count if wake source. To: Dmitry Torokhov Cc: =?UTF-8?B?5buW5bSH5qau?= , Benjamin Tissoires , Abhishek Bhardwaj , Todd Broch , lkml , "linux-input@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On Mon, May 13, 2019 at 4:29 PM Dmitry Torokhov wrote: > > Hi Ravi, > > On Mon, May 13, 2019 at 3:06 PM Ravi Chandra Sadineni > wrote: > > > > Notify the PM core that this dev is the wake source. This helps > > userspace daemon tracking the wake source to identify the origin of the > > wake. > > I wonder if we could do that form the i2c core instead of individual drivers? I am sorry, I don't see a way how this could be done. > > > > > Signed-off-by: Ravi Chandra Sadineni > > --- > > drivers/input/mouse/elan_i2c_core.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c > > index f9525d6f0bfe..2c0561e20b7f 100644 > > --- a/drivers/input/mouse/elan_i2c_core.c > > +++ b/drivers/input/mouse/elan_i2c_core.c > > @@ -981,6 +981,8 @@ static irqreturn_t elan_isr(int irq, void *dev_id) > > if (error) > > goto out; > > > > + pm_wakeup_event(dev, 0); > > + > > switch (report[ETP_REPORT_ID_OFFSET]) { > > case ETP_REPORT_ID: > > elan_report_absolute(data, report); > > -- > > 2.20.1 > > > > Thanks. > > -- > Dmitry Thanks, Ravi