From patchwork Tue Jun 28 10:02:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 102344 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 61770B6F6C for ; Tue, 28 Jun 2011 20:03:12 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QbV8K-0001L5-7K; Tue, 28 Jun 2011 10:03:04 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QbV8J-0005Xk-S2; Tue, 28 Jun 2011 10:03:03 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QbV8F-0005Wu-UZ for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2011 10:03:01 +0000 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1QbV8B-0006Qg-FP; Tue, 28 Jun 2011 12:02:55 +0200 Received: from sha by octopus.hi.pengutronix.de with local (Exim 4.76) (envelope-from ) id 1QbV88-0002dg-Fh; Tue, 28 Jun 2011 12:02:52 +0200 From: Sascha Hauer To: linux-kernel@vger.kernel.org Subject: [RFC] implement a generic PWM framework - once again Date: Tue, 28 Jun 2011 12:02:46 +0200 Message-Id: <1309255368-9775-1-git-send-email-s.hauer@pengutronix.de> X-Mailer: git-send-email 1.7.5.3 X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110628_060300_428310_9DA067DA X-CRM114-Status: GOOD ( 22.84 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain Cc: Shawn Guo , Ryan Mallon , Arnd Bergmann , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list 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+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Hi All, The following implements a generic pwm framework and adds a user for it. I already posted this series back in January. Based on the comments I received I added some details about the motivation for adding such a framework and not using the led or hwmon framework to patch 1/2. I also added some documentation to Documentation/pwm.txt. This patch does not change the user API for PWMs, in particular it does not enforce any sleep/nonsleep context to the PWM users. The patch merely puts the status quo into a core wrapper to be able to register multiple PWM drivers in the system. Improvements to the API can still be made later once we have at least a place in the kernel to collect the existing PWM drivers. Sascha The following changes since commit b0af8dfdd67699e25083478c63eedef2e72ebd85: Linux 3.0-rc5 (2011-06-27 19:12:22 -0700) are available in the git repository at: git://git.pengutronix.de/git/imx/linux-2.6.git pwm Sascha Hauer (2): PWM: add pwm framework support pwm: Add a i.MX23/28 pwm driver Documentation/pwm.txt | 56 ++++++++++ MAINTAINERS | 5 + drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/pwm/Kconfig | 12 ++ drivers/pwm/Makefile | 1 + drivers/pwm/core.c | 246 +++++++++++++++++++++++++++++++++++++++++++ drivers/pwm/mxs-pwm.c | 275 +++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/pwm.h | 38 +++++++ 9 files changed, 636 insertions(+), 0 deletions(-) create mode 100644 Documentation/pwm.txt create mode 100644 drivers/pwm/Kconfig create mode 100644 drivers/pwm/Makefile create mode 100644 drivers/pwm/core.c create mode 100644 drivers/pwm/mxs-pwm.c