From patchwork Wed Apr 9 09:21:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 337805 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 6DCC114012F for ; Wed, 9 Apr 2014 19:21:34 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932465AbaDIJVd (ORCPT ); Wed, 9 Apr 2014 05:21:33 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:46053 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932247AbaDIJVd (ORCPT ); Wed, 9 Apr 2014 05:21:33 -0400 Received: by mail-pd0-f179.google.com with SMTP id w10so2223054pde.10 for ; Wed, 09 Apr 2014 02:21:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=bBHVDTlxjvxqtLBBuzmSGKHciOdG4Y7h9EdxojylA2E=; b=cL9wvI43kbwFR4PDLPLf13QIwD8CevKMkyo6XLaOX7Z7BWoii7RZCetrkvAYoysb/8 j17cNzCOed0NKoRm9hQyZCJIuy4xYxrzc/6yF3lPgNWoPklNr1zedsOju9Fh2Y8HiiBR QOfyKQcjCSzvMwyF+fL9lp5WzJjw8G8DCXPT28kITr9ncXPf7k8PS103HZ3qWJI76Lfb KnHUEsQKp2Z0V6rxaD66lPju9K3/f2ajznaFEC9xymZg5j69kdLD2mn9JZfZp0onWS8e TBKA00yI9J7Y5cnpnLHlL7xzmO7IHuNsZRMsKdnNFQOUD8haktkUYvx2f+vHih1Qm9xI IWfw== X-Gm-Message-State: ALoCoQm7zF8sHIlolN7tcdSe6eqXRtK+Tshxj+YRnd6UH0fFGvtXUEtIfJnD/zWX41/I7BZVbjB2 X-Received: by 10.68.189.33 with SMTP id gf1mr10469510pbc.111.1397035292280; Wed, 09 Apr 2014 02:21:32 -0700 (PDT) Received: from [192.168.0.102] (218-164-132-98.dynamic.hinet.net. [218.164.132.98]) by mx.google.com with ESMTPSA id oa3sm1197378pbb.15.2014.04.09.02.21.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 09 Apr 2014 02:21:31 -0700 (PDT) Message-ID: <1397035286.1002.1.camel@phoenix> Subject: [PATCH RFT] PWM: twl: actually disable twl6030 PWMs From: Axel Lin To: Thierry Reding Cc: Peter Ujfalusi , linux-pwm@vger.kernel.org Date: Wed, 09 Apr 2014 17:21:26 +0800 X-Mailer: Evolution 3.8.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org Current twl6030_pwm_disable() implementation writes TWL6030_TOGGLE3_REG twice, the second write sets TWL6030_PWMXEN bits so the PWM clock does not disable. Signed-off-by: Axel Lin Acked-by: Peter Ujfalusi --- Hi Peter, I don't have this h/w handy to test. I'd appreciate if you can review and test this patch. Regards, Axel drivers/pwm/pwm-twl.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/pwm/pwm-twl.c b/drivers/pwm/pwm-twl.c index b99a50e..04f7672 100644 --- a/drivers/pwm/pwm-twl.c +++ b/drivers/pwm/pwm-twl.c @@ -265,14 +265,6 @@ static void twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) ret = twl_i2c_write_u8(TWL6030_MODULE_ID1, val, TWL6030_TOGGLE3_REG); if (ret < 0) { - dev_err(chip->dev, "%s: Failed to read TOGGLE3\n", pwm->label); - goto out; - } - - val |= TWL6030_PWM_TOGGLE(pwm->hwpwm, TWL6030_PWMXS | TWL6030_PWMXEN); - - ret = twl_i2c_write_u8(TWL6030_MODULE_ID1, val, TWL6030_TOGGLE3_REG); - if (ret < 0) { dev_err(chip->dev, "%s: Failed to disable PWM\n", pwm->label); goto out; }