Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1379806

Re: [RESEND 07/11] pwm: sti: Initialise PWM Capture channel data

From Lee Jones <lee.jones@linaro.org>
Newsgroups linux.kernel
Subject Re: [RESEND 07/11] pwm: sti: Initialise PWM Capture channel data
Date 2016-04-15 15:20 +0200
Message-ID <robPc-3yU-17@gated-at.bofh.it> (permalink)
References <r8h2z-18n-39@gated-at.bofh.it> <r8h2z-18n-37@gated-at.bofh.it> <rn3K2-5ST-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 12 Apr 2016, Thierry Reding wrote:
> On Wed, Mar 02, 2016 at 03:32:05PM +0000, Lee Jones wrote:
> [...]
> > +struct sti_cpt_data {
> > +	u32 snapshot[3];
> > +	int index;
> > +	int gpio;

[...]

> > +
> > +		init_waitqueue_head(&data->wait);
> > +		mutex_init(&data->lock);
> > +		data->gpio = of_get_named_gpio(np, "capture-gpios", chan);
> > +		pc->cpt_data[chan] = data;
> 
> Converting to per-PWM data should be as simple as turning this last line
> into:
> 
> 	pwm_set_chip_data(pc->chip.pwms[chan], data);
> 
> Also I don't see any cleanup for this data in the driver. The memory for
> the per-PWM data should be freed by devm_*() infrastructure, but how
> will the GPIO be released?

There is no reason to release a GPIO.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [RESEND 07/11] pwm: sti: Initialise PWM Capture channel data Thierry Reding <thierry.reding@gmail.com> - 2016-04-12 12:30 +0200
  Re: [RESEND 07/11] pwm: sti: Initialise PWM Capture channel data Lee Jones <lee.jones@linaro.org> - 2016-04-15 14:40 +0200
    Re: [RESEND 07/11] pwm: sti: Initialise PWM Capture channel data Thierry Reding <thierry.reding@gmail.com> - 2016-04-15 16:30 +0200
      Re: [RESEND 07/11] pwm: sti: Initialise PWM Capture channel data Lee Jones <lee.jones@linaro.org> - 2016-04-15 16:40 +0200
  Re: [RESEND 07/11] pwm: sti: Initialise PWM Capture channel data Lee Jones <lee.jones@linaro.org> - 2016-04-15 15:20 +0200
    Re: [RESEND 07/11] pwm: sti: Initialise PWM Capture channel data Thierry Reding <thierry.reding@gmail.com> - 2016-04-15 16:30 +0200

csiph-web