Re: [PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-08 Thread Péter Ujfalusi
On 11/08/2012 01:29 PM, Grazvydas Ignotas wrote: >> But I want to note that I'm currently trying to clean up the mess around >> twl-core. In my view we have quite a bit of redundancy in there. The PWM A/B >> is for driving the LED A/B outputs. We should have only these modules for >> PWM/LED in

Re: [PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-08 Thread Grazvydas Ignotas
On Thu, Nov 8, 2012 at 9:34 AM, Péter Ujfalusi wrote: > On 11/07/2012 07:12 PM, Grazvydas Ignotas wrote: >>> +static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device >>> *pwm, >>> + int duty_ns, int period_ns) >>> +{ >>> + int duty_cycle =

Re: [PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-08 Thread Grazvydas Ignotas
On Thu, Nov 8, 2012 at 9:34 AM, Péter Ujfalusi peter.ujfal...@ti.com wrote: On 11/07/2012 07:12 PM, Grazvydas Ignotas wrote: +static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, + int duty_ns, int period_ns) +{ + int duty_cycle =

Re: [PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-08 Thread Péter Ujfalusi
On 11/08/2012 01:29 PM, Grazvydas Ignotas wrote: But I want to note that I'm currently trying to clean up the mess around twl-core. In my view we have quite a bit of redundancy in there. The PWM A/B is for driving the LED A/B outputs. We should have only these modules for PWM/LED in twl-core:

Re: [PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-07 Thread Péter Ujfalusi
On 11/07/2012 07:12 PM, Grazvydas Ignotas wrote: >> +static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device >> *pwm, >> + int duty_ns, int period_ns) >> +{ >> + int duty_cycle = (duty_ns * TWL4030_LED_MAX) / period_ns; >> + u8 on_time; >>

Re: [PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-07 Thread Grazvydas Ignotas
On Wed, Nov 7, 2012 at 4:44 PM, Peter Ujfalusi wrote: > The driver supports the following LED outputs as generic PWM driver: > TWL4030 LEDA and LEDB (PWMA and PWMB) > TWL6030 Charging indicator LED (PWM LED) > > On TWL6030 when the PWM requested LED is configured to be controlled by SW. > In this

[PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-07 Thread Peter Ujfalusi
The driver supports the following LED outputs as generic PWM driver: TWL4030 LEDA and LEDB (PWMA and PWMB) TWL6030 Charging indicator LED (PWM LED) On TWL6030 when the PWM requested LED is configured to be controlled by SW. In this case the user can enable/disable and set the duty period freely.

[PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-07 Thread Peter Ujfalusi
The driver supports the following LED outputs as generic PWM driver: TWL4030 LEDA and LEDB (PWMA and PWMB) TWL6030 Charging indicator LED (PWM LED) On TWL6030 when the PWM requested LED is configured to be controlled by SW. In this case the user can enable/disable and set the duty period freely.

Re: [PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-07 Thread Grazvydas Ignotas
On Wed, Nov 7, 2012 at 4:44 PM, Peter Ujfalusi peter.ujfal...@ti.com wrote: The driver supports the following LED outputs as generic PWM driver: TWL4030 LEDA and LEDB (PWMA and PWMB) TWL6030 Charging indicator LED (PWM LED) On TWL6030 when the PWM requested LED is configured to be controlled

Re: [PATCH 3/3] pwm: New driver to support PWM driven LEDs on TWL4030/6030 series of PMICs

2012-11-07 Thread Péter Ujfalusi
On 11/07/2012 07:12 PM, Grazvydas Ignotas wrote: +static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, + int duty_ns, int period_ns) +{ + int duty_cycle = (duty_ns * TWL4030_LED_MAX) / period_ns; + u8 on_time; + u8