From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752840AbbHENdy (ORCPT ); Wed, 5 Aug 2015 09:33:54 -0400 Received: from muru.com ([72.249.23.125]:41686 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751664AbbHENdr (ORCPT ); Wed, 5 Aug 2015 09:33:47 -0400 Date: Wed, 5 Aug 2015 06:33:44 -0700 From: Tony Lindgren To: Dmitry Torokhov Cc: Vignesh R , Wolfram Sang , Mika Westerberg , "Rafael J. Wysocki" , Ulf Hansson , Rob Herring , Mark Rutland , "linux-i2c@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] i2c: allow specifying separate wakeup interrupt in device tree Message-ID: <20150805133343.GL16878@atomide.com> References: <20150730201431.GA5255@dtor-ws> <55BB54B1.80603@ti.com> <20150803102121.GO16878@atomide.com> <20150803200246.GB38878@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150803200246.GB38878@dtor-ws> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dmitry Torokhov [150803 13:05]: > On Mon, Aug 03, 2015 at 03:21:21AM -0700, Tony Lindgren wrote: > > > > Hmm why do we need the check for if (device_can_wakeup(&client->dev)))? > > Because of the code in device_wakeup_attach_irq(): > > ws = dev->power.wakeup; > if (!ws) { > dev_err(dev, "forgot to call call device_init_wakeup?\n"); > return -EINVAL; > } OK :) > > Also wondering about the dev vs &client->dev usage here.. But I take > > you have checked that we end up calling the runtime PM calls of the > > client instead of the i2c bus controller :) > > dev *is* clent->dev in this context: > > struct i2c_client *client = i2c_verify_client(dev); OK thanks for confirming that. Regards, Tony