Re: [PATCH] ARM: dts: stm32: Add timer interrupts

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

 



On 12/15/21 7:20 PM, Uwe Kleine-König wrote:
> Hello Fabrice,
> 
> On Wed, Dec 15, 2021 at 06:43:06PM +0100, Fabrice Gasnier wrote:
>> On 12/15/21 4:25 PM, Uwe Kleine-König wrote:
>>>  .../bindings/mfd/st,stm32-timers.yaml         | 13 +++++++
>>>  arch/arm/boot/dts/stm32mp151.dtsi             | 34 +++++++++++++++++++
>>>  2 files changed, 47 insertions(+)
> 
>> Could you split dt-bindings into a separate patch ?
> 
> sure. I considered that before sending, but wasn't sure it's worth these
> two little changes.
> 
>> I'm a bit curious... I don't see driver update here, to use the timer
>> interrupts from the MFD, or child drivers.
>> Do you have particular use case in mind ?
> 
> My usecase is the compare-capture functionality. The eventual goal is to
> measure the frequency of rising edges on an input.

Hi Uwe,

Thanks for sharing this.
Currently there's one option you could use to achieve this. PWM capture
is implemented in pwm-stm32 driver. It's based on DMAs via a routine
exported in the MFD driver.

Could this fit your need here ?

I'd rather prefer to avoid having concurrent implementations e.g. DMA or
IRQ, for maintenance reason, to address the same use case.
Of course there maybe some case where this may not be avoided, such as:
shortage on DMA channels, no DMA available on some particular timer
instance. Do you hit some limitation around these ?

> 
> The current situation is that there is already a custom driver for the
> i.MX25 SoC, the short-term goal is to replicate it's functionality on
> stm32mp1. The long-term goal is to create a counter driver for both.

There's a counter driver also for STM32 timer (stm32-timer-cnt). For
sure, it could be extended/enhanced with the new chrdev interface, with
IRQs.
Is it what you have in mind ?

Regarding this patch (and the V2), I've no objection, mainly Rob's
comment to address.

Best Regards,
Fabrice

> 
> Best regards
> Uwe
> 



[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