Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3635786rwb; Sat, 12 Nov 2022 09:24:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf7A9A26o330WRh4abCzPxR6d7K1QsnfLZGLAgcmUav5pCOJCD4XJ6FCCHsZuBpCKA/CEEv8 X-Received: by 2002:a63:4185:0:b0:461:4039:88d1 with SMTP id o127-20020a634185000000b00461403988d1mr5835431pga.568.1668273885229; Sat, 12 Nov 2022 09:24:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668273885; cv=none; d=google.com; s=arc-20160816; b=LLhKwyhRtligNvoPDuWzFOKXKhkFQXOBuoCEzncrPn4lFTCK5Z+hXqj4Bztbj51yLb O1na/Jb8ad0xbdlH2e9LsKDCGattdZsI9HsSS2P+qanBLz7OUqGql93V2FwdrrxGc2s2 jCrEhmj+fvXBrw1PIdLMyInJKwxZ6pNYc6Pxxd18aiPi0m6vUxslN3Bm9eCCfJikmQmc 6OXg/vrFdLsHVPFKrEXKjiZcbuP15ORQNxchOQa8i2HSd61i6jFPGHUzga+j+h/9Xm6X tmO0h12y24NCy3MxdcINeq9rC1Jz2y0O88fT/5lsbBOoYohXvnJtt7rOuq1N1ET0I9Os mUPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=E6ZzSR9jy586faiOrJnKcIlAbjjQlleus5tibZcLwmU=; b=UCpMdrPy9vY9H0XsBLVyuxdsvfWiAfMURLaT9YpkkuIRiEvLCs2fvJfLAnEf2qJ8ps Zz/Lgl6byOfNjjTlNIgn6zD3aLGGgYD/6hhPmaNp/An5Jloep2/9m/tz6bmNbcoJwStl 7eqLw8713Rfk9KA+NVs0KTzWR4+P32YEDvAWkw23h8PaaBaNno88Oe7SJdU1w6graAo6 pKClSLSzEKay4s4XnlURAYt2R5EFZ4PKYtz/Djf+zmIWCY8tK2YC9zgZSwyBhYTTYUDv Ct032SK5fGS+FU/z11gsZmn2vcQCE6uCaWE+yOVrlQAHJVLCzX/I4jLT8bxjyc4Qnpoc 6IWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iVNEQdLK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o2-20020a17090a0a0200b0020354bcfe09si5026219pjo.129.2022.11.12.09.24.33; Sat, 12 Nov 2022 09:24:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iVNEQdLK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234293AbiKLQJp (ORCPT + 90 others); Sat, 12 Nov 2022 11:09:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230257AbiKLQJn (ORCPT ); Sat, 12 Nov 2022 11:09:43 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01D9A101DA; Sat, 12 Nov 2022 08:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668269383; x=1699805383; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=NhaN+BDPmF2eKeW73xN887VbxSfqdp+cpLWncxJ2vNc=; b=iVNEQdLKv0t0COw8Qymo/ys6AoF0ETsefTamudeWdCwb7GXxPCWHPXQU 1lnbZQBF4c6c4WuxGJM1e+fUbBRUvQcdJy3M4agHqQvlUf2y8/7YtSBeW EBIttmkzPetCbrP+zR0ChcxK+UKfpfMWefA4u0sG2SStesNH0qAqMWRT1 tq28R1c36hMGZ8x9bAtttZYGAz1kIPvZg0u4UA9p+I2sc3droak39ETdv VdMkq15s+5rjh8aYHem7kv5FHa6aSyMwtrpUv5I+SLkffmdoeoDhD4gKn 5SRMmrYobZ3rr9exNCmK8PEyAatZdkjl7o6UQWXNUnUVmG6jJQEzW3zeD g==; X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="373867466" X-IronPort-AV: E=Sophos;i="5.96,160,1665471600"; d="scan'208";a="373867466" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2022 08:09:42 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10529"; a="615762209" X-IronPort-AV: E=Sophos;i="5.96,160,1665471600"; d="scan'208";a="615762209" Received: from shambhav-mobl.amr.corp.intel.com (HELO spandruv-desk1.amr.corp.intel.com) ([10.251.12.9]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2022 08:09:42 -0800 Message-ID: <386734b3660eb3298cfbd5245f18994777a3296c.camel@linux.intel.com> Subject: Re: [PATCH] HID: hid-sensor-custom: Allow more than one hinge angle sensor From: srinivas pandruvada To: Yauhen Kharuzhy , linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Benjamin Tissoires , Jonathan Cameron , Jiri Kosina Date: Sat, 12 Nov 2022 08:09:42 -0800 In-Reply-To: <20221105223422.417316-1-jekhor@gmail.com> References: <20221105223422.417316-1-jekhor@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-2.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2022-11-06 at 00:34 +0200, Yauhen Kharuzhy wrote: > Some devices has two sets of accelerometers and the sensor hub > exports > two hinge angle 'sensors' based on accelerometer values. To allow > more > than one sensor of the same type, use PLATFORM_DEVID_AUTO instead of > PLATFORM_DEVID_NONE when registering platform device for it. > > Checked on the Lenovo Yoga Book YB1-X91L tablet. > > Signed-off-by: Yauhen Kharuzhy Acked-by: Srinivas Pandruvada > --- >  drivers/hid/hid-sensor-custom.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid- > sensor-custom.c > index 32c2306e240d6..a6fc89ee1287c 100644 > --- a/drivers/hid/hid-sensor-custom.c > +++ b/drivers/hid/hid-sensor-custom.c > @@ -862,7 +862,7 @@ hid_sensor_register_platform_device(struct > platform_device *pdev, >                 return ERR_PTR(-ENOMEM); >   >         custom_pdev = platform_device_register_data(pdev->dev.parent, > dev_name, > -                                                   > PLATFORM_DEVID_NONE, hsdev, > +                                                   > PLATFORM_DEVID_AUTO, hsdev, >                                                     sizeof(*hsdev)); >         kfree(dev_name); >         return custom_pdev;