On 02/24/2018 02:03 PM, Jonathan Cameron wrote:
> On Fri, 23 Feb 2018 13:50:59 +0100
> Fabrice Gasnier wrote:
>
>> Misc fixes & style improvements:
>> - checkpatch warns about line over 80 characters.
>> - remove extra spaces and a blank line (e.g. checkpatch
Add support for DAC (Digital to Analog Converter) to STM32MP157C.
STM32MP157C DAC has two output channels.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32mp157c.dtsi | 24
1 file changed, 24 insertions(+)
diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi
b
Add support for STM32MP1 ADC. It's quite similar to STM32H7 ADC.
Introduce new compatible to handle variants of this hardware such as
vregready flag, trigger list, interrupts, clock rate.
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-adc-core.c
Document support for STM32MP1 ADC. It's quite similar to STM32H7 ADC.
Introduce "st,stm32mp1-adc" compatible to handle variants of this
hardware such as vregready flag, interrupts, clock rate.
Signed-off-by: Fabrice Gasnier
---
Documentation/devicetree/bindings/iio/adc/st,st
stm32mp157c has an ADC block with two physical ADCs.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32mp157c.dtsi | 32
1 file changed, 32 insertions(+)
diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi
b/arch/arm/boot/dts/stm32mp157c.dtsi
index bc3eddc
Add support for STM32MP1 Analog to Digital Converter variant.
It's quite similar to STM32H7 ADC and re-use most of existing driver.
Fabrice Gasnier (3):
dt-bindings: iio: stm32-adc: add support for STM32MP1.
iio: adc: stm32-adc: add support for STM32MP1
ARM: dts: stm32: Add ADC suppo
stm32mp157c has vrefbuf regulator that can provide analog reference
voltage from 1500mV to 2500mV.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32mp157c.dtsi | 9 +
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi
b/arch/arm/boot/dts
Add LPtimer definitions, depending on features they provide:
- lptimer1 & 2 can act as PWM, trigger and encoder/counter
- lptimer3 can act as PWM and trigger
- lptimer4 & 5 can act as PWM
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32mp157c.dt
stm32mp157c evaluation board has TIM2_CH4, TIM8_CH4 and TIM12_CH1
available on GPIO expansion connector.
Add PWM and associated triggers (for ADC/DAC) on these timers.
Keep them disabled so these pins can be used as GPIOs by default.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts
Enable timer 6 on stm32mp157c-ed1 that can serve as trigger for
ADC for instance.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32mp157c-ed1.dts | 7 +++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/stm32mp157c-ed1.dts
b/arch/arm/boot/dts/stm32mp157c-ed1.dts
This series adds support for STM32 timers to stm32mp157c. These
timers can act PWM, trigger and/or encoder.
Populate stm32mp157c SOC and ed1/ev1 boards.
Fabrice Gasnier (4):
ARM: dts: stm32: add timers support to stm32mp157c
ARM: dts: stm32: add PWM pins used on stm32mp157c-ev1 board
ARM
stm32mp157c evaluation board has following PWM pins available on GPIO
expansion connector:
- TIM2_CH4 (PA3)
- TIM8_CH4 (PI2)
- TIM12_CH1 (PH6)
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32mp157-pinctrl.dtsi | 27 +++
1 file changed, 27 insertions(+)
diff
Add PWM and trigger support to stm32mp157c.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32mp157c.dtsi | 283 +
1 file changed, 283 insertions(+)
diff --git a/arch/arm/boot/dts/stm32mp157c.dtsi
b/arch/arm/boot/dts/stm32mp157c.dtsi
index bc3eddc
-wide to avoid shortage on DMA request
lines as there's significant amount of timer instances that can
request up to 7 channels.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Rob Herring
Reviewed-by: Benjamin Gaignard
---
.../devicetree/bindings/mfd/stm32-timers.txt
argin).
- Do a 2nd capture, with scaled capture window.
This increases accuracy, especially at high rates.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
Acked-by: Thierry Reding
---
Changes in v2:
- Adopt DMA read from MFD core.
---
drivers/pwm/pwm-stm32.c
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
Acked-by: Thierry Reding
---
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 mo
for instance (but not limited to).
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
Changes in v5:
- fix warning on dma_mapping_error() that doesn't return an error code.
- move stm32_timers_dma struct to header file as discussed with Lee.
This allows to remove alloc for
Using input prescaler, capture unit will trigger DMA once every
configurable /2, /4 or /8 events (rising edge). This helps improve
period (only) capture accuracy at high rates.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
Acked-by: Thierry Reding
---
Changes in v2:
- Adopt DMA
Enable pwm3 input capture on stm32f429i-eval, by using DMA.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
arch/arm/boot/dts/stm32429i-eval.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/stm32429i-eval.dts
b/arch/arm/boot/dts/stm32429i-eval.dts
exported routine prototype now use generic device struct, more
various comments (see patch 2 changelog).
Resend v2:
- Add collected Acks
Changes in v2:
- Abstract DMA handling from child driver: move it to MFD core
- Rework pwm capture routines to adopt this change
- Comment on optional dma support
On 04/17/2018 12:10 PM, Lee Jones wrote:
> On Tue, 17 Apr 2018, Fabrice Gasnier wrote:
>
>> On 04/17/2018 09:12 AM, Lee Jones wrote:
>>> On Mon, 16 Apr 2018, Fabrice Gasnier wrote:
>>>
>>>> STM32 Timers can support up to 7 DMA requests:
>
On 04/17/2018 09:12 AM, Lee Jones wrote:
> On Mon, 16 Apr 2018, Fabrice Gasnier wrote:
>
>> STM32 Timers can support up to 7 DMA requests:
>> - 4 channels, update, compare and trigger.
>> Optionally request part, or all DMAs from stm32-timers MFD core.
>>
>>
stract DMA handling from child driver: move it to MFD core
- Rework pwm capture routines to adopt this change
- Comment on optional dma support, beautify DMAs probe
Fabrice Gasnier (6):
dt-bindings: mfd: stm32-timers: add support for dmas
mfd: stm32-timers: add support for dmas
pwm: stm32: ad
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
Acked-by: Thierry Reding
---
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 mo
argin).
- Do a 2nd capture, with scaled capture window.
This increases accuracy, especially at high rates.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
Acked-by: Thierry Reding
---
Changes in v2:
- Adopt DMA read from MFD core.
---
drivers/pwm/pwm-stm32.c
for instance (but not limited to).
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
Changes in v4:
- Lee's comments: Add kerneldoc header, better format comments.
Changes in v3:
- Basically Lee's comments:
- rather create a struct stm32_timers_dma, and place a reference
Using input prescaler, capture unit will trigger DMA once every
configurable /2, /4 or /8 events (rising edge). This helps improve
period (only) capture accuracy at high rates.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
Acked-by: Thierry Reding
---
Changes in v2:
- Adopt DMA
Enable pwm3 input capture on stm32f429i-eval, by using DMA.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
arch/arm/boot/dts/stm32429i-eval.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/stm32429i-eval.dts
b/arch/arm/boot/dts/stm32429i-eval.dts
-wide to avoid shortage on DMA request
lines as there's significant amount of timer instances that can
request up to 7 channels.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Rob Herring
Reviewed-by: Benjamin Gaignard
---
.../devicetree/bindings/mfd/stm32-timers.txt
On 04/16/2018 04:47 PM, Lee Jones wrote:
> On Mon, 16 Apr 2018, Fabrice Gasnier wrote:
>
>> On 04/16/2018 02:22 PM, Lee Jones wrote:
>>> On Fri, 30 Mar 2018, Fabrice Gasnier wrote:
>>>
>>>> STM32 Timers can support up to 7 DMA requests:
>
On 04/16/2018 02:22 PM, Lee Jones wrote:
> On Fri, 30 Mar 2018, Fabrice Gasnier wrote:
>
>> STM32 Timers can support up to 7 DMA requests:
>> - 4 channels, update, compare and trigger.
>> Optionally request part, or all DMAs from stm32-timers MFD core.
>>
>>
for instance (but not limited to).
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
Changes in v3:
- Basically Lee's comments:
- rather create a struct stm32_timers_dma, and place a reference to it
in existing ddata (instead of adding priv struct).
- rather use a struct d
argin).
- Do a 2nd capture, with scaled capture window.
This increases accuracy, especially at high rates.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
Acked-by: Thierry Reding
---
Changes in v2:
- Adopt DMA read from MFD core.
---
drivers/pwm/pwm-stm32.c
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
Acked-by: Thierry Reding
---
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 mo
Enable pwm3 input capture on stm32f429i-eval, by using DMA.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
arch/arm/boot/dts/stm32429i-eval.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/stm32429i-eval.dts
b/arch/arm/boot/dts/stm32429i-eval.dts
Using input prescaler, capture unit will trigger DMA once every
configurable /2, /4 or /8 events (rising edge). This helps improve
period (only) capture accuracy at high rates.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
Acked-by: Thierry Reding
---
Changes in v2:
- Adopt DMA
port, beautify DMAs probe
Fabrice Gasnier (6):
dt-bindings: mfd: stm32-timers: add support for dmas
mfd: stm32-timers: add support for dmas
pwm: stm32: add capture support
pwm: stm32: improve capture by tuning counter prescaler
pwm: stm32: use input prescaler to improve period capture
ARM
-wide to avoid shortage on DMA request
lines as there's significant amount of timer instances that can
request up to 7 channels.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Rob Herring
Reviewed-by: Benjamin Gaignard
---
.../devicetree/bindings/mfd/stm32-timers.txt
On 03/29/2018 04:31 PM, Lee Jones wrote:
> On Thu, 29 Mar 2018, Fabrice Gasnier wrote:
>
>> On 03/29/2018 02:59 PM, Lee Jones wrote:
>>> On Wed, 28 Mar 2018, Fabrice Gasnier wrote:
>>>
>>>> On 03/28/2018 05:22 PM, Lee Jones wrote:
>&g
On 03/29/2018 02:59 PM, Lee Jones wrote:
> On Wed, 28 Mar 2018, Fabrice Gasnier wrote:
>
>> On 03/28/2018 05:22 PM, Lee Jones wrote:
>>> On Wed, 14 Feb 2018, Fabrice Gasnier wrote:
>>>
>>>> STM32 Timers can support up to 7 DMA requests:
>
On 03/28/2018 05:22 PM, Lee Jones wrote:
> On Wed, 14 Feb 2018, Fabrice Gasnier wrote:
>
>> STM32 Timers can support up to 7 DMA requests:
>> - 4 channels, update, compare and trigger.
>> Optionally request part, or all DMAs from stm32-timers MFD core.
>>
>>
On 02/14/2018 11:04 AM, Fabrice Gasnier wrote:
> This series adds support for capture to stm32-pwm driver.
> Capture is based on DMAs.
> - First two patches are precursor patches
> - Subsequent two patches add support for requesting DMAs to MFD core
> - Next three patches add supp
On 02/23/2018 02:36 PM, Fabrice Gasnier wrote:
> From: Gerald Baeza
>
> STM32 Low-Power Timer supports generic 3 cells pwm to encode
> PWM number, period and polarity.
>
> Signed-off-by: Gerald Baeza
> Signed-off-by: Fabrice Gasnier
> ---
> drivers/pwm/pwm-stm32-lp
When channel clk source is set to "CLKOUT_F" or "CLKOUT_R" (e.g. div2),
sample rate is currently set to half the requested value.
Fixes: eca949800d2d ("IIO: ADC: add stm32 DFSDM support for PDM
microphone")
Signed-off-by: Fabrice Gasnier
---
drivers/
This series brings fixes to STM32 DFSDM ADC driver.
Fabrice Gasnier (2):
iio: adc: stm32-dfsdm: fix successive oversampling settings
iio: adc: stm32-dfsdm: fix sample rate for div2 spi clock
drivers/iio/adc/stm32-dfsdm-adc.c | 17 ++---
1 file changed, 14 insertions(+), 3
16kHz (again): sample rate will remain 8kHz without error
Fixes: e2e6771c6462 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support")
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-dfsdm-adc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/
On 02/24/2018 02:03 PM, Jonathan Cameron wrote:
> On Fri, 23 Feb 2018 13:50:59 +0100
> Fabrice Gasnier wrote:
>
>> Misc fixes & style improvements:
>> - checkpatch warns about line over 80 characters.
>> - remove extra spaces and a blank line (e.g. checkpatch
From: Gerald Baeza
STM32 Low-Power Timer supports generic 3 cells pwm to encode
PWM number, period and polarity.
Signed-off-by: Gerald Baeza
Signed-off-by: Fabrice Gasnier
---
drivers/pwm/pwm-stm32-lp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pwm/pwm-stm32-lp.c b
Add missing generic #pwm-cells on STM32 LPTimer to allow initialization
of channel, period and polarity.
Fabrice Gasnier (1):
ARM: dts: stm32: update pwm-cells for LPTimer on stm32h743
Gerald Baeza (2):
dt-bindings: pwm-stm32-lp: add #pwm-cells
pwm: stm32: LPTimer: use 3 cells xlate
LPTimer pwm cells should be updated to 3, to allow initialization of
channel, period and polarity.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32h743.dtsi | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/stm32h743.dtsi b/arch/arm/boot/dts/stm32h743.dtsi
From: Gerald Baeza
STM32 Low-Power Timer supports generic 3 cells pwm to encode
PWM number, period and polarity.
Signed-off-by: Gerald Baeza
Signed-off-by: Fabrice Gasnier
Reviewed-by: Rob Herring
---
Documentation/devicetree/bindings/pwm/pwm-stm32-lp.txt | 3 +++
1 file changed, 3
Misc fixes & style improvements:
- checkpatch warns about line over 80 characters.
- remove extra spaces and a blank line (e.g. checkpatch --strict)
- remove bad error message always printed in probe routine.
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-dfsdm-adc.c | 9
Fix use of compatible data: stm32h7 regmap configuration is statically
used. Rather use regmap_cfg from compatible data.
Fixes: bed73904e76f ("IIO: ADC: add stm32 DFSDM core support")
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-dfsdm-core.c | 2 +-
1 file changed, 1
reg property should be checked against number of available filters.
BTW, dfsdm->num_fls wasn't used. But it can be used for this purpose.
This prevents using data out of allocated dfsdm->fl_list array.
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-dfsdm-adc.c | 4 ++--
1 f
Add missing clock source selection. In case "audio" clock is provided,
it's unused currently: "dfsdm" clock is wrongly used by default.
Fixes: bed73904e76f ("IIO: ADC: add stm32 DFSDM core support")
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-d
work properly (e.g. unique 'ch_id'
is used). Converting any other channel result in conversion timeout.
Fix it by getting rid of 'ch_id', use chan->channel instead.
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-dfsdm-adc.c | 39 +---
stm32_dfsdm_stop_channel must be called with channel id, not filter id.
Fixes: e2e6771c6462 ("IIO: ADC: add STM32 DFSDM sigma delta ADC support")
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-dfsdm-adc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/d
spi-max-frequency is requested for SPI master mode (only), to tune output
clock. It may happen requested frequency isn't reachable.
Add explicit check, so probe fails with error in this case. Otherwise,
output clock may simply be silently turned off (conversions fail).
Signed-off-by: Fa
This series brings some fixes and improvements to STM32 DFSDM driver.
Fabrice Gasnier (7):
iio: adc: stm32-dfsdm: fix compatible data use
iio: adc: stm32-dfsdm: fix call to stop channel
iio: adc: stm32-dfsdm: fix clock source selection
iio: adc: stm32-dfsdm: fix multiple channel
uot;.
BTW, make the description complete by describing both rising/falling
edges as described in reference manuals.
Fixes: 6c82f947fc97 ("IIO: add DT bindings for stm32 DFSDM filter")
Signed-off-by: Fabrice Gasnier
---
Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.tx
c modulator")
Signed-off-by: Fabrice Gasnier
---
Documentation/devicetree/bindings/iio/adc/sigma-delta-modulator.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/Documentation/devicetree/bindings/iio/adc/sigma-delta-modulator.txt
b/Documentation/devicetree/bi
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
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 +++
2 fil
Enable pwm3 input capture on stm32f429i-eval, by using DMA.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
arch/arm/boot/dts/stm32429i-eval.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/stm32429i-eval.dts
b/arch/arm/boot/dts/stm32429i-eval.dts
Using input prescaler, capture unit will trigger DMA once every
configurable /2, /4 or /8 events (rising edge). This helps improve
period (only) capture accuracy at high rates.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
Changes in v2:
- Adopt DMA read from MFD core
-eval board.
---
Resend v2:
- Add collected Acks
Changes in v2:
- Abstract DMA handling from child driver: move it to MFD core
- Rework pwm capture routines to adopt this change
- Comment on optional dma support, beautify DMAs probe
Fabrice Gasnier (8):
pwm: stm32: fix, remove unused struct device
There may be a race, when configuring two pwm channels, with different
prescaler values, when there's no active channel yet.
Add mutex lock to avoid concurrent access on pwm apply state.
This is also precursor patch for pwm capture support.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Ben
argin).
- Do a 2nd capture, with scaled capture window.
This increases accuracy, especially at high rates.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
Changes in v2:
- Adopt DMA read from MFD core.
---
drivers/pwm/pwm-stm32.c | 24 +++-
1 file change
dev is never assigned nor used. remove it.
Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
drivers/pwm/pwm-stm32.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/p
-wide to avoid shortage on DMA request
lines as there's significant amount of timer instances that can
request up to 7 channels.
Signed-off-by: Fabrice Gasnier
Reviewed-by: Rob Herring
Reviewed-by: Benjamin Gaignard
---
.../devicetree/bindings/mfd/stm32-timers.txt
for instance (but not limited to).
Signed-off-by: Fabrice Gasnier
Reviewed-by: Benjamin Gaignard
---
Changes in v2:
- Abstract DMA handling from child driver: move it to MFD core
- Add comments on optional dma support
---
drivers/mfd/stm32-timers.c | 215
On 01/26/2018 04:11 PM, Fabrice Gasnier wrote:
> This series adds support for capture to stm32-pwm driver.
> Capture is based on DMAs.
> - First two patches are precursor patches
> - Subsequent two patches add support for requesting DMAs to MFD core
> - Next three patches add supp
stm32_vrefbuf_enable() wrongly checks VRR bit: 0 stands for not ready,
1 for ready. It currently checks the opposite.
This makes enable routine to exit immediately without waiting for ready
flag.
Fixes: 0cdbf481e927 ("regulator: Add support for stm32-vrefbuf")
Signed-off-by: Fabri
From: Gerald Baeza
STM32 Low-Power Timer supports generic 3 cells pwm to encode
PWM number, period and polarity.
Signed-off-by: Gerald Baeza
Signed-off-by: Fabrice Gasnier
---
drivers/pwm/pwm-stm32-lp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pwm/pwm-stm32-lp.c b
Add missing generic #pwm-cells on STM32 LPTimer to allow initialization
of channel, period and polarity.
Fabrice Gasnier (1):
ARM: dts: stm32: update pwm-cells for LPTimer on stm32h743
Gerald Baeza (2):
dt-bindings: pwm-stm32-lp: add #pwm-cells
pwm: stm32: LPTimer: use 3 cells xlate
From: Gerald Baeza
STM32 Low-Power Timer supports generic 3 cells pwm to encode
PWM number, period and polarity.
Signed-off-by: Gerald Baeza
Signed-off-by: Fabrice Gasnier
---
Documentation/devicetree/bindings/pwm/pwm-stm32-lp.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a
LPTimer pwm cells should be updated to 3, to allow initialization of
channel, period and polarity.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32h743.dtsi | 5 +
1 file changed, 5 insertions(+)
diff --git a/arch/arm/boot/dts/stm32h743.dtsi b/arch/arm/boot/dts/stm32h743.dtsi
-eval board.
---
Changes in v2:
- Abstract DMA handling from child driver: move it to MFD core
- Rework pwm capture routines to adopt this change
- Comment on optional dma support, beautify DMAs probe
Fabrice Gasnier (8):
pwm: stm32: fix, remove unused struct device
pwm: stm32: protect common
Using input prescaler, capture unit will trigger DMA once every
configurable /2, /4 or /8 events (rising edge). This helps improve
period (only) capture accuracy at high rates.
Signed-off-by: Fabrice Gasnier
---
Changes in v2:
- Adopt DMA read from MFD core.
---
drivers/pwm/pwm-stm32.c
-wide to avoid shortage on DMA request
lines as there's significant amount of timer instances that can
request up to 7 channels.
Signed-off-by: Fabrice Gasnier
---
.../devicetree/bindings/mfd/stm32-timers.txt | 20
1 file changed, 20 insertions(+)
diff --
Enable pwm3 input capture on stm32f429i-eval, by using DMA.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32429i-eval.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/stm32429i-eval.dts
b/arch/arm/boot/dts/stm32429i-eval.dts
index 293ecb9..d5498dd 100644
dev is never assigned nor used. remove it.
Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Signed-off-by: Fabrice Gasnier
---
drivers/pwm/pwm-stm32.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index 6139512..5952
for instance (but not limited to).
Signed-off-by: Fabrice Gasnier
---
Changes in v2:
- Abstract DMA handling from child driver: move it to MFD core
- Add comments on optional dma support
---
drivers/mfd/stm32-timers.c | 215 ++-
include/linux/mfd/stm32
Signed-off-by: Fabrice Gasnier
---
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 +++
2 files changed, 187 insertions(+)
di
argin).
- Do a 2nd capture, with scaled capture window.
This increases accuracy, especially at high rates.
Signed-off-by: Fabrice Gasnier
---
Changes in v2:
- Adopt DMA read from MFD core.
---
drivers/pwm/pwm-stm32.c | 24 +++-
1 file changed, 23 insertions(+), 1 deletion(-)
There may be a race, when configuring two pwm channels, with different
prescaler values, when there's no active channel yet.
Add mutex lock to avoid concurrent access on pwm apply state.
This is also precursor patch for pwm capture support.
Signed-off-by: Fabrice Gasnier
---
drivers/pw
On 01/24/2018 03:56 PM, Lee Jones wrote:
> On Wed, 24 Jan 2018, Fabrice Gasnier wrote:
>> On 01/23/2018 05:41 PM, Lee Jones wrote:
>>> On Tue, 23 Jan 2018, Fabrice Gasnier wrote:
>>>> On 01/23/2018 04:30 PM, Lee Jones wrote:
>>>>> On Tue, 23 Jan 2018,
On 01/23/2018 05:41 PM, Lee Jones wrote:
> On Tue, 23 Jan 2018, Fabrice Gasnier wrote:
>> On 01/23/2018 04:30 PM, Lee Jones wrote:
>>> On Tue, 23 Jan 2018, Fabrice Gasnier wrote:
>>>
>>>> On 01/23/2018 02:32 PM, Lee Jones wrote:
>>>>> On Tue,
support for STM32H7")
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-adc.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/adc/stm32-adc.c b/drivers/iio/adc/stm32-adc.c
index ca3b865..8177a92 100644
--- a/drivers/iio/adc/stm32-adc.c
+++ b/drivers/iio/
On 01/23/2018 04:30 PM, Lee Jones wrote:
> On Tue, 23 Jan 2018, Fabrice Gasnier wrote:
>
>> On 01/23/2018 02:32 PM, Lee Jones wrote:
>>> On Tue, 16 Jan 2018, Fabrice Gasnier wrote:
>>>
>>>> STM32 Timers can support up to 7 dma requests:
&g
On 01/23/2018 02:32 PM, Lee Jones wrote:
> On Tue, 16 Jan 2018, Fabrice Gasnier wrote:
>
>> STM32 Timers can support up to 7 dma requests:
>> 4 channels, update, compare and trigger.
>> Optionally request part, or all dmas from stm32-timers MFD core.
>> Also,
There may be a race, when configuring two pwm channels, with different
prescaler values, when there's no active channel yet.
Add mutex lock to avoid concurrent access on pwm apply state.
This is also precursor patch for pwm capture support.
Signed-off-by: Fabrice Gasnier
---
drivers/pw
Enable pwm3 input capture on stm32f429i-eval, by using DMA.
Signed-off-by: Fabrice Gasnier
---
arch/arm/boot/dts/stm32429i-eval.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boot/dts/stm32429i-eval.dts
b/arch/arm/boot/dts/stm32429i-eval.dts
index 293ecb9..d5498dd 100644
Using input prescaler, capture unit will trigger DMA once every
configurable /2, /4 or /8 events (rising edge). This can help improve
period (only) capture accuracy.
Signed-off-by: Fabrice Gasnier
---
drivers/pwm/pwm-stm32.c | 67 ++--
include/linux
STM32 Timers can support up to 7 dma requests:
4 channels, update, compare and trigger.
Optionally request part, or all dmas from stm32-timers MFD core.
Also, keep reference of device's bus address to allow child drivers to
transfer data from/to device by using dma.
Signed-off-by: Fabrice Ga
-eval board.
Fabrice Gasnier (8):
pwm: stm32: fix, remove unused struct device
pwm: stm32: protect common prescaler for all channels
dt-bindings: mfd: stm32-timers: add support for dmas
mfd: stm32-timers: add support for dmas
pwm: stm32: add capture support
pwm: stm32: improve capture by
Signed-off-by: Fabrice Gasnier
---
drivers/pwm/pwm-stm32.c | 301 ++-
include/linux/mfd/stm32-timers.h | 16 +++
2 files changed, 314 insertions(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index 3ac55df..b9c7e8
argin).
- Do a 2nd capture, with scaled capture window.
This increases accuracy, especially at high rates.
Signed-off-by: Fabrice Gasnier
---
drivers/pwm/pwm-stm32.c | 26 +-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pw
-wide to avoid shortage on DMA request
lines as there's significant amount of timer instances that can
request up to 7 channels.
Signed-off-by: Fabrice Gasnier
---
.../devicetree/bindings/mfd/stm32-timers.txt | 20
1 file changed, 20 insertions(+)
diff --
dev is never assigned nor used. remove it.
Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Signed-off-by: Fabrice Gasnier
---
drivers/pwm/pwm-stm32.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index 6139512..5952
Fix buffer period size, by taking scan channels number into account.
Fixes: 2763ea0585c9 ("iio: adc: stm32: add optional dma support")
Signed-off-by: Fabrice Gasnier
---
drivers/iio/adc/stm32-adc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/adc/stm32
301 - 400 of 690 matches
Mail list logo