From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:34484 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751215AbcBMXDC (ORCPT ); Sat, 13 Feb 2016 18:03:02 -0500 Subject: Patch "i2c: rcar: disable runtime PM correctly in slave mode" has been added to the 4.3-stable tree To: wsa+renesas@sang-engineering.com, gregkh@linuxfoundation.org, wsa@the-dreams.de Cc: , From: Date: Sat, 13 Feb 2016 15:03:01 -0800 Message-ID: <1455404581208214@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled i2c: rcar: disable runtime PM correctly in slave mode to the 4.3-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: i2c-rcar-disable-runtime-pm-correctly-in-slave-mode.patch and it can be found in the queue-4.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From b4cd08aa1f53c831e67dc5c6bc9f9acff27abcba Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Wed, 16 Dec 2015 20:05:18 +0100 Subject: i2c: rcar: disable runtime PM correctly in slave mode From: Wolfram Sang commit b4cd08aa1f53c831e67dc5c6bc9f9acff27abcba upstream. When we also are I2C slave, we need to disable runtime PM because the address detection mechanism needs to be active all the time. However, we can reenable runtime PM once the slave instance was unregistered. So, use pm_runtime_get_sync/put to achieve this, since it has proper refcounting. pm_runtime_allow/forbid is like a global knob controllable from userspace which is unsuitable here. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/busses/i2c-rcar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/i2c/busses/i2c-rcar.c +++ b/drivers/i2c/busses/i2c-rcar.c @@ -575,7 +575,7 @@ static int rcar_reg_slave(struct i2c_cli if (slave->flags & I2C_CLIENT_TEN) return -EAFNOSUPPORT; - pm_runtime_forbid(rcar_i2c_priv_to_dev(priv)); + pm_runtime_get_sync(rcar_i2c_priv_to_dev(priv)); priv->slave = slave; rcar_i2c_write(priv, ICSAR, slave->addr); @@ -597,7 +597,7 @@ static int rcar_unreg_slave(struct i2c_c priv->slave = NULL; - pm_runtime_allow(rcar_i2c_priv_to_dev(priv)); + pm_runtime_put(rcar_i2c_priv_to_dev(priv)); return 0; } Patches currently in stable-queue which might be from wsa+renesas@sang-engineering.com are queue-4.3/i2c-rcar-disable-runtime-pm-correctly-in-slave-mode.patch