From patchwork Fri Jan 25 10:01:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Vaussard X-Patchwork-Id: 2042541 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id C3FFB3FD1A for ; Fri, 25 Jan 2013 10:05:19 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tyg7h-0004vT-7J; Fri, 25 Jan 2013 10:03:02 +0000 Received: from slb-mail0.epfl.ch ([2001:620:618:1e0:1:80b2:e059:1] helo=smtp4.epfl.ch) by merlin.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1Tyg6q-0004Yv-9C for linux-arm-kernel@lists.infradead.org; Fri, 25 Jan 2013 10:02:09 +0000 Received: (qmail 5594 invoked by uid 107); 25 Jan 2013 10:02:01 -0000 X-Virus-Scanned: ClamAV Received: from lsro1pc340.epfl.ch (HELO lsro1pc340.epfl.ch) (128.178.145.154) (authenticated) by smtp4.epfl.ch (AngelmatoPhylax SMTP proxy) with ESMTPA; Fri, 25 Jan 2013 11:02:01 +0100 From: Florian Vaussard To: Bryan Wu , Richard Purdie , Thierry Reding Subject: [PATCH 2/3] pwm: Add can_sleep property to drivers Date: Fri, 25 Jan 2013 11:01:53 +0100 Message-Id: <1359108114-16998-3-git-send-email-florian.vaussard@epfl.ch> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1359108114-16998-1-git-send-email-florian.vaussard@epfl.ch> References: <1359108114-16998-1-git-send-email-florian.vaussard@epfl.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130125_050208_661827_6F3CAF11 X-CRM114-Status: UNSURE ( 8.91 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Peter Ujfalusi , Florian Vaussard , linux-arm-kernel@lists.infradead.org, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Calls to PWM drivers connected through I2C can sleep. Use the new can_sleep property. Signed-off-by: Florian Vaussard --- drivers/pwm/pwm-twl-led.c | 1 + drivers/pwm/pwm-twl.c | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/pwm/pwm-twl-led.c b/drivers/pwm/pwm-twl-led.c index 9dfa0f3..6261193 100644 --- a/drivers/pwm/pwm-twl-led.c +++ b/drivers/pwm/pwm-twl-led.c @@ -300,6 +300,7 @@ static int twl_pwmled_probe(struct platform_device *pdev) twl->chip.dev = &pdev->dev; twl->chip.base = -1; + twl->chip.can_sleep = 1; mutex_init(&twl->mutex); diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c index e65db95..4e56cd8 100644 --- a/drivers/pwm/pwm-twl.c +++ b/drivers/pwm/pwm-twl.c @@ -315,6 +315,7 @@ static int twl_pwm_probe(struct platform_device *pdev) twl->chip.dev = &pdev->dev; twl->chip.base = -1; twl->chip.npwm = 2; + twl->chip.can_sleep = 1; mutex_init(&twl->mutex);