Skip to content

Commit 00f4bc5

Browse files
author
William Breathitt Gray
committed
counter: 104-quad-8: Fix Synapse action reported for Index signals
Signal 16 and higher represent the device's Index lines. The priv->preset_enable array holds the device configuration for these Index lines. The preset_enable configuration is active low on the device, so invert the conditional check in quad8_action_read() to properly handle the logical state of preset_enable. Fixes: f1d8a07 ("counter: 104-quad-8: Add Generic Counter interface support") Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20230316203426.224745-1-william.gray@linaro.org/ Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
1 parent 4aa3b75 commit 00f4bc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/counter/104-quad-8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ static int quad8_action_read(struct counter_device *counter,
368368

369369
/* Handle Index signals */
370370
if (synapse->signal->id >= 16) {
371-
if (priv->preset_enable[count->id])
371+
if (!priv->preset_enable[count->id])
372372
*action = COUNTER_SYNAPSE_ACTION_RISING_EDGE;
373373
else
374374
*action = COUNTER_SYNAPSE_ACTION_NONE;

0 commit comments

Comments
 (0)