Skip to contentSkip to conversation

pwm: add ep93xx PWM support

PATCH Applied H Hartley Sweeten 4 participants 4 messages Oct 16, 2013 – Oct 17, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pwm: add ep93xx PWM support

Remove the non-standard EP93xx PWM driver in drivers/misc and add a new driver for the PWM controllers on the EP93xx platform based on the PWM framework.

These PWM controllers each support 1 PWM channel with programmable duty cycle, frequency, and polarity inversion.

Cc Ryan Mallon <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

---
v2: address issues pointed out by Thierry Reding.

 drivers/misc/Kconfig      |  13 ---
 drivers/misc/Makefile     |   1 -
 drivers/misc/ep93xx_pwm.c | 286 ----------------------------------------------
 drivers/pwm/Kconfig       |   9 ++
 drivers/pwm/Makefile      |   1 +
 drivers/pwm/pwm-ep93xx.c  | 230 +++++++++++++++++++++++++++++++++++++
 6 files changed, 240 insertions(+), 300 deletions(-)
 delete mode 100644 drivers/misc/ep93xx_pwm.c
 create mode 100644 drivers/pwm/pwm-ep93xx.c
drivers/misc/Kconfig +0 -13
index 8dacd4c..c43c66a 100644
@@ -381,19 +381,6 @@ config HMC6352
 	  This driver provides support for the Honeywell HMC6352 compass,
 	  providing configuration and heading data via sysfs.
 
-config EP93XX_PWM
-	tristate "EP93xx PWM support"
-	depends on ARCH_EP93XX
-	help
-	  This option enables device driver support for the PWM channels
-	  on the Cirrus EP93xx processors.  The EP9307 chip only has one
-	  PWM channel all the others have two, the second channel is an
-	  alternate function of the EGPIO14 pin.  A sysfs interface is
-	  provided to control the PWM channels.
-
-	  To compile this driver as a module, choose M here: the module will
-	  be called ep93xx_pwm.
-
 config DS1682
 	tristate "Dallas DS1682 Total Elapsed Time Recorder with Alarm"
 	depends on I2C
drivers/misc/Makefile +0 -1
index c235d5b..ecccd00 100644
@@ -33,7 +33,6 @@ obj-$(CONFIG_APDS9802ALS)	+= apds9802als.o
 obj-$(CONFIG_ISL29003)		+= isl29003.o
 obj-$(CONFIG_ISL29020)		+= isl29020.o
 obj-$(CONFIG_SENSORS_TSL2550)	+= tsl2550.o
-obj-$(CONFIG_EP93XX_PWM)	+= ep93xx_pwm.o
 obj-$(CONFIG_DS1682)		+= ds1682.o
 obj-$(CONFIG_TI_DAC7512)	+= ti_dac7512.o
 obj-$(CONFIG_C2PORT)		+= c2port/
drivers/misc/ep93xx_pwm.c deleted +0 -286

286 lines not on this page · raw message

drivers/pwm/Kconfig +9 -0
index 75840b5..eece329 100644
@@ -62,6 +62,15 @@ config PWM_BFIN
 	  To compile this driver as a module, choose M here: the module
 	  will be called pwm-bfin.
 
+config PWM_EP93XX
+	tristate "Cirrus Logic EP93xx PWM support"
+	depends on ARCH_EP93XX
+	help
+	  Generic PWM framework driver for Cirrus Logic EP93xx.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called pwm-ep93xx.
+
 config PWM_IMX
 	tristate "i.MX PWM support"
 	depends on ARCH_MXC
drivers/pwm/Makefile +1 -0
index 77a8c18..8b754e4 100644
@@ -3,6 +3,7 @@ obj-$(CONFIG_PWM_SYSFS)		+= sysfs.o
 obj-$(CONFIG_PWM_AB8500)	+= pwm-ab8500.o
 obj-$(CONFIG_PWM_ATMEL_TCB)	+= pwm-atmel-tcb.o
 obj-$(CONFIG_PWM_BFIN)		+= pwm-bfin.o
+obj-$(CONFIG_PWM_EP93XX)	+= pwm-ep93xx.o
 obj-$(CONFIG_PWM_IMX)		+= pwm-imx.o
 obj-$(CONFIG_PWM_JZ4740)	+= pwm-jz4740.o
 obj-$(CONFIG_PWM_LPC32XX)	+= pwm-lpc32xx.o
drivers/pwm/pwm-ep93xx.c new file +230 -0

230 lines not on this page · raw message

Signature · 1 line
1.8.3.2
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 7 lines · H Hartley Sweeten

Remove the non-standard EP93xx PWM driver in drivers/misc and add a new driver for the PWM controllers on the EP93xx platform based on the PWM framework.

These PWM controllers each support 1 PWM channel with programmable duty cycle, frequency, and polarity inversion.

Quoted 7 lines
Cc Ryan Mallon <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

---
v2: address issues pointed out by Thierry Reding.

Looks all good from my side, thanks for taking up this work.

maintainer Acked-by on v2 1/1
#2 lore raw
In reply to H Hartley Sweeten
Quoted 4 lines · H Hartley Sweeten

Remove the non-standard EP93xx PWM driver in drivers/misc and add a new driver for the PWM controllers on the EP93xx platform based on the PWM framework.

Quoted 8 lines

These PWM controllers each support 1 PWM channel with programmable duty cycle, frequency, and polarity inversion.

Cc Ryan Mallon <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
#3 lore raw
In reply to H Hartley Sweeten
Quoted 15 lines · H Hartley Sweeten

Remove the non-standard EP93xx PWM driver in drivers/misc and add a new driver for the PWM controllers on the EP93xx platform based on the PWM framework.

These PWM controllers each support 1 PWM channel with programmable duty cycle, frequency, and polarity inversion.

Cc Ryan Mallon <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>

---
v2: address issues pointed out by Thierry Reding.

Quoted 9 lines
 drivers/misc/Kconfig      |  13 ---
 drivers/misc/Makefile     |   1 -
 drivers/misc/ep93xx_pwm.c | 286 ----------------------------------------------
 drivers/pwm/Kconfig       |   9 ++
 drivers/pwm/Makefile      |   1 +
 drivers/pwm/pwm-ep93xx.c  | 230 +++++++++++++++++++++++++++++++++++++
 6 files changed, 240 insertions(+), 300 deletions(-)
 delete mode 100644 drivers/misc/ep93xx_pwm.c
 create mode 100644 drivers/pwm/pwm-ep93xx.c

Applied, thanks.

Thierry