From nobody Mon Feb 9 16:02:53 2026 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3D0835CB9C for ; Tue, 3 Feb 2026 17:45:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770140742; cv=none; b=GI8ry5qJsWlmneXdUjpGTwIlLb4151KhN0mwHhuvR1svEIkyxPQXSqUKjSaOECIVs6qN4u23LvymQ+huFm3IBb8TruRDGDMRk+njVDYaBYfVToow4zS0IzodRgLaXIaVThznOoA1g6peoGxSPguh/C4/EB8u++4rRUZaEC7qgxU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770140742; c=relaxed/simple; bh=jysDirCxM9VRNdx+7Si4w9nZh+octhRlQsZ5XOvW/bQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SA7BMCUWX9BYtRi5edol87vWYykHL7EgXRZCUXWDPV62yxoic1Y/YxsLutC6+zOeEpiGiNfKF9k5gj/1JIA8UtCflPeA3b6Dqi7XZy+lW2L6aK2fiu0M9Eba0yNJwoJuJ6pd4MypmxoGKyGn9SDc2DTJNHXzIblfMrfC3TIjgUA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=V4A1EQjX; arc=none smtp.client-ip=209.85.218.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="V4A1EQjX" Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-b87266fdf56so77178866b.2 for ; Tue, 03 Feb 2026 09:45:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770140739; x=1770745539; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eDKWiaZ02MFYPKM7YM/ZCDrXn2+T9deiZZcFOvrBfsI=; b=V4A1EQjXRaeYF1LzTFyrDUbTOZxqrfOj5fmUFwZQqBk7gTrf7RLIbWMPV8qozy63PY rlEDGJ6zFEIvxuX6ONKN7eP0fgTvodu/dRnjO2VjMtyOP0nZpnxLEbP6PJzMpSJmK4Lo gQ34ES9vwtMNEKnFg+frNwCvxcJNMqZaGgvJIgTZOf2J6zcw9hYkE5U/fnR3l9Sj5I3U SYP7Fw2xgMsPyAS5QmP12qkw8+t5Rq1UmiH3nLXepcKwAnNGf/2y9HTLq5vN5s8exlrc /rQebKBeCZx7TOLJ6BLE6rcewFfFt2fEeOfeH4Hzc6uBI2Skk9NZ6ndJBElsjFmIdaED UsFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770140739; x=1770745539; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=eDKWiaZ02MFYPKM7YM/ZCDrXn2+T9deiZZcFOvrBfsI=; b=XinHfDMVJ1ZfNU02I7PyNJsx/nyM61xsvzo0U27nXHhLTN+QjHTBbkgzK/bnc+i60o a/jRnCCMaarfL2zu8ZueWQYVMHZF9L2eU+PQ4H92HXHjDPyM5etsIDsyy447sik1o0Yx J7uH46nuiw45z9LRfmBcrlOku0jIFVluzVQZVW4EKqxrdHNEp1wApUlQfCut9900lHi4 qUwh632YYbTeCr76GpxPJ44BnUA2MXfDYcdrQ87JBA+HQMFaU28v+pr9u2UdZCgL7x2Q m5EZK5XVZcagtpU+9k448lD+C6EFFOiX3vANR6suLoQ+JdbFhmMHZnPqk7SW/P/mQbuT f68A== X-Forwarded-Encrypted: i=1; AJvYcCUyBeLMjL+x7jgC0LRdhymg8YRDdB6Xc86/XuipStqFeyD4hXGEt9DA6oUw/a37+b84vfO7/1Mz1kXxFyk=@vger.kernel.org X-Gm-Message-State: AOJu0Yzrj5paZX5atQwwJ82Nk7qCUBPufjoMq42/Jrt13TCjIDEI/WRM kUJsN9xrQDEBWQ3fvH73aNDQ5q8p6Wq7RH6z3ic1VdQJ01Et9hFgrF1R X-Gm-Gg: AZuq6aJ4ls96w0Qc1KTpf71aFM04jFrFqDqpPMGfMfaUaxmI24YlXrnFjRUpqsbZjom Q8JUqXAIT7uGaiE8xt3JkaJCDXUQ5cGG4+7JY4mv0/HgFCqPNHUOlnKQriNPHD/hWy9fCjFQDQN Cazop7WNcOZE7jPaq1Rp3WiigAK3bEB3R94TSZxrwiFnxJEU0KGhhvc+GVSDJzNlDMBz9XdBRQ4 VEIjqQ9CU1j7DXeh9bVme8R+ErDwbKqyzqxzcYl4blO1d2qYnd/uy+kRCi6xDH5J/E1Jp+xkZwN KtdqrXmf6CsUHpJoXcVWtJfEU9t/VpiiEFpm5cx+bZrAHCqWCapbILVGj6WG8T3OSLsAMVB24Hv 4cswXoc6/Oytf42tfuuKWEaHbH/RJlHLUGHPTIl1GTOB8PC3A/2LTVBGEytXa4RFbSV143deyCz 1akxMxB77ZHRIRX1OoQmdME9uwUf6Xko9pnefxF5Ic8xDce6WwoERhK4y2FEMbtxKM X-Received: by 2002:a17:907:84a:b0:b8e:64e:1fd with SMTP id a640c23a62f3a-b8e9ef2082amr13890966b.1.1770140738986; Tue, 03 Feb 2026 09:45:38 -0800 (PST) Received: from laptok.lan (87-205-5-123.static.ip.netia.com.pl. [87.205.5.123]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b8e9fef001csm5078866b.44.2026.02.03.09.45.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Feb 2026 09:45:38 -0800 (PST) From: =?UTF-8?q?Tomasz=20Paku=C5=82a?= To: jikos@kernel.org, bentiss@kernel.org Cc: oleg@makarenk.ooo, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, tomasz.pakula.oficjalny@gmail.com Subject: [PATCH 3/5] HID: pidff: Add MISSING_NEG_SATURATION quirk Date: Tue, 3 Feb 2026 18:45:29 +0100 Message-ID: <20260203174531.2866644-4-tomasz.pakula.oficjalny@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260203174531.2866644-1-tomasz.pakula.oficjalny@gmail.com> References: <20260203174531.2866644-1-tomasz.pakula.oficjalny@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is the same case as the previous MISSING_NEG_COEFFICIENT quirk Co-developed-by: Oleg Makarenko Signed-off-by: Oleg Makarenko Signed-off-by: Tomasz Paku=C5=82a --- drivers/hid/usbhid/hid-pidff.c | 14 ++++++++++---- drivers/hid/usbhid/hid-pidff.h | 3 +++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index aebf6c89643f..17bdc36d1908 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c @@ -619,16 +619,19 @@ static void pidff_set_condition_report(struct pidff_d= evice *pidff, effect->u.condition[i].center); pidff_set_signed(&pidff->set_condition[PID_POS_COEFFICIENT], effect->u.condition[i].right_coeff); + pidff_set(&pidff->set_condition[PID_POS_SATURATION], + effect->u.condition[i].right_saturation); =20 /* Omit Negative Coefficient if missing */ if (!(pidff->quirks & HID_PIDFF_QUIRK_MISSING_NEG_COEFFICIENT)) pidff_set_signed(&pidff->set_condition[PID_NEG_COEFFICIENT], effect->u.condition[i].left_coeff); =20 - pidff_set(&pidff->set_condition[PID_POS_SATURATION], - effect->u.condition[i].right_saturation); - pidff_set(&pidff->set_condition[PID_NEG_SATURATION], - effect->u.condition[i].left_saturation); + /* Omit Negative Saturation if missing */ + if (!(pidff->quirks & HID_PIDFF_QUIRK_MISSING_NEG_SATURATION)) + pidff_set_signed(&pidff->set_condition[PID_NEG_SATURATION], + effect->u.condition[i].left_saturation); + pidff_set(&pidff->set_condition[PID_DEAD_BAND], effect->u.condition[i].deadband); hid_hw_request(pidff->hid, pidff->reports[PID_SET_CONDITION], @@ -1097,6 +1100,9 @@ static int pidff_find_fields(struct pidff_usage *usag= e, const u8 *table, else if (table[i] =3D=3D pidff_set_condition[PID_NEG_COEFFICIENT]) PIDFF_MISSING_FIELD(NEG_COEFFICIENT, quirks); =20 + else if (table[i] =3D=3D pidff_set_condition[PID_NEG_SATURATION]) + PIDFF_MISSING_FIELD(NEG_SATURATION, quirks); + else if (strict) { pr_debug("failed to locate %d\n", i); return -1; diff --git a/drivers/hid/usbhid/hid-pidff.h b/drivers/hid/usbhid/hid-pidff.h index 5bf54e981543..8d879067718f 100644 --- a/drivers/hid/usbhid/hid-pidff.h +++ b/drivers/hid/usbhid/hid-pidff.h @@ -24,6 +24,9 @@ /* Allow devices with missing negative coefficient in the set condition us= age */ #define HID_PIDFF_QUIRK_MISSING_NEG_COEFFICIENT BIT(5) =20 +/* Allow devices with missing negative saturation in the set condition usa= ge */ +#define HID_PIDFF_QUIRK_MISSING_NEG_SATURATION BIT(6) + #ifdef CONFIG_HID_PID int hid_pidff_init(struct hid_device *hid); int hid_pidff_init_with_quirks(struct hid_device *hid, u32 initial_quirks); --=20 2.52.0