RE: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-03 Thread Xiubo Li-B47053
> Subject: Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support > > On Tue, Sep 03, 2013 at 04:17:09AM +, Xiubo Li-B47053 wrote: > > > Subject: Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support > > > > > > You simply don't need the avai

Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-03 Thread Sascha Hauer
On Tue, Sep 03, 2013 at 04:17:09AM +, Xiubo Li-B47053 wrote: > > Subject: Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support > > > > You simply don't need the available field. You don't need to track > > whether they are available. If a user enables a pwm whi

Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-03 Thread Sascha Hauer
On Tue, Sep 03, 2013 at 04:17:09AM +, Xiubo Li-B47053 wrote: Subject: Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support You simply don't need the available field. You don't need to track whether they are available. If a user enables a pwm which is not routed out of the SoC

RE: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-03 Thread Xiubo Li-B47053
Subject: Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support On Tue, Sep 03, 2013 at 04:17:09AM +, Xiubo Li-B47053 wrote: Subject: Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support You simply don't need the available field. You don't need to track whether

RE: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-02 Thread Xiubo Li-B47053
> Subject: Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support > > On Mon, Sep 02, 2013 at 03:33:37AM +, Xiubo Li-B47053 wrote: > > > > > > +static void fsl_pwm_free(struct pwm_chip *chip, struct pwm_device > > > > +*pwm) { &

Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-02 Thread Sascha Hauer
On Mon, Sep 02, 2013 at 03:33:37AM +, Xiubo Li-B47053 wrote: > > > > +static void fsl_pwm_free(struct pwm_chip *chip, struct pwm_device > > > +*pwm) { > > > + struct fsl_pwm_chip *fpc; > > > + struct fsl_pwm_data *pwm_data; > > > + > > > + fpc = to_fsl_chip(chip); > > > + > > > + pwm_data =

Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-02 Thread Sascha Hauer
On Mon, Sep 02, 2013 at 03:33:37AM +, Xiubo Li-B47053 wrote: +static void fsl_pwm_free(struct pwm_chip *chip, struct pwm_device +*pwm) { + struct fsl_pwm_chip *fpc; + struct fsl_pwm_data *pwm_data; + + fpc = to_fsl_chip(chip); + + pwm_data = pwm_get_chip_data(pwm);

RE: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-02 Thread Xiubo Li-B47053
Subject: Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support On Mon, Sep 02, 2013 at 03:33:37AM +, Xiubo Li-B47053 wrote: +static void fsl_pwm_free(struct pwm_chip *chip, struct pwm_device +*pwm) { + struct fsl_pwm_chip *fpc; + struct fsl_pwm_data

RE: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-01 Thread Xiubo Li-B47053
> > +static void fsl_pwm_free(struct pwm_chip *chip, struct pwm_device > > +*pwm) { > > + struct fsl_pwm_chip *fpc; > > + struct fsl_pwm_data *pwm_data; > > + > > + fpc = to_fsl_chip(chip); > > + > > + pwm_data = pwm_get_chip_data(pwm); > > + if (!pwm_data) > > + return; > >

RE: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-09-01 Thread Xiubo Li-B47053
+static void fsl_pwm_free(struct pwm_chip *chip, struct pwm_device +*pwm) { + struct fsl_pwm_chip *fpc; + struct fsl_pwm_data *pwm_data; + + fpc = to_fsl_chip(chip); + + pwm_data = pwm_get_chip_data(pwm); + if (!pwm_data) + return; THis check seems

Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-08-30 Thread Sascha Hauer
On Fri, Aug 30, 2013 at 05:48:49PM +0800, Xiubo Li wrote: > + > +#define FTM_CSC_BASE0x0C > +#define FTM_CSC(_channel) \ > + (FTM_CSC_BASE + ((_channel) * 8)) Put into a single line. > +#define FTMCnSC_MSB BIT(5) > +#define FTMCnSC_MSA BIT(4) > +#define FTMCnSC_ELSB

Re: [PATCHv2 1/4] pwm: Add Freescale FTM PWM driver support

2013-08-30 Thread Sascha Hauer
On Fri, Aug 30, 2013 at 05:48:49PM +0800, Xiubo Li wrote: + +#define FTM_CSC_BASE0x0C +#define FTM_CSC(_channel) \ + (FTM_CSC_BASE + ((_channel) * 8)) Put into a single line. +#define FTMCnSC_MSB BIT(5) +#define FTMCnSC_MSA BIT(4) +#define FTMCnSC_ELSB