Re: PWM regression causing failures with the pwm-atmel driver

From: Peter Rosin
Date: Tue Jun 20 2023 - 11:43:40 EST


Hi!

2023-06-20 at 16:24, Thorsten Leemhuis wrote:
> On 22.05.23 17:19, Peter Rosin wrote:
>>
>> I have a device with a "sound card" that has an amplifier that needs
>> an extra boost when high amplification is requested. This extra
>> boost is controlled with a pwm-regulator.
>>
>> As of commit c73a3107624d ("pwm: Handle .get_state() failures") this
>> device no longer works. I have tracked the problem to an unfortunate
>> interaction between the underlying PWM driver and the PWM core.
>> [...]>
>> Approach 1. will maybe clobber the saved pwm->state such that
>> it no longer works to get the period/duty_cycle if/when the
>> PWM is disabled? Maybe only for some corner case? But that might
>> be a significant corner case?
>>
>> Approach 2. will maybe mess up some unrelated functionality?
>>
>> Approach 3. is ugly, intrusive and is in all likelihood
>> incomplete. It also needs a rebase from the culprit commit.
>>
>> #regzbot introduced c73a3107624d
>
> What happened to this? There was quite a bit of discussion, but then
> nothing happened anymore.

I was seriously confused by another regression that caused my
user space to fail similarly (The sound driver didn't behave, but
for vastly different reasons). My bad, I should have made more
thorough checks before crying wolf.

So, this regression had already been fixed when I reported it.
For the curious, the other regression has also been fixed, merged
and picked up by stable. For the really curious, 2a6c7e8cc74e
("dmaengine: at_hdmac: Repair bitfield macros for peripheral ID
handling")

All in all, please close this one.

Cheers,
Peter