Re: [PATCH][next] can: kvaser_pciefd: remove redundant negative check on trigger

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

 



On 8/6/19 8:43 AM, Christer Beskow wrote:
>>>>>       pwm_ctrl = trigger & 0xff;
>>>>>       pwm_ctrl |= (top & 0xff) << KVASER_PCIEFD_KCAN_PWM_TOP_SHIFT;
>>>>>       iowrite32(pwm_ctrl, can->reg_base + KVASER_PCIEFD_KCAN_PWM_REG);
>>>>>
> To set the duty cycle to zero (i.e. pwm_stop), the trigger value shall 
> be equal to the top value.
> 
> This is achieved by reading the value of the top bit field from the pwm 
> register and then writing back this value to the trigger and top bit 
> fields.
> 
> The current code is, as you all pointed out, a bit cumbersome. I will 
> send a new patch in a new thread.

Thanks. Please include this description in the patch description.

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux