mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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: f1d8a071d4
("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>
This commit is contained in:
parent
4aa3b75c74
commit
00f4bc5184
1 changed files with 1 additions and 1 deletions
|
@ -368,7 +368,7 @@ static int quad8_action_read(struct counter_device *counter,
|
|||
|
||||
/* Handle Index signals */
|
||||
if (synapse->signal->id >= 16) {
|
||||
if (priv->preset_enable[count->id])
|
||||
if (!priv->preset_enable[count->id])
|
||||
*action = COUNTER_SYNAPSE_ACTION_RISING_EDGE;
|
||||
else
|
||||
*action = COUNTER_SYNAPSE_ACTION_NONE;
|
||||
|
|
Loading…
Reference in a new issue