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: 4593681 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 07437C0514 for ; Mon, 21 Jul 2014 08:36:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 471D520120 for ; Mon, 21 Jul 2014 08:36:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 66F9520115 for ; Mon, 21 Jul 2014 08:36:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753350AbaGUIgh (ORCPT ); Mon, 21 Jul 2014 04:36:37 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:31028 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753036AbaGUIgg (ORCPT ); Mon, 21 Jul 2014 04:36:36 -0400 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>; 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 Cc: Kyungmin Park , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Tomasz Figa , Krzysztof Kozlowski 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 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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) {