aboutsummaryrefslogtreecommitdiff
path: root/drivers/ptp
diff options
context:
space:
mode:
authorMin Li2022-05-24 10:45:01 -0400
committerJakub Kicinski2022-05-25 21:51:32 -0700
commitd0bbe0328fe552ff3211b3cbbf6117a885a3d5b2 (patch)
tree7454e84b45d57b46169e0a00e405ff2a9f4636f9 /drivers/ptp
parent0b7180072a9df5e18af5b58410fec38230848a8d (diff)
ptp: ptp_clockmatrix: fix is_single_shot
is_single_shot should return false for the power_of_2 mask Fixes: bec67592521e ("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>
Diffstat (limited to 'drivers/ptp')
-rw-r--r--drivers/ptp/ptp_clockmatrix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c
index cb258e1448d5..c9d451bf89e2 100644
--- a/drivers/ptp/ptp_clockmatrix.c
+++ b/drivers/ptp/ptp_clockmatrix.c
@@ -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,