From patchwork Fri May 23 05:48:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 4228181 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 224E6BF90B for ; Fri, 23 May 2014 05:52:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 557A820396 for ; Fri, 23 May 2014 05:52:00 +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 601F9201ED for ; Fri, 23 May 2014 05:51:59 +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 1WniLu-0004tu-1A; Fri, 23 May 2014 05:49:10 +0000 Received: from mail-by2lp0237.outbound.protection.outlook.com ([207.46.163.237] helo=na01-by2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WniLr-0004tN-5T for linux-arm-kernel@lists.infradead.org; Fri, 23 May 2014 05:49:08 +0000 Received: from BLUPR03CA033.namprd03.prod.outlook.com (10.141.30.26) by BLUPR03MB342.namprd03.prod.outlook.com (10.141.48.13) with Microsoft SMTP Server (TLS) id 15.0.944.11; Fri, 23 May 2014 05:48:44 +0000 Received: from BN1AFFO11FD023.protection.gbl (2a01:111:f400:7c10::169) by BLUPR03CA033.outlook.office365.com (2a01:111:e400:879::26) with Microsoft SMTP Server (TLS) id 15.0.949.11 via Frontend Transport; Fri, 23 May 2014 05:48:44 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.1) by BN1AFFO11FD023.mail.protection.outlook.com (10.58.52.83) with Microsoft SMTP Server (TLS) id 15.0.949.9 via Frontend Transport; Fri, 23 May 2014 05:48:43 +0000 Received: from dragon.ap.freescale.net ([10.192.185.223]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s4N5mcAg031113; Thu, 22 May 2014 22:48:39 -0700 From: Shawn Guo To: Thierry Reding Subject: [PATCH] pwm: imx: set can_sleep flag for imx_pwm_v2 Date: Fri, 23 May 2014 13:48:34 +0800 Message-ID: <1400824114-27148-1-git-send-email-shawn.guo@freescale.com> X-Mailer: git-send-email 1.8.3.2 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.168.1; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(199002)(189002)(79102001)(83322001)(62966002)(6806004)(50986999)(64706001)(87936001)(81342001)(93916002)(4396001)(92726001)(81542001)(86362001)(74502001)(21056001)(19580405001)(19580395003)(85852003)(92566001)(47776003)(44976005)(88136002)(87286001)(80022001)(74662001)(77096999)(102836001)(76482001)(33646001)(26826002)(50466002)(99396002)(77982001)(89996001)(77156001)(50226001)(83072002)(36756003)(20776003)(48376002)(31966008)(46102001); DIR:OUT; SFP:; SCL:1; SRVR:BLUPR03MB342; H:tx30smr01.am.freescale.net; FPR:; MLV:ovrnspm; PTR:gate-tx3.freescale.com; A:1; MX:1; LANG:en; MIME-Version: 1.0 X-Forefront-PRVS: 0220D4B98D Received-SPF: Fail (: domain of freescale.com does not designate 192.88.168.1 as permitted sender) receiver=; client-ip=192.88.168.1; helo=tx30smr01.am.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.168.1) smtp.mailfrom=Shawn.Guo@freescale.com; X-OriginatorOrg: freescale.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140522_224907_273045_2509CD28 X-CRM114-Status: UNSURE ( 6.36 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Shawn Guo , linux-pwm@vger.kernel.org, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 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 The .config() hook of imx_pwm_data_v2 calls clk_get_rate() which might sleep, so we need to set can_sleep flag on it. Signed-off-by: Shawn Guo --- drivers/pwm/pwm-imx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c index d797c7b84c3f..ab3809fb36a7 100644 --- a/drivers/pwm/pwm-imx.c +++ b/drivers/pwm/pwm-imx.c @@ -272,6 +272,9 @@ static int imx_pwm_probe(struct platform_device *pdev) imx->config = data->config; imx->set_enable = data->set_enable; + if (data == &imx_pwm_data_v2) + imx->chip.can_sleep = true; + ret = pwmchip_add(&imx->chip); if (ret < 0) return ret;