Skip to contentSkip to conversation

FAILED: patch "[PATCH] counter: 104-quad-8: Fix Synapse action reported for Index" failed to apply to 5.15-stable tree

PATCH [email protected] 1 participant 1 message Apr 11, 2023

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

To reproduce the conflict and resubmit, you may use the following commands:

git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x 00f4bc5184c19cb33f468f1ea409d70d19f8f502
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023041101-politely-properly-fe73@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..

Possible dependencies:

00f4bc5184c1 ("counter: 104-quad-8: Fix Synapse action reported for Index signals") aaec1a0f76ec ("counter: Internalize sysfs interface code") ea434ff82649 ("counter: stm32-timer-cnt: Provide defines for slave mode selection") 05593a3fd103 ("counter: stm32-lptimer-cnt: Provide defines for clock polarities")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 00f4bc5184c19cb33f468f1ea409d70d19f8f502 Mon Sep 17 00:00:00 2001
From: William Breathitt Gray <[email protected]>
Date: Thu, 16 Mar 2023 16:34:26 -0400
Subject: [PATCH] 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 f1d8a071d45b ("counter: 104-quad-8: Add Generic Counter interface support")
drivers/counter/104-quad-8.c +1 -1
index d59e4f34a680..d9cb937665cf 100644
@@ -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;