From patchwork Mon Jul 21 08:36:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 4593791 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 445E4C0514 for ; Mon, 21 Jul 2014 08:39:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 546C12012D for ; Mon, 21 Jul 2014 08:39:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 301312011D for ; Mon, 21 Jul 2014 08:39:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X995j-0000yA-9R; Mon, 21 Jul 2014 08:37:03 +0000 Received: from mailout2.w1.samsung.com ([210.118.77.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X995g-0000t2-Lc for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2014 08:37:01 +0000 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N9100H71ZWGSV60@mailout2.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2014 09:36:16 +0100 (BST) X-AuditID: cbfec7f5-b7f626d000004b39-ab-53ccd110eaf0 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id B9.B9.19257.011DCC35; Mon, 21 Jul 2014 09:36:32 +0100 (BST) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N9100JHAZWSKO40@eusync1.samsung.com>; Mon, 21 Jul 2014 09:36:32 +0100 (BST) From: Krzysztof Kozlowski To: Russell King , Kukjin Kim , "Rafael J. Wysocki" , Daniel Lezcano , Sachin Kamat , Tushar Behera , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 1/3] cpuidle: exynos: Allow to use the driver without AFTR Date: Mon, 21 Jul 2014 10:36:09 +0200 Message-id: <1405931771-24100-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnluLIzCtJLcpLzFFi42I5/e/4ZV2Bi2eCDSb/MLTYOGM9q8W8z7IW r18YWvQuuMpmcbbpDbvFpsfXWC0u75rDZvG59wijxYzz+5gsbl/mtVh75C67xZnTl1gtrlw6 xWaxfsZrFov2v3vZHPg9Wpp72DzuXNvD5rF5Sb3HlqvtLB59W1YxenzeJBfAFsVlk5Kak1mW WqRvl8CV0XP4CHPBZfaK+6cmMTcwrmfrYuTgkBAwkfj/y72LkRPIFJO4cA8kzMUhJLCUUaLz 6xsop49JYv3qhSwgVWwCxhKbly8BS4gINDFLvFp+mg0kwSzwnFHi6fdwEFtYwEvicMN8dhCb RUBVYv+OK2A2r4C7xNfl05kh1slJnDw2mXUCI/cCRoZVjKKppckFxUnpuUZ6xYm5xaV56XrJ +bmbGCGB93UH49JjVocYBTgYlXh4OV6cChZiTSwrrsw9xCjBwawkwnsi40ywEG9KYmVValF+ fFFpTmrxIUYmDk6pBkaZYmF1haCPa7lO7soXf1i9s42vtLRSuPPPRB8XxXsP08y+NbwOZY2e 8narmHzeqTWrjaz+H59wpHmSjLlzrI5BdsVaxU2zJK47/lU05k3RjlBM7p7nGyDFpO/B6TXj y8zDDwpue/2+Kxvv6MOXHqA+gZUlOGw1L+N0qQ9zc1fsqHTjDzZar8RSnJFoqMVcVJwIAHJv 63AaAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140721_013700_848034_C7ED0913 X-CRM114-Status: GOOD ( 10.36 ) X-Spam-Score: -5.0 (-----) Cc: Krzysztof Kozlowski , Kyungmin Park , Bartlomiej Zolnierkiewicz , Tomasz Figa , Marek Szyprowski X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Allow the driver to be used when AFTR enter function is not provided (device platform data is NULL). This actually does not give any special energy-saving benefits but allows to track the idle time of each core. Additionally it is a safe way to validate supplied platform data. Signed-off-by: Krzysztof Kozlowski --- drivers/cpuidle/cpuidle-exynos.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/cpuidle/cpuidle-exynos.c b/drivers/cpuidle/cpuidle-exynos.c index 7c0151263828..5325a394be7e 100644 --- a/drivers/cpuidle/cpuidle-exynos.c +++ b/drivers/cpuidle/cpuidle-exynos.c @@ -77,7 +77,10 @@ static int exynos_cpuidle_probe(struct platform_device *pdev) { int ret; + /* If NULL enter only WFI */ exynos_enter_aftr = (void *)(pdev->dev.platform_data); + if (!exynos_enter_aftr) + exynos_idle_driver.state_count = 1; ret = cpuidle_register(&exynos_idle_driver, NULL); if (ret) {