Re: [PATCH v3 3/6] pwm: stm32: add capture support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 30 Mar 2018, Fabrice Gasnier wrote:

> Add support for PMW input mode on pwm-stm32. STM32 timers support
> period and duty cycle capture as long as they have at least two PWM
> channels. One capture channel is used for period (rising-edge), one
> for duty-cycle (falling-edge).
> When there's only one channel available, only period can be captured.
> Duty-cycle is simply zero'ed in such a case.
> 
> Capture requires exclusive access (e.g. no pwm output running at the
> same time, to protect common prescaler).
> Timer DMA burst mode (from MFD core) is being used, to take two
> snapshots of capture registers (upon each period rising edge).
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@xxxxxx>
> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxx>
> Acked-by: Thierry Reding <thierry.reding@xxxxxxxxx>
> ---
> Changes in v3:
> - update stm32_timers_dma_burst_read() call: don't pass ddata structure,
>   use MFD parent device structure instead since MFD core update.
> 
> Changes in v2:
> - DMA handling has been moved to MFD core. Rework capture routines to
>   use it.
> ---
>  drivers/pwm/pwm-stm32.c          | 176 +++++++++++++++++++++++++++++++++++++++
>  include/linux/mfd/stm32-timers.h |  11 +++

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@xxxxxxxxxx>

>  2 files changed, 187 insertions(+)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux