From patchwork Tue Dec 19 23:15:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yauhen Kharuzhy X-Patchwork-Id: 181336 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2294773dyi; Tue, 19 Dec 2023 15:16:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IGOLtKZvJug7g3lP/w6AUBOwMl6ftF1AS8VGwtnkVjvVCDBeLE4gka40WraWrMmweYlwIB8 X-Received: by 2002:a05:6a20:3727:b0:194:a32d:b6aa with SMTP id t39-20020a056a20372700b00194a32db6aamr1304831pze.122.1703027811638; Tue, 19 Dec 2023 15:16:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703027811; cv=none; d=google.com; s=arc-20160816; b=qrQdKmu4/PVK6BbKpdkcPnN6pFaaubt8lTiW3kA5cu8eUEYv/Rq00NradDNP+W392/ YfdEN3TzGoPnnngHdiVo/aRUcauvDRJSStnQBVkB9nE7pl92QCCHhF3L50LlGM2dRKgq FYr+a/i1IjsQ1m0E4NiElOU/5I62HyI5gAMP6PUTNU2Z5ktDFQUEeGFqZQv/OvwvoZhI awqS4ox67z3s407+aN13oYH5ZwVVZL3oamDQfLzPLdDHInZtAtawG1XucE9dzxJFmS1z M8fT72vNb0IknAa1Yi3jlG6zfyahJbiiodjTS/QOvsN5uSpeJYTLNayBMSdcp3SQ3D3i OLrg== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6083-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w19-20020a17090a8a1300b0028b76c4feb5si1923678pjn.88.2023.12.19.15.16.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 15:16:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6083-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6083-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 29C46B24CC3 for ; Tue, 19 Dec 2023 23:15:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 14F9C3DBA3; Tue, 19 Dec 2023 23:15:16 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785754090794271316 X-GMAIL-MSGID: 1785754090794271316 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 Acked-by: Srinivas Pandruvada Tested-by: Daniel Thompson --- 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;