Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp238767rdb; Tue, 19 Dec 2023 15:24:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IGMnKObsODQ4DfUBNkd6/cogRH6fsBF14kSHQm7GK1XL8WmR7ZzZGx2708b1sVivgtsrQxv X-Received: by 2002:a17:90a:c294:b0:28b:8bc8:182c with SMTP id f20-20020a17090ac29400b0028b8bc8182cmr2611291pjt.84.1703028282126; Tue, 19 Dec 2023 15:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703028282; cv=none; d=google.com; s=arc-20160816; b=rpIArTEJ0ydB/bmwcZhVCjFQ1nhapVYDn4A9qJEOJkLgYAFWuauYoO9Ch3PcqhX8ZV RGSQNOaC0uRGheOD/c+xRAPATGsKxCdu+vfyH1ETuAJ/MkQLWHOjzmItB175AApSyKEe +M4sYgesopXJG5Z7opqZEX3lNYmYHsTVTqNf7hBg/+qbRvRFuBcavbk32MQlGmxNpbV3 0HVULB1VCv5id/7sbyg2W1/aFRRWfz2MWRAzlahyJpYftCeztPOLocBu0DLmlyam36kJ iJ32K7Q19xrpsDC6tP2vT0fhjXQ4/Ge3NKPrCOYGYlSEh4IlyyaTjUem1SOOJdvNIOoa qmNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=uS+jo/cah5+bM2v33qxNfOnHr9iwo5Ai7zggbcCPXcY=; fh=39LlH5fhxgBbHUcwfUMIlcvNB5JRWd0I+y5WTi8uar0=; b=L8hLP15d22fpny+Cljz1mj/WIj9U4n0XvV19w7liFWqTT+qEcGw1C1aTJ+50JnY1+4 Ex+dOHqtkq+u9bA6xwPCGY8XKrjpt9bxOoeLO4U2P22sc0oc9tArstVPlLBL7ijz9XRT FJajiUDpSD2wbDbpR8EZjPaAn5yNJXqfBn4AVAuuC5sj1Bqz1ZNNY0Hj9mk2Bi6rIhSj SQgJF/SgwyyxC85Oz0iHWO+1BY+HUoPXsfRnlolfjHipHk3URNhP0wTKdM5DKRxfd7Nh xnHmdJEP641mm2Wz5NRbjkxJp0V5w+MrKGLffmyMGitAD7a9LSPNz6PQQ6g+bkJpknEZ 9Dig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ONISxXJa; spf=pass (google.com: domain of linux-kernel+bounces-6083-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b4-20020a17090acc0400b0028b75e8a4a4si1944354pju.41.2023.12.19.15.24.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 15:24:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6083-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ONISxXJa; spf=pass (google.com: domain of linux-kernel+bounces-6083-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4A010288363 for ; Tue, 19 Dec 2023 23:15:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 230D23D0D0; Tue, 19 Dec 2023 23:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ONISxXJa" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52]) (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 C19E93EA7D; Tue, 19 Dec 2023 23:15:11 +0000 (UTC) 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 Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-50e281b149aso4601022e87.1; Tue, 19 Dec 2023 15:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703027709; x=1703632509; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uS+jo/cah5+bM2v33qxNfOnHr9iwo5Ai7zggbcCPXcY=; b=ONISxXJaqpc0x39nqOHGyMOiaOa2zL/XOItiVhZqBG9cMOUSCTxt6LP/k7Smh4zim1 eI7m8zfpKJ7EjhKf6Rk0Az2UvZX1x0ZJMM91KDVtwlRuyyry70e+7KKmdTdjdpD6DZji NzT3DPXtRNs5orFnk2M1YmCFlkcJyrOnvCP1wIlas+ISRzb59+OFqYVV5U59CD65Mr9B p253wuLSMPmrEOniYNy1T9+FpQHZtgZlSzowrsG2KWWkOz4b6Dl46edTmSjnqDccnA6k PSNht3WXBzM42sVqCKHIuVe3BsSBbmA6kTnzBXA8cBUYXdLtCJfC+Z1L84lFViLGMJM4 +jTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703027709; x=1703632509; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uS+jo/cah5+bM2v33qxNfOnHr9iwo5Ai7zggbcCPXcY=; b=GkMMAKQwi8egUmz15xofwL7QoTg5Hsmjw7iGp4F5XIv4oP3yPVtarjnTlUHbjOzIx+ RvLGBF2N2eJUHnQ6rPjpi9QAWTgmu9qQZTcS7/nhtLQfQ0jIszVcv978qqs08BiBNXbG KtjbPTQSK9dvhmYLcO6py8fPNRxX9YxI2rZrWS558bs0ff8dnUxrsA1ihQxQ0S1Iwwkp kFtAVagvpb0mzzS4n+SVf+MaJMg4sNQkx/ZYivK+e/ORzaKfAma7TqjflTZq38HMRROb XDXPdsx4HANJq0egoJhznOSyjoIF3va148tcEBFqMKt8guZ21ByJ2bOBwfDCh7hTzuYW VC5w== X-Gm-Message-State: AOJu0YzSEvuTl+VXZfLE5kF5jOcyz5HGzHc2UNhHkugrP9p5pjNxNG/0 DqUEa/6HJxkr/LSZ+6xbo9C98XQO0tE= X-Received: by 2002:ac2:4ec6:0:b0:50e:35e2:a6ad with SMTP id p6-20020ac24ec6000000b0050e35e2a6admr2124077lfr.83.1703027708873; Tue, 19 Dec 2023 15:15:08 -0800 (PST) Received: from localhost.localdomain ([46.251.53.180]) by smtp.gmail.com with ESMTPSA id fi8-20020a056402550800b005528001d5c6sm5657742edb.62.2023.12.19.15.15.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 15:15:08 -0800 (PST) From: Yauhen Kharuzhy To: linux-input@vger.kernel.org, linux-iio@vger.kernel.org Cc: Daniel Thompson , linux-kernel@vger.kernel.org, Jiri Kosina , Jonathan Cameron , Srinivas Pandruvada , Benjamin Tissoires , Yauhen Kharuzhy Subject: [PATCH] HID: sensor-hub: Enable hid core report processing for all devices Date: Wed, 20 Dec 2023 01:15:03 +0200 Message-ID: <20231219231503.1506801-1-jekhor@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit After the commit 666cf30a589a ("HID: sensor-hub: Allow multi-function sensor devices") hub devices are claimed by hidraw driver in hid_connect(). This causes stoppping of processing HID reports by hid core due to optimization. In such case, the hid-sensor-custom driver cannot match a known custom sensor in hid_sensor_custom_get_known() because it try to check custom properties which weren't filled from the report because hid core didn't parsed it. As result, custom sensors like hinge angle sensor and LISS sensors don't work. Mark the sensor hub devices claimed by some driver to avoid hidraw-related optimizations. Signed-off-by: Yauhen Kharuzhy --- drivers/hid/hid-sensor-hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-sensor-hub.c b/drivers/hid/hid-sensor-hub.c index 2eba152e8b90..26e93a331a51 100644 --- a/drivers/hid/hid-sensor-hub.c +++ b/drivers/hid/hid-sensor-hub.c @@ -632,7 +632,7 @@ static int sensor_hub_probe(struct hid_device *hdev, } INIT_LIST_HEAD(&hdev->inputs); - ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT); + ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | HID_CONNECT_DRIVER); if (ret) { hid_err(hdev, "hw start failed\n"); return ret; -- 2.43.0