Commit d0bbe032 authored by Min Li's avatar Min Li Committed by Jakub Kicinski

ptp: ptp_clockmatrix: fix is_single_shot

is_single_shot should return false for the power_of_2 mask

Fixes: bec67592 ("ptp: ptp_clockmatrix: Add PTP_CLK_REQ_EXTTS support")
Signed-off-by: default avatarMin Li <min.li.xe@renesas.com>
Link: https://lore.kernel.org/r/1653403501-12621-1-git-send-email-min.li.xe@renesas.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 0b718007
......@@ -267,7 +267,7 @@ static int arm_tod_read_trig_sel_refclk(struct idtcm_channel *channel, u8 ref)
static bool is_single_shot(u8 mask)
{
/* Treat single bit ToD masks as continuous trigger */
return mask <= 8 && is_power_of_2(mask);
return !(mask <= 8 && is_power_of_2(mask));
}
static int idtcm_extts_enable(struct idtcm_channel *channel,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment