From patchwork Mon Mar 25 05:50:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 2328951 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 2ECD53FD8C for ; Mon, 25 Mar 2013 05:50:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756306Ab3CYFuL (ORCPT ); Mon, 25 Mar 2013 01:50:11 -0400 Received: from mail-pb0-f53.google.com ([209.85.160.53]:51294 "EHLO mail-pb0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755419Ab3CYFuK (ORCPT ); Mon, 25 Mar 2013 01:50:10 -0400 Received: by mail-pb0-f53.google.com with SMTP id un1so3972506pbc.12 for ; Sun, 24 Mar 2013 22:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:sender:message-id:from:to:cc:in-reply-to:references :from:subject:mime-version:content-type; bh=SnrrSmPE0OObKeH5Hon/CRI0PAPgbrNbji3qugrbM4s=; b=KI8nN5ZSEDSgHlGyX3Wq7QWwdj2eBsRD2nU68oVXQgvAqjlEeq7mrJXUohKeLwmw+N w5t5NGfL1r7hRL1nfBkUvym40HC8hDl4F0cgimLJ0cswdOqwMKOLCH01gcffMc2DA1yN XCcqdh3Zk6TUvxwa6m9GTKtoU6bu2Eg+IJU1cj62GK02eZqtpJyeOZILpLWlmIlXiRlv 1nAeRe+ywwS14oqC266fwq/hzPC3hgBqvpDxB5hW1Ic5CtFXpELzrJ30qXzEm3NsGtxr 378LZz+K4G7iOnB8T7BegjgNLddD5fMz4BKswBJAHlyYBmswyufpVFyE5qmlPdHwvcA7 jWiQ== X-Received: by 10.66.227.228 with SMTP id sd4mr16193211pac.38.1364190610146; Sun, 24 Mar 2013 22:50:10 -0700 (PDT) Received: from morimoto-Dell-XPS420.gmail.com (49.14.32.202.bf.2iij.net. [202.32.14.49]) by mx.google.com with ESMTPS id ij15sm13451774pac.4.2013.03.24.22.50.07 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 24 Mar 2013 22:50:09 -0700 (PDT) Date: Sun, 24 Mar 2013 22:50:09 -0700 (PDT) Message-ID: <8738vkqb8y.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Zhang Rui Cc: Simon , Magnus , linux-pm@vger.kernel.org, Kuninori Morimoto In-Reply-To: <87620gqbbe.wl%kuninori.morimoto.gx@renesas.com> References: <87620gqbbe.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 2/2] thermal: rcar: add pm_runtime_xxx() support MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Current rcar_thermal() didn't care about own power. Without this patch, rcar_thermal doesn't work on APE6 board Signed-off-by: Kuninori Morimoto --- drivers/thermal/rcar_thermal.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c index 359e943..c40404f 100644 --- a/drivers/thermal/rcar_thermal.c +++ b/drivers/thermal/rcar_thermal.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -411,6 +412,9 @@ static int rcar_thermal_probe(struct platform_device *pdev) idle = 0; /* polling delaye is not needed */ } + pm_runtime_enable(dev); + pm_runtime_get_sync(dev); + for (i = 0;; i++) { res = platform_get_resource(pdev, IORESOURCE_MEM, mres++); if (!res) @@ -465,6 +469,9 @@ error_unregister: rcar_thermal_irq_disable(priv); } + pm_runtime_put_sync(dev); + pm_runtime_disable(dev); + return -ENODEV; } @@ -481,6 +488,9 @@ static int rcar_thermal_remove(struct platform_device *pdev) platform_set_drvdata(pdev, NULL); + pm_runtime_put_sync(dev); + pm_runtime_disable(dev); + return 0; }