[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1605b2e0-19af-44f2-20a3-467a895f534f@microchip.com>
Date: Sun, 12 Jun 2022 21:20:10 +0000
From: <Conor.Dooley@...rochip.com>
To: <u.kleine-koenig@...gutronix.de>, <Conor.Dooley@...rochip.com>
CC: <thierry.reding@...il.com>, <lee.jones@...aro.org>,
<Daire.McNamara@...rochip.com>, <linux-kernel@...r.kernel.org>,
<linux-pwm@...r.kernel.org>, <linux-riscv@...ts.infradead.org>
Subject: Re: [PATCH 1/2] pwm: add microchip soft ip corePWM driver
On 12/06/2022 22:16, Uwe Kleine-König wrote:
> On Sun, Jun 12, 2022 at 01:00:53PM +0000, Conor.Dooley@...rochip.com wrote:
>> Hey Uwe, one last one for ya..
>>
>> On 08/06/2022 16:13, Uwe Kleine-König wrote:
>>> Hello Conor,
>>>
>>> On Wed, Jun 08, 2022 at 12:12:37PM +0000, Conor.Dooley@...rochip.com wrote:
>>>> On 07/06/2022 21:07, Uwe Kleine-König wrote:
>>>>> On Tue, Jun 07, 2022 at 09:45:51AM +0100, Conor Dooley wrote:
>>>>>> Add a driver that supports the Microchip FPGA "soft" PWM IP core.
>>>>>>
>>>>>> Signed-off-by: Conor Dooley <conor.dooley@...rochip.com>
>>>>>> ---
>> ---8<---
>>>>>> +struct mchp_core_pwm_registers {
>>>>>> + u8 posedge;
>>>>>> + u8 negedge;
>>>>>> + u8 period_steps;
>>>>>> + u8 prescale;
>>>>>
>>>>> these are the four registers for each channel, right? Can you add a
>>>>> short overview how these registers define the resulting output wave.
>>>>
>>>> Ehh, only the edges are per channel. Does that change anything about
>>>> your feedback?
>>>> I'll add an explanation for each, sure.
>>>
>>> So the channels share the same period? If so you'll have to keep track
>>> of which PWM channels are enabled and only change the period if no other
>>> running channel is affected.
>>
>> When I am capping the period (or not allowing it to be changed in this case
>> here) should I correct the duty cycle so that the the ratio is preserved?
>
> No, the thing to do is: Pick the biggest possible period not bigger
> than the requested period. For that period pick the biggest possible
> duty_cycle not bigger than the requested duty_cycle.
>
> The focus here is to do something somewhat sensible and simple.
Cool, thanks!
Conor.
Powered by blists - more mailing lists