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: 351734 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 8B3EA140084 for ; Fri, 23 May 2014 15:48:47 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751957AbaEWFsq (ORCPT ); Fri, 23 May 2014 01:48:46 -0400 Received: from mail-bn1lp0141.outbound.protection.outlook.com ([207.46.163.141]:38179 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751944AbaEWFsq (ORCPT ); Fri, 23 May 2014 01:48:46 -0400 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 CC: , , , Shawn Guo 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 Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org 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;