Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp80152rdb; Wed, 20 Dec 2023 06:52:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGQJzSxUQGtoDmiaB5TEYjaaAXwQq2F+8A9whFYHGJ7Oab59Vgte0Gy/HkE0DIJa2p+sWFf X-Received: by 2002:a05:6871:3316:b0:1fa:3e47:5a8e with SMTP id nf22-20020a056871331600b001fa3e475a8emr23206778oac.5.1703083972715; Wed, 20 Dec 2023 06:52:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703083972; cv=none; d=google.com; s=arc-20160816; b=LXlVJ7NN1prKJqaf7PgawGuA21sq5NxAEHvd9BW73VrvQ3CU5fVotw0Lcktk2BZfmB azDI/iK79l1US3lAcQKqb5u2WEyAXeW/LJT9pFDqj2Dsg/8mDLqFaUzRMsUqOdAmMur9 WICDoWZJnr3Ffm5VJ7RNN9WDDaCNzwZH/HWVp8T/N8sXQNAQLvV/hjB9+QhrRsY7NVE6 Qi9eMEPJrnllVVFIW/6wj+lZqFakLsWeRhbe1x2OAsGdlRzghn/7AjyMJs49nJz4KgXg 5n1uf5YOyHl73tWm8MbJEDKfiqDf08rw0YgCsWQ/ii9ZvZ0D4fUhQK0UPEpMasBJWiI2 dVdQ== 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:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=050c3fF+8XflM5lN4wAOMAU/MrwEHOkfK5vmGibVnMc=; fh=RL3/F6YMo0VpUNjS/bo3tVVItA4c8IoBOB9LNziKjPc=; b=C8s0tBwhzq1KU2903edPgy7mo369zwkcV2plWmwHVf1/E0Px18s744G+2lp/ebuI3Z YcCcnlDWOAXTOBQX9sR4cT4iHYaEjN9hbCg4GxyDEM6IruzyvQjNFo6t86sdwxiRltcx 9larE1RvMd33JqOVM+bQLoK96/rSUvnM225FB7HubKw4PAecG1x52ij4dfV762Dlg1hU iw45YvcZvDAn5SxX5nLrtcLz4GLidXR1WLmCM/p6Zxvt8zZTcRdfxYCfe6V1Om6ST2aE jNeqoqa6fdbW/CkVA1hMGJpfgB0NdgZQ7v9twqPmmHsnIg8DXKW4dEwBb8E4bHUsxbwL EW2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FmtjauYY; spf=pass (google.com: domain of linux-kernel+bounces-7089-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s24-20020a632158000000b005be0d708412si20892398pgm.31.2023.12.20.06.52.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 06:52:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7089-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=@kernel.org header.s=k20201202 header.b=FmtjauYY; spf=pass (google.com: domain of linux-kernel+bounces-7089-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7089-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 458202873B3 for ; Wed, 20 Dec 2023 14:52:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C86E43D97C; Wed, 20 Dec 2023 14:52:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FmtjauYY" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 027D03E460; Wed, 20 Dec 2023 14:52:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C7D7C433C7; Wed, 20 Dec 2023 14:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703083963; bh=r+EJHtX2CGZmcAf/nPtnV8IlN+UOuN9MdxvhWB+ApXI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FmtjauYYkwnHUrd8Gm2Ef81hb3wDHJTmCctE1r//mLSagn82uWDTCiwHb5MExl5EA aVucD/2JWRBVU4yZ43PhTqo8WvpOHpa3Z/oeH10rz2gtVkuwkBEiZHVJpjAjhFk7eS qdLVezYcIUcW0c89CevPCjeJoAUtavmVOnJfuC6mfBamIY8XY6rpsZtunp+AIfWa/4 xi2tws0HrZSv8qAxmQuB3sz2WPTKNkSFHEp2wafm+xOqkRORxqViQMlemLVk63WVuQ L4AN3AT+2bndJ7VPlUx7gwJrCnUdhyeVebtmsp7Nu4+rFZ/p8NkoqGyeIYsUcwo6kh BGjRfjI7TR1QA== Date: Wed, 20 Dec 2023 14:52:29 +0000 From: Jonathan Cameron To: Yauhen Kharuzhy Cc: linux-input@vger.kernel.org, linux-iio@vger.kernel.org, Daniel Thompson , linux-kernel@vger.kernel.org, Jiri Kosina , Srinivas Pandruvada , Benjamin Tissoires Subject: Re: [PATCH] HID: sensor-hub: Enable hid core report processing for all devices Message-ID: <20231220145229.020abe62@jic23-huawei> In-Reply-To: <20231219231503.1506801-1-jekhor@gmail.com> References: <20231219231503.1506801-1-jekhor@gmail.com> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.38; x86_64-pc-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit 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_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 Fixes tag? > --- > 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;