diff options
author | Min Li <min.li.xe@renesas.com> | 2022-05-24 16:45:01 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-05-26 06:51:32 +0200 |
commit | d0bbe0328fe552ff3211b3cbbf6117a885a3d5b2 (patch) | |
tree | 7454e84b45d57b46169e0a00e405ff2a9f4636f9 /drivers/ptp/ptp_clockmatrix.c | |
parent | net: ethernet: ti: am65-cpsw: Fix fwnode passed to phylink_create() (diff) | |
download | linux-d0bbe0328fe552ff3211b3cbbf6117a885a3d5b2.tar.xz linux-d0bbe0328fe552ff3211b3cbbf6117a885a3d5b2.zip |
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 '')
-rw-r--r-- | drivers/ptp/ptp_clockmatrix.c | 2 |
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, |