linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: Add TWL4030 PWM driver
@ 2012-03-20 16:48 Bernhard Walle
  2012-03-20 22:02 ` Arnd Bergmann
  2012-03-21 16:55 ` Grazvydas Ignotas
  0 siblings, 2 replies; 9+ messages in thread
From: Bernhard Walle @ 2012-03-20 16:48 UTC (permalink / raw)
  To: sameo; +Cc: linux-kernel, linux-omap

This PWM driver uses the PWM of the TWL4030. The driver for the TWL6030
PWM has been used as mode, but the PWM registers are different.

The driver can be used and has been tested in conjunction with
pwm-backlight to control a backlight LED of a LCD touch screen.

Signed-off-by: Bernhard Walle <walle@corscience.de>
---
 drivers/mfd/Kconfig       |    9 ++
 drivers/mfd/Makefile      |    1 +
 drivers/mfd/twl4030-pwm.c |  235 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 245 insertions(+)
 create mode 100644 drivers/mfd/twl4030-pwm.c

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index f147395..4a7bee8 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -235,6 +235,15 @@ config TWL4030_POWER
 	  and load scripts controlling which resources are switched off/on
 	  or reset when a sleep, wakeup or warm reset event occurs.
 
+config TWL4030_PWM
+	tristate "TWL4030 PWM (Pulse Width Modulator) Support"
+	depends on TWL4030_CORE
+	select HAVE_PWM
+	default n
+	help
+	  Say yes here if you want support for TWL4030 PWM. This PWM
+	  can be used to control the brightness of an LCD backlight.
+
 config MFD_TWL4030_AUDIO
 	bool
 	depends on TWL4030_CORE
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index b953bab..7b824eb 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -48,6 +48,7 @@ obj-$(CONFIG_MENELAUS)		+= menelaus.o
 obj-$(CONFIG_TWL4030_CORE)	+= twl-core.o twl4030-irq.o twl6030-irq.o
 obj-$(CONFIG_TWL4030_MADC)      += twl4030-madc.o
 obj-$(CONFIG_TWL4030_POWER)    += twl4030-power.o
+obj-$(CONFIG_TWL4030_PWM)	+= twl4030-pwm.o
 obj-$(CONFIG_MFD_TWL4030_AUDIO)	+= twl4030-audio.o
 obj-$(CONFIG_TWL6030_PWM)	+= twl6030-pwm.o
 obj-$(CONFIG_TWL6040_CORE)	+= twl6040-core.o twl6040-irq.o
diff --git a/drivers/mfd/twl4030-pwm.c b/drivers/mfd/twl4030-pwm.c
new file mode 100644
index 0000000..06a5dbf
--- /dev/null
+++ b/drivers/mfd/twl4030-pwm.c
@@ -0,0 +1,235 @@
+/*
+ * twl4030-pwm.c
+ * Copyright (C) 2012 Corscience GmbH & Co. KG
+ *               Bernhard Walle <bernhard@bwalle.de>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/i2c/twl.h>
+#include <linux/slab.h>
+
+#define TWL_INTBR_PMBR1		0xD
+#define TWL_INTBR_GPBR1		0xC
+#define TWL_LED_PWMON		0x0
+#define TWL_LED_PWMOFF		0x1
+
+/* GPBR1 */
+#define GPBR1_PWM1_ENABLE	(1<<3)
+#define GPBR1_PWM0_ENABLE	(1<<2)
+#define GPBR1_PWM1_CLK_ENABLE	(1<<1)
+#define GPBR1_PWM0_CLK_ENABLE	(1<<0)
+
+/* PMBR1 */
+#define PMBR1_GPIO7_MASK	((1<<5)|(1<<4))
+#define PMBR1_GPIO7_GPIO	(0x0<<4)
+#define PMBR1_GPIO7_VIBRASYNC	(0x1<<4)
+#define PMBR1_GPIO7_NOACTION	(0x2<<4)
+#define PMBR1_GPIO7_PWM1	(0x3<<4)
+
+#define PMBR1_GPIO6_MASK	((1<<3)|(1<<2))
+#define PMBR1_GPIO6_GPIO	(0x0<<2)
+#define PMBR1_GPIO6_PWM0	(0x1<<2)
+#define PMBR1_GPIO6_MUTE	(0x2<<2)
+
+/* TWL_LED_PWMON and TWL_LED_PWMOFF must be between 0 and PWM_COUNT_MAX. */
+#define PWM_COUNT_MAX		128
+
+/* Opaque data structure */
+struct pwm_device {
+	const char *label;
+	unsigned int pwm_id;
+};
+
+/*
+ * Converts the pwm_id to the I2C register of the TWL that is used to
+ * set the PWM on and off cycle.
+ */
+static const u8 twl_module_register[] = {
+	[0] = TWL4030_MODULE_PWM0,
+	[1] = TWL4030_MODULE_PWM1
+};
+
+int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns)
+{
+	u8 duty_cycle, addr;
+	int ret;
+
+	if (pwm == NULL || period_ns == 0 || duty_ns > period_ns)
+		return -EINVAL;
+
+	duty_cycle = (duty_ns * PWM_COUNT_MAX) / period_ns;
+	addr = twl_module_register[pwm->pwm_id];
+
+	ret = twl_i2c_write_u8(addr, 0, TWL_LED_PWMON);
+	if (ret) {
+		pr_err("%s: Failed to configure PWM, Error %d\n",
+		       pwm->label, ret);
+		return ret;
+	}
+
+	ret = twl_i2c_write_u8(addr, duty_cycle, TWL_LED_PWMOFF);
+	if (ret < 0) {
+		pr_err("%s: Failed to configure PWM, Error %d\n",
+		       pwm->label, ret);
+		return ret;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL(pwm_config);
+
+int pwm_enable(struct pwm_device *pwm)
+{
+	int ret;
+	u8 val;
+
+	ret = twl_i2c_read_u8(TWL4030_MODULE_INTBR, &val, TWL_INTBR_GPBR1);
+	if (ret < 0) {
+		pr_err("%s: failed to read TWL_INTBR_GPBR1 register\n",
+			pwm->label);
+		return ret;
+	}
+
+	if (pwm->pwm_id == 0)
+		val |= GPBR1_PWM0_ENABLE | GPBR1_PWM0_CLK_ENABLE;
+	else
+		val |= GPBR1_PWM1_ENABLE | GPBR1_PWM1_CLK_ENABLE;
+
+	ret = twl_i2c_write_u8(TWL4030_MODULE_INTBR, val, TWL_INTBR_GPBR1);
+	if (ret < 0) {
+		pr_err("%s: failed to write TWL_INTBR_GPBR1 register\n",
+			pwm->label);
+		return ret;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL(pwm_enable);
+
+void pwm_disable(struct pwm_device *pwm)
+{
+	int ret;
+	u8 val;
+
+	ret = twl_i2c_read_u8(TWL4030_MODULE_INTBR, &val, TWL_INTBR_GPBR1);
+	if (ret < 0) {
+		pr_err("%s: failed to read TWL_INTBR_GPBR1 register\n",
+			pwm->label);
+		return;
+	}
+
+	if (pwm->pwm_id == 0)
+		val &= ~(GPBR1_PWM0_ENABLE | GPBR1_PWM0_CLK_ENABLE);
+	else
+		val &= ~(GPBR1_PWM1_ENABLE | GPBR1_PWM1_CLK_ENABLE);
+
+	ret = twl_i2c_write_u8(TWL4030_MODULE_INTBR, val, TWL_INTBR_GPBR1);
+	if (ret < 0)
+		pr_err("%s: failed to write TWL_INTBR_GPBR1 register\n",
+			pwm->label);
+}
+EXPORT_SYMBOL(pwm_disable);
+
+struct pwm_device *pwm_request(int pwm_id, const char *label)
+{
+	int ret;
+	u8 val;
+	struct pwm_device *pwm;
+
+	if (!(pwm_id == 0 || pwm_id == 1)) {
+		pr_err("%s: Invalid pwm_id, only 0 or 1 allowed\n", label);
+		return NULL;
+	}
+
+	pwm = kzalloc(sizeof(struct pwm_device), GFP_KERNEL);
+	if (!pwm) {
+		pr_err("%s: failed to allocate memory\n", label);
+		return NULL;
+	}
+
+	pwm->label = label;
+	pwm->pwm_id = pwm_id;
+
+	/* change pin mux to use the PWM */
+
+	ret = twl_i2c_read_u8(TWL4030_MODULE_INTBR, &val, TWL_INTBR_PMBR1);
+	if (ret < 0) {
+		pr_err("%s: failed to read TWL_INTBR_PMBR1 register\n",
+			pwm->label);
+		goto err;
+	}
+
+	if (pwm->pwm_id == 0) {
+		val &= PMBR1_GPIO6_MASK;
+		val |= PMBR1_GPIO6_PWM0;
+	} else {
+		val &= PMBR1_GPIO7_MASK;
+		val |= PMBR1_GPIO7_PWM1;
+	}
+
+	ret = twl_i2c_write_u8(TWL4030_MODULE_INTBR, val, TWL_INTBR_PMBR1);
+	if (ret < 0) {
+		pr_err("%s: failed to write TWL_INTBR_PMBR1 register\n",
+			pwm->label);
+		goto err;
+	}
+
+	return pwm;
+
+err:
+	kfree(pwm);
+	return NULL;
+}
+EXPORT_SYMBOL(pwm_request);
+
+void pwm_free(struct pwm_device *pwm)
+{
+	int ret;
+	u8 val;
+
+	pwm_disable(pwm);
+
+	/* change pin mux to use the GPIOs */
+
+	ret = twl_i2c_read_u8(TWL4030_MODULE_INTBR, &val, TWL_INTBR_PMBR1);
+	if (ret < 0) {
+		pr_err("%s: failed to read TWL_INTBR_PMBR1 register\n",
+			pwm->label);
+		goto out;
+	}
+
+	if (pwm->pwm_id == 0) {
+		val &= PMBR1_GPIO6_MASK;
+		val |= PMBR1_GPIO6_GPIO;
+	} else {
+		val &= PMBR1_GPIO7_MASK;
+		val |= PMBR1_GPIO7_GPIO;
+	}
+
+	ret = twl_i2c_write_u8(TWL4030_MODULE_INTBR, val, TWL_INTBR_PMBR1);
+	if (ret < 0) {
+		pr_err("%s: failed to write TWL_INTBR_PMBR1 register\n",
+			pwm->label);
+	}
+
+out:
+	kfree(pwm);
+}
+EXPORT_SYMBOL(pwm_free);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("TWL4030 PWM driver");
+MODULE_AUTHOR("Bernhard Walle <bernhard@bwalle.de>");
-- 
1.7.9.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: Add TWL4030 PWM driver
  2012-03-20 16:48 [PATCH] mfd: Add TWL4030 PWM driver Bernhard Walle
@ 2012-03-20 22:02 ` Arnd Bergmann
  2012-03-21  6:15   ` Bernhard Walle
  2012-03-21 16:55 ` Grazvydas Ignotas
  1 sibling, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2012-03-20 22:02 UTC (permalink / raw)
  To: Bernhard Walle; +Cc: sameo, linux-kernel, linux-omap

On Tuesday 20 March 2012, Bernhard Walle wrote:
> 
> This PWM driver uses the PWM of the TWL4030. The driver for the TWL6030
> PWM has been used as mode, but the PWM registers are different.
> 
> The driver can be used and has been tested in conjunction with
> pwm-backlight to control a backlight LED of a LCD touch screen.
> 
> Signed-off-by: Bernhard Walle <walle@corscience.de>

Since it's too late for v3.4 now and we will get a new pwm
subsystem in v3.5, I suggest you change the driver to work
register with that subsystem instead of just using the old
header file. Note that drivers/mfd is not really the right
place anyway, because this is not a multifunction driver but
just one device driver that happens to be a slave of an mfd.

	Arnd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: Add TWL4030 PWM driver
  2012-03-20 22:02 ` Arnd Bergmann
@ 2012-03-21  6:15   ` Bernhard Walle
  2012-03-21  8:39     ` Arnd Bergmann
  0 siblings, 1 reply; 9+ messages in thread
From: Bernhard Walle @ 2012-03-21  6:15 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Bernhard Walle, sameo, linux-kernel, linux-omap

Am 20.03.12 23:02, schrieb Arnd Bergmann:
> On Tuesday 20 March 2012, Bernhard Walle wrote:
>>
>> This PWM driver uses the PWM of the TWL4030. The driver for the TWL6030
>> PWM has been used as mode, but the PWM registers are different.
>>
>> The driver can be used and has been tested in conjunction with
>> pwm-backlight to control a backlight LED of a LCD touch screen.
>>
>> Signed-off-by: Bernhard Walle <walle@corscience.de>
> 
> Since it's too late for v3.4 now and we will get a new pwm
> subsystem in v3.5, I suggest you change the driver to work
> register with that subsystem instead of just using the old
> header file. Note that drivers/mfd is not really the right
> place anyway, because this is not a multifunction driver but
> just one device driver that happens to be a slave of an mfd.

Does that new subsystem already exist in some tree?

Regards,
Bernhard

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: Add TWL4030 PWM driver
  2012-03-21  6:15   ` Bernhard Walle
@ 2012-03-21  8:39     ` Arnd Bergmann
  2012-03-21  8:48       ` Thierry Reding
  0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2012-03-21  8:39 UTC (permalink / raw)
  To: Bernhard Walle
  Cc: Bernhard Walle, sameo, linux-kernel, linux-omap, Thierry Reding

On Wednesday 21 March 2012, Bernhard Walle wrote:
> Am 20.03.12 23:02, schrieb Arnd Bergmann:
> > On Tuesday 20 March 2012, Bernhard Walle wrote:
> >>
> >> This PWM driver uses the PWM of the TWL4030. The driver for the TWL6030
> >> PWM has been used as mode, but the PWM registers are different.
> >>
> >> The driver can be used and has been tested in conjunction with
> >> pwm-backlight to control a backlight LED of a LCD touch screen.
> >>
> >> Signed-off-by: Bernhard Walle <walle@corscience.de>
> > 
> > Since it's too late for v3.4 now and we will get a new pwm
> > subsystem in v3.5, I suggest you change the driver to work
> > register with that subsystem instead of just using the old
> > header file. Note that drivers/mfd is not really the right
> > place anyway, because this is not a multifunction driver but
> > just one device driver that happens to be a slave of an mfd.
> 
> Does that new subsystem already exist in some tree?
 
Thierry Reding has been busily posting patches, so he probably has
one that you can use, but I couldn't find it now.

	Arnd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: Add TWL4030 PWM driver
  2012-03-21  8:39     ` Arnd Bergmann
@ 2012-03-21  8:48       ` Thierry Reding
  2012-03-21 10:03         ` Arnd Bergmann
  0 siblings, 1 reply; 9+ messages in thread
From: Thierry Reding @ 2012-03-21  8:48 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Bernhard Walle, Bernhard Walle, sameo, linux-kernel, linux-omap

[-- Attachment #1: Type: text/plain, Size: 1323 bytes --]

* Arnd Bergmann wrote:
> On Wednesday 21 March 2012, Bernhard Walle wrote:
> > Am 20.03.12 23:02, schrieb Arnd Bergmann:
> > > On Tuesday 20 March 2012, Bernhard Walle wrote:
> > >>
> > >> This PWM driver uses the PWM of the TWL4030. The driver for the TWL6030
> > >> PWM has been used as mode, but the PWM registers are different.
> > >>
> > >> The driver can be used and has been tested in conjunction with
> > >> pwm-backlight to control a backlight LED of a LCD touch screen.
> > >>
> > >> Signed-off-by: Bernhard Walle <walle@corscience.de>
> > > 
> > > Since it's too late for v3.4 now and we will get a new pwm
> > > subsystem in v3.5, I suggest you change the driver to work
> > > register with that subsystem instead of just using the old
> > > header file. Note that drivers/mfd is not really the right
> > > place anyway, because this is not a multifunction driver but
> > > just one device driver that happens to be a slave of an mfd.
> > 
> > Does that new subsystem already exist in some tree?
>  
> Thierry Reding has been busily posting patches, so he probably has
> one that you can use, but I couldn't find it now.

I don't have a public tree anywhere. Does anyone have a recommendation where
I could set one up? github or gitorious are the first to come to my mind.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: Add TWL4030 PWM driver
  2012-03-21  8:48       ` Thierry Reding
@ 2012-03-21 10:03         ` Arnd Bergmann
  2012-03-21 10:28           ` Thierry Reding
  0 siblings, 1 reply; 9+ messages in thread
From: Arnd Bergmann @ 2012-03-21 10:03 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Bernhard Walle, Bernhard Walle, sameo, linux-kernel, linux-omap

On Wednesday 21 March 2012, Thierry Reding wrote:
> * Arnd Bergmann wrote:
> > On Wednesday 21 March 2012, Bernhard Walle wrote:
> > > Am 20.03.12 23:02, schrieb Arnd Bergmann:
> > > > On Tuesday 20 March 2012, Bernhard Walle wrote:
> > > >>
> > > >> This PWM driver uses the PWM of the TWL4030. The driver for the TWL6030
> > > >> PWM has been used as mode, but the PWM registers are different.
> > > >>
> > > >> The driver can be used and has been tested in conjunction with
> > > >> pwm-backlight to control a backlight LED of a LCD touch screen.
> > > >>
> > > >> Signed-off-by: Bernhard Walle <walle@corscience.de>
> > > > 
> > > > Since it's too late for v3.4 now and we will get a new pwm
> > > > subsystem in v3.5, I suggest you change the driver to work
> > > > register with that subsystem instead of just using the old
> > > > header file. Note that drivers/mfd is not really the right
> > > > place anyway, because this is not a multifunction driver but
> > > > just one device driver that happens to be a slave of an mfd.
> > > 
> > > Does that new subsystem already exist in some tree?
> >  
> > Thierry Reding has been busily posting patches, so he probably has
> > one that you can use, but I couldn't find it now.
> 
> I don't have a public tree anywhere. Does anyone have a recommendation where
> I could set one up? github or gitorious are the first to come to my mind.

They both work fine and are easy to set up, at least as a temporary location.

If you want to have something more official in the long run, you could
either set up your own git server on your employer's domain or if that
is impractical, get an account on kernel.org or linaro.org. Both of those
try to limit the amount of accounts they hand out to external people, but
since you are going to be a subsystem maintainer, I don't see it as a
problem.

	Arnd

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: Add TWL4030 PWM driver
  2012-03-21 10:03         ` Arnd Bergmann
@ 2012-03-21 10:28           ` Thierry Reding
  2012-03-21 11:31             ` Sascha Hauer
  0 siblings, 1 reply; 9+ messages in thread
From: Thierry Reding @ 2012-03-21 10:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Bernhard Walle, Bernhard Walle, sameo, linux-kernel, linux-omap,
	Sascha Hauer

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

* Arnd Bergmann wrote:
> On Wednesday 21 March 2012, Thierry Reding wrote:
> > I don't have a public tree anywhere. Does anyone have a recommendation where
> > I could set one up? github or gitorious are the first to come to my mind.
> 
> They both work fine and are easy to set up, at least as a temporary location.

Okay, I'll check both and will also investigate whether one can be setup on
our domain.

> If you want to have something more official in the long run, you could
> either set up your own git server on your employer's domain or if that
> is impractical, get an account on kernel.org or linaro.org. Both of those
> try to limit the amount of accounts they hand out to external people, but
> since you are going to be a subsystem maintainer, I don't see it as a
> problem.

Maybe Sascha should have a say in this (adding to Cc). He wrote the original
code and got the ball rolling, so I don't want to jump the queue. If he's
okay with it, though, I'd be happy to take over.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: Add TWL4030 PWM driver
  2012-03-21 10:28           ` Thierry Reding
@ 2012-03-21 11:31             ` Sascha Hauer
  0 siblings, 0 replies; 9+ messages in thread
From: Sascha Hauer @ 2012-03-21 11:31 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Arnd Bergmann, Bernhard Walle, Bernhard Walle, sameo,
	linux-kernel, linux-omap

On Wed, Mar 21, 2012 at 11:28:47AM +0100, Thierry Reding wrote:
> * Arnd Bergmann wrote:
> > On Wednesday 21 March 2012, Thierry Reding wrote:
> > > I don't have a public tree anywhere. Does anyone have a recommendation where
> > > I could set one up? github or gitorious are the first to come to my mind.
> > 
> > They both work fine and are easy to set up, at least as a temporary location.
> 
> Okay, I'll check both and will also investigate whether one can be setup on
> our domain.
> 
> > If you want to have something more official in the long run, you could
> > either set up your own git server on your employer's domain or if that
> > is impractical, get an account on kernel.org or linaro.org. Both of those
> > try to limit the amount of accounts they hand out to external people, but
> > since you are going to be a subsystem maintainer, I don't see it as a
> > problem.
> 
> Maybe Sascha should have a say in this (adding to Cc). He wrote the original
> code and got the ball rolling, so I don't want to jump the queue. If he's
> okay with it, though, I'd be happy to take over.

I'm okay with this. I only wanted to write code for pwm, not maintain it ;)

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] mfd: Add TWL4030 PWM driver
  2012-03-20 16:48 [PATCH] mfd: Add TWL4030 PWM driver Bernhard Walle
  2012-03-20 22:02 ` Arnd Bergmann
@ 2012-03-21 16:55 ` Grazvydas Ignotas
  1 sibling, 0 replies; 9+ messages in thread
From: Grazvydas Ignotas @ 2012-03-21 16:55 UTC (permalink / raw)
  To: Bernhard Walle; +Cc: sameo, linux-kernel, linux-omap

On Tue, Mar 20, 2012 at 6:48 PM, Bernhard Walle <walle@corscience.de> wrote:
> This PWM driver uses the PWM of the TWL4030. The driver for the TWL6030
> PWM has been used as mode, but the PWM registers are different.
>
> The driver can be used and has been tested in conjunction with
> pwm-backlight to control a backlight LED of a LCD touch screen.

Nice, could we also have LEDA and LEDB pwm control as pwm_id 2 and 3
in next version? No worries if you don't want it, I could try to take
a stab at that later.



-- 
Gražvydas

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-03-21 16:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-20 16:48 [PATCH] mfd: Add TWL4030 PWM driver Bernhard Walle
2012-03-20 22:02 ` Arnd Bergmann
2012-03-21  6:15   ` Bernhard Walle
2012-03-21  8:39     ` Arnd Bergmann
2012-03-21  8:48       ` Thierry Reding
2012-03-21 10:03         ` Arnd Bergmann
2012-03-21 10:28           ` Thierry Reding
2012-03-21 11:31             ` Sascha Hauer
2012-03-21 16:55 ` Grazvydas Ignotas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).