Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp89075rdb; Wed, 20 Dec 2023 07:04:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEu4xS5auqIrpAnIY/1b1aKcVofK5OyMSzbb45uWMaU3gpX7zW3JDduzL7GipzgXQOQEQ9w X-Received: by 2002:a05:6a20:b286:b0:187:29f9:e12e with SMTP id ei6-20020a056a20b28600b0018729f9e12emr2811894pzb.29.1703084682036; Wed, 20 Dec 2023 07:04:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703084682; cv=none; d=google.com; s=arc-20160816; b=QH0URd13BLv6HQUjpQZZRKFaQWPFLUI7HKVBUc25PtvEDGFd3CpODhVsAMzKuKEpO2 +1Ves8o8GyHajKP/5UCAxmtvloyU68cb56dIEG7L1CUtYGPArctlhMt6THVMb+ySfQXX 9CyAgnE2l3QKrKXXiJJIEo/QfntiZa0RKz8t5delGC4tr/F+rzEdfcDN7D1R8hhgpPIL SNjK0EEF7XGUG9lUNa05Kf8dzyTQDd2+IN0kSwKhyAvZhA+AHQYWPSF3R9zr/hJs464f lJhSvQrExQe+4GrOQACAOQqJQuxf0X/4GGAG0QKK4ECM7WIBC2QWewxeZiiw5iyvxNYI l+pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=6+FfBqBNd0+Ooi87DUPeSIHsvlTqgIirN4trPwAQVew=; fh=FsVmwGPo7F7d/+I3LaDSeOtlrDAgvS3xFK0+QzWnOKU=; b=bp+FceyPUC6ar0uV6j0r3IGZg0UO0GRDUarToYdvP+237nejgAYOeon3wMykSL/FZZ J0zNEv2/qbE8R41NV75WeyTXumS609RkXdOt0X3vuGEeuZepQ+7x6e0hY5WbiVHsWBB0 MZALHYm6VZblPhRqr14HYLUiR2Y+pv1KZS8+JVqe9v0xORb2TkRYmvroqyUyT97GNI6v Y2KOx1h4eG4dsNAfODKQKfE7jwWP1Uv8pC0CFXI6YdVrOzu4G/zx9/6kI6yS/ChsYTA9 nMDec/zjECZwt0w5aNgX9JgTrskohZaxFhqNkTxyAQMilRGgJZnmJ3+nMO6TERBs4rkT gXww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CViwSprz; spf=pass (google.com: domain of linux-kernel+bounces-7112-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7112-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 d14-20020aa78e4e000000b006cefb653cecsi8687172pfr.146.2023.12.20.07.04.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 07:04:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7112-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=CViwSprz; spf=pass (google.com: domain of linux-kernel+bounces-7112-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7112-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 4C27F287D2A for ; Wed, 20 Dec 2023 15:04:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D2433E478; Wed, 20 Dec 2023 15:04:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CViwSprz" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) (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 14B463F8E1; Wed, 20 Dec 2023 15:04:24 +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-ej1-f44.google.com with SMTP id a640c23a62f3a-a234dc0984fso442338766b.0; Wed, 20 Dec 2023 07:04:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703084663; x=1703689463; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=6+FfBqBNd0+Ooi87DUPeSIHsvlTqgIirN4trPwAQVew=; b=CViwSprzy3FYBf35xL3SpdAh3TEtzHqFjc5+ZnFQkYkFVJO/AYnvzhJzbgqKXy6h5d Na2RoOCC2Dov6cqnynLklYBPY8jbPYDOKui8Anp9502Ypfj8nS1eGAE1J0vOpif5IqaE cbIiYLI8hEL60czQBrIBQ95VlDpOL6aMg6xNRdQur1tTpmpSI72FMuqmC92tTn/K+B5T 8LVTcf5efEh+mNPUhWhUhj0Jxf87WY609ZcQyUK1qJ6zU1ZRowWnzWCu9qlDhpJ3ecAA x22uSSANEYn9QIE9Z7aEDLTCpS8FW6/fKk41lgs2pR8QvRAj4mvWbOVQPy8oxfpA5wHq DECg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703084663; x=1703689463; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6+FfBqBNd0+Ooi87DUPeSIHsvlTqgIirN4trPwAQVew=; b=IVYLlYqZFuVVyZj5ezREm4OeTuPTreAkT3MPfYx9rG/o1HUTcHnFU7IY+Nn7KwEWwm VZVvS4LSjtksy0MzvH0GPE6qoe+dwcueUnKcX11J3zVCoNQWF2pDn6rNprmwKxsywaLR S0PvdyZDaUJWyO/LWnl6ThxH2Qm8686rEPAqDhdPowMZqaCzu6NV07icW3hZgwyeHP0S PhW50DfY9hi/w7b0dKwe7hb6i46A+nKk0/QZKi8jSMBoizCV65hnFmKuGOhXiJ7QyNyY ut0oYbTPv0DmuLrnAKDQuZYo//Q95wXTxCK7J9Q7xcSXA/7R9p8Qph02NLUNBWmVXnB2 DAOg== X-Gm-Message-State: AOJu0Yz3nZ4AwetJy5g46j+DI60ClAEoOlQb9I12sRjLR77z/JCCsRBy uIijP/kYvNGuph/Rv+xe3VVfvdAWezKPBVT39+Q= X-Received: by 2002:a17:906:aac2:b0:a26:84d2:27e3 with SMTP id kt2-20020a170906aac200b00a2684d227e3mr1283414ejb.53.1703084663001; Wed, 20 Dec 2023 07:04:23 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231219231503.1506801-1-jekhor@gmail.com> <20231220145229.020abe62@jic23-huawei> In-Reply-To: <20231220145229.020abe62@jic23-huawei> From: Yauhen Kharuzhy Date: Wed, 20 Dec 2023 17:04:11 +0200 Message-ID: Subject: Re: [PATCH] HID: sensor-hub: Enable hid core report processing for all devices To: Jonathan Cameron Cc: linux-input@vger.kernel.org, linux-iio@vger.kernel.org, Daniel Thompson , linux-kernel@vger.kernel.org, Jiri Kosina , Srinivas Pandruvada , Benjamin Tissoires Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D1=81=D1=80, 20 =D0=B4=D0=B5=D0=BA. 2023=E2=80=AF=D0=B3. =D0=B2 16:52, Jon= athan Cameron : > > On Wed, 20 Dec 2023 01:15:03 +0200 > Yauhen Kharuzhy wrote: > > > After the commit 666cf30a589a ("HID: sensor-hub: Allow multi-function > > sensor devices") hub devices are claimed by hidraw driver in hid_connec= t(). > > 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-rela= ted > > optimizations. > > > > Signed-off-by: Yauhen Kharuzhy > Fixes tag? Fixes: 666cf30a589a ("HID: sensor-hub: Allow multi-function sensor devices"= ) > > > --- > > 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 =3D hid_hw_start(hdev, HID_CONNECT_DEFAULT); > > + ret =3D hid_hw_start(hdev, HID_CONNECT_DEFAULT | HID_CONNECT_DRIV= ER); > > if (ret) { > > hid_err(hdev, "hw start failed\n"); > > return ret; > --=20 Yauhen Kharuzhy