Re: [PATCH 2/3] pwm: New driver to support PWMs on TWL4030/6030 series of PMICs

2012-11-08 Thread Grazvydas Ignotas
On Thu, Nov 8, 2012 at 9:14 AM, Péter Ujfalusi wrote: > On 11/07/2012 06:50 PM, Grazvydas Ignotas wrote: >>> + if (pwm->hwpwm) { >>> + /* PWM 1 */ >>> + mask = TWL4030_GPIO7_VIBRASYNC_PWM1_MASK; >>> + bits = TWL4030_GPIO7_VIBRASYNC_PWM1_PWM1; >>> +

Re: [PATCH 2/3] pwm: New driver to support PWMs on TWL4030/6030 series of PMICs

2012-11-08 Thread Grazvydas Ignotas
On Thu, Nov 8, 2012 at 9:14 AM, Péter Ujfalusi peter.ujfal...@ti.com wrote: On 11/07/2012 06:50 PM, Grazvydas Ignotas wrote: + if (pwm-hwpwm) { + /* PWM 1 */ + mask = TWL4030_GPIO7_VIBRASYNC_PWM1_MASK; + bits = TWL4030_GPIO7_VIBRASYNC_PWM1_PWM1;

Re: [PATCH 2/3] pwm: New driver to support PWMs on TWL4030/6030 series of PMICs

2012-11-07 Thread Péter Ujfalusi
On 11/07/2012 06:50 PM, Grazvydas Ignotas wrote: >> +static int twl4030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) >> +{ >> + int ret; >> + u8 val; >> + >> + ret = twl_i2c_read_u8(TWL4030_MODULE_INTBR, , TWL4030_GPBR1_REG); >> + if (ret < 0) { >> +

Re: [PATCH 2/3] pwm: New driver to support PWMs 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 PWM outputs: > TWL4030 PWM0 and PWM1 > TWL6030 PWM1 and PWM2 > > On TWL4030 the PWM signals are muxed. Upon requesting the PWM the driver > will select the correct mux so the PWM can be used. When the PWM

[PATCH 2/3] pwm: New driver to support PWMs on TWL4030/6030 series of PMICs

2012-11-07 Thread Peter Ujfalusi
The driver supports the following PWM outputs: TWL4030 PWM0 and PWM1 TWL6030 PWM1 and PWM2 On TWL4030 the PWM signals are muxed. Upon requesting the PWM the driver will select the correct mux so the PWM can be used. When the PWM has been freed the original configuration going to be restored.

[PATCH 2/3] pwm: New driver to support PWMs on TWL4030/6030 series of PMICs

2012-11-07 Thread Peter Ujfalusi
The driver supports the following PWM outputs: TWL4030 PWM0 and PWM1 TWL6030 PWM1 and PWM2 On TWL4030 the PWM signals are muxed. Upon requesting the PWM the driver will select the correct mux so the PWM can be used. When the PWM has been freed the original configuration going to be restored.

Re: [PATCH 2/3] pwm: New driver to support PWMs 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 PWM outputs: TWL4030 PWM0 and PWM1 TWL6030 PWM1 and PWM2 On TWL4030 the PWM signals are muxed. Upon requesting the PWM the driver will select the correct mux so the PWM can be used.

Re: [PATCH 2/3] pwm: New driver to support PWMs on TWL4030/6030 series of PMICs

2012-11-07 Thread Péter Ujfalusi
On 11/07/2012 06:50 PM, Grazvydas Ignotas wrote: +static int twl4030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) +{ + int ret; + u8 val; + + ret = twl_i2c_read_u8(TWL4030_MODULE_INTBR, val, TWL4030_GPBR1_REG); + if (ret 0) { +