ptp: ptp_clockmatrix: fix is_single_shot

is_single_shot should return false for the power_of_2 mask

Fixes: bec6759252 ("ptp: ptp_clockmatrix: Add PTP_CLK_REQ_EXTTS support")
Signed-off-by: Min Li <min.li.xe@renesas.com>
Link: https://lore.kernel.org/r/1653403501-12621-1-git-send-email-min.li.xe@renesas.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Min Li 2022-05-24 10:45:01 -04:00 committed by Jakub Kicinski
parent 0b7180072a
commit d0bbe0328f
1 changed files with 1 additions and 1 deletions

View File

@ -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,