* Shawn Guo wrote: > On Wed, Mar 14, 2012 at 04:56:32PM +0100, Thierry Reding wrote: > > Signed-off-by: Thierry Reding <thierry.reding@xxxxxxxxxxxxxxxxx> > > --- > > Changes in v3: > > - update PWM ops for changes in patch 2 > > > > arch/arm/plat-pxa/Makefile | 1 - > > arch/arm/plat-pxa/pwm.c | 304 -------------------------------------------- > > drivers/pwm/Kconfig | 9 ++ > > drivers/pwm/Makefile | 1 + > > drivers/pwm/pwm-pxa.c | 244 +++++++++++++++++++++++++++++++++++ > > 5 files changed, 254 insertions(+), 305 deletions(-) > > delete mode 100644 arch/arm/plat-pxa/pwm.c > > create mode 100644 drivers/pwm/pwm-pxa.c > > > The patch should be generated with "git format-patch -M", so that we > can see the diff like below. > > --- a/arch/arm/plat-pxa/pwm.c > +++ b/drivers/pwm/pwm-pxa.c Yes, Arnd already mentioned that in the last round but I forgot. It usually takes me a couple of weeks to prepare the next version and I try to keep a list of TODOs but that doesn't seem to be efficient enough yet. > -int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) > +static int pxa_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, > + int duty_ns, int period_ns) > { > + struct pxa_pwm_chip *pc = to_pxa_pwm_chip(chip); > unsigned long long c; > unsigned long period_cycles, prescale, pv, dc; > + unsigned long offset; > > - if (pwm == NULL || period_ns == 0 || duty_ns > period_ns) > + if (period_ns == 0 || duty_ns > period_ns) > return -EINVAL; > > Then I will have a question why "pwm == NULL" check is removed? Actually, as I mentioned in another mail the idea was to put these kinds of checks into the core. They are still missing from the core, though. Thierry
Attachment:
pgpVsqkXCuKLY.pgp
Description: PGP signature