Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6227631rwb; Wed, 18 Jan 2023 02:46:40 -0800 (PST) X-Google-Smtp-Source: AMrXdXu5SI77G/ElAy01Hqiwqlgs6UrNIjHUfOodQCRS/zMyx3N4wXiR4CABPZdcxBPFtMvOBYIN X-Received: by 2002:a17:907:8d18:b0:7c0:d6b6:1ee9 with SMTP id tc24-20020a1709078d1800b007c0d6b61ee9mr7228084ejc.11.1674038800579; Wed, 18 Jan 2023 02:46:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674038800; cv=none; d=google.com; s=arc-20160816; b=czNK1B/tsrghWSvo/nY5r3EFbEG4DumI3SbsU4Vp5rByMzWk4K454Fcjeyrl+3tfGN /9YAeoV98rrewvDFeV/dUXrZAYXeuZXdsrnirpNqJnjFkk0zN2xwn6x+R0YdCKtS1OdB 2pO2k4mv3qBEPoHf2jqHm0heuVnMdxyJVmpPWCBEy+QPDZc7L0QM+zJmXkYLXvUyKXFn I1E/gwS2xycdXv24KWcZkqkiB5CkIwHyX9jyYVWb8+3PWSVkToIZIHZN2aWT87/jt/KN o7LuqGaKELDgIXPrQdba8gRp/6oZi/ZDDniJfpDD4CUhwYf3H6lMiX5tAcg7K4tQ6yCT fQLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=N7MqoeNKXzgnnIzRY7510DZmJIilnRgsAS+I2BIu5ek=; b=PUKvoZlLa96cSMvX3l4uQrAMSAOst+E4onkdooxfRBSdF7H/GfU9kNOwP68rBuWT30 NDGSPaWWnoBFLbUIEK6gGJfFFVfIqIDeVNX3lSYZuAI90ApPHKTR3dMNPF22WNTRtX9H NgCqr7OurMrYLkg3xN0CS/NHfod8wMhvNnoIFUVMuYrBOCM90NNolzgLSXkarS6xCWUU pC6GCCIecM8g6Q7Vv0Urgm6JL1B0DKqd7AAh3Vpw9m+uVw6OGXjTBfBuO7Ejzd/JsmJ3 j5rI35haAe/e7T9DZ/CF0g8m5//sNeE1Qv/tBHx5ZxNuPmUOn5mqVD91+sHjmH/eCGKi DtAw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o19-20020a170906975300b0086c0fe19e77si15816812ejy.790.2023.01.18.02.46.29; Wed, 18 Jan 2023 02:46:40 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229778AbjARKIq (ORCPT + 45 others); Wed, 18 Jan 2023 05:08:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbjARKHy (ORCPT ); Wed, 18 Jan 2023 05:07:54 -0500 Received: from freundtech.com (freundtech.com [IPv6:2a01:4f8:c17:2d66::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8567656CF; Wed, 18 Jan 2023 01:13:24 -0800 (PST) Received: from [IPV6:2a02:8071:2b80:7760:fecd:7e78:31fb:a087] (unknown [IPv6:2a02:8071:2b80:7760:fecd:7e78:31fb:a087]) by freundtech.com (Postfix) with ESMTPSA id C554C1EBBBE; Wed, 18 Jan 2023 10:13:22 +0100 (CET) Message-ID: Date: Wed, 18 Jan 2023 10:13:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v2] HID: amd_sfh: Add support for tablet-mode-switch sensor Content-Language: en-US To: Jiri Kosina Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Basavaraj Natikar , Benjamin Tissoires , "Luke D. Jones" , Ivan Dovgal References: <20221218214723.14735-1-adrian@freund.io> From: Adrian Freund In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, 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 1/18/23 09:49, Jiri Kosina wrote: > On Sun, 18 Dec 2022, Adrian Freund wrote: > >> This patch adds support for the tablet mode switch sensors on >> convertible devices where that sensor is managed by AMD SFH, like the >> Asus Flow X13 and the Lenovo ThinkPad L13 Yoga Gen2 (AMD). >> >> Co-developed-by: Ivan Dovgal >> Signed-off-by: Ivan Dovgal >> Co-developed-by: Luke D. Jones >> Signed-off-by: Luke D. Jones >> Signed-off-by: Adrian Freund > Basavaraj, could you please review this? Thanks, > I think this doesn't need a review right now. I recently found some big problems with the patch recently and am working on an updated version. I think reviewing once I send v3 should be enough. In short: This patch generates nonsensical HID messages that don't even contain the sensor state. It still makes the tablet-mode-switch work on some but not all devices due to a mechanism I don't fully understand yet. Somehow ACPI devices that previously did nothing suddenly work with this patch and are then getting picked up by various platform drivers depending on the device. This driver however doesn't properly handle the actual data directly from the sensor. --- Adrian