From patchwork Fri May 23 08:41:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 4229201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 26B689F1CD for ; Fri, 23 May 2014 08:44:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50AB3201ED for ; Fri, 23 May 2014 08:44:50 +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 5D6CE201EC for ; Fri, 23 May 2014 08:44:49 +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 1Wnl3E-0002U0-68; Fri, 23 May 2014 08:42:04 +0000 Received: from mail-bn1lp0139.outbound.protection.outlook.com ([207.46.163.139] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wnl3B-0002OU-5a for linux-arm-kernel@lists.infradead.org; Fri, 23 May 2014 08:42:01 +0000 Received: from BY2PR03CA037.namprd03.prod.outlook.com (10.242.234.158) by BY2PR03MB521.namprd03.prod.outlook.com (10.141.143.140) with Microsoft SMTP Server (TLS) id 15.0.944.11; Fri, 23 May 2014 08:41:37 +0000 Received: from BL2FFO11FD037.protection.gbl (2a01:111:f400:7c09::104) by BY2PR03CA037.outlook.office365.com (2a01:111:e400:2c2c::30) with Microsoft SMTP Server (TLS) id 15.0.944.11 via Frontend Transport; Fri, 23 May 2014 08:41:36 +0000 Received: from tx30smr01.am.freescale.net (192.88.168.1) by BL2FFO11FD037.mail.protection.outlook.com (10.173.161.133) with Microsoft SMTP Server (TLS) id 15.0.949.9 via Frontend Transport; Fri, 23 May 2014 08:41:36 +0000 Received: from dragon.ap.freescale.net ([10.192.185.13]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s4N8fVAw011803; Fri, 23 May 2014 01:41:33 -0700 From: Shawn Guo To: Thierry Reding Subject: [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm Date: Fri, 23 May 2014 16:41:28 +0800 Message-ID: <1400834488-2660-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)(189002)(199002)(4396001)(50466002)(46102001)(81342001)(86362001)(80022001)(19580405001)(47776003)(33646001)(74502001)(77982001)(50986999)(74662001)(102836001)(21056001)(31966008)(64706001)(99396002)(85852003)(87936001)(83322001)(26826002)(62966002)(83072002)(19580395003)(92566001)(92726001)(36756003)(6806004)(81542001)(44976005)(88136002)(77096999)(93916002)(76482001)(50226001)(79102001)(77156001)(89996001)(87286001)(20776003)(48376002); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR03MB521; H:tx30smr01.am.freescale.net; FPR:; MLV:ovrnspm; PTR:gate-tx3.freescale.com; MX:1; A: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-20140523_014201_339191_AE2DFAF5 X-CRM114-Status: UNSURE ( 6.83 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: Shawn Guo , linux-pwm@vger.kernel.org, Liu Ying , 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 imx_pwm_config() calls clk APIs like clk_prepare() and clk_get_rate(), which might sleep, so we need to set can_sleep flag on pwm_chip. Signed-off-by: Shawn Guo Acked-by: Uwe Kleine-König --- Changes since v1: - Set can_sleep flag for both imx_pwm_v1 and imx_pwm_v2 drivers/pwm/pwm-imx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c index d797c7b84c3f..5449d9150d40 100644 --- a/drivers/pwm/pwm-imx.c +++ b/drivers/pwm/pwm-imx.c @@ -262,6 +262,7 @@ static int imx_pwm_probe(struct platform_device *pdev) imx->chip.dev = &pdev->dev; imx->chip.base = -1; imx->chip.npwm = 1; + imx->chip.can_sleep = true; r = platform_get_resource(pdev, IORESOURCE_MEM, 0); imx->mmio_base = devm_ioremap_resource(&pdev->dev, r);