Re: [PATCH v2 1/2] pwm: pwm-gpio: New driver

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

 



Hello Uwe,

On Sun, Jan 17, 2021 at 07:45:56PM +0100, Uwe Kleine-König wrote:
> > +	pwm_gpio->output = pwm_gpio->state ^ pwm_gpio->cur.invert;

So far I understood also only comment. What wasn't obvious immediately
is the state member.

Would it become clear enough by adding: "state is the logical PWM output; the actual PIN output level is inverted by XORing with cur.invert when the latter is true" ?

Would it be ok to cancel the timer first and then "return
pwmchip_remove(...)"?

No. The PWM must stay functional until pwmchip_remove() returns.


Could you please clarify what I should do when pwmchip_remove returns non-zero? In my original implementation

- if pwmchip_remove returns a non-zero error code, I return it to the caller and do not cancel the timer. - if pwmchip_remove returns zero, I cancel the timer and return zero to the caller

So under no circumstance I return a different code from what pwmchip_remove does...

Best regards,
Nicola




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux