From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17D17C28D14 for ; Wed, 3 Mar 2021 17:11:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D884464E28 for ; Wed, 3 Mar 2021 17:11:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385167AbhCCRIl (ORCPT ); Wed, 3 Mar 2021 12:08:41 -0500 Received: from air.basealt.ru ([194.107.17.39]:47648 "EHLO air.basealt.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230421AbhCCMuQ (ORCPT ); Wed, 3 Mar 2021 07:50:16 -0500 Received: by air.basealt.ru (Postfix, from userid 490) id 770D6589433; Wed, 3 Mar 2021 12:48:03 +0000 (UTC) Received: from nickel-ws.localdomain (obninsk.basealt.ru [217.15.195.17]) by air.basealt.ru (Postfix) with ESMTPSA id 268C9589421; Wed, 3 Mar 2021 12:48:01 +0000 (UTC) Reply-To: nickel@basealt.ru Subject: Re: Need some help on "Input: elantech - add LEN2146 to SMBus blacklist for ThinkPad L13 Gen2" From: Nikolai Kostrigin To: linux-i2c@vger.kernel.org, lkml , "open list:HID CORE LAYER" Cc: "Gustavo A. R. Silva" , Colin Ian King , Dmitry Torokhov , Benjamin Tissoires , "jingle.wu" , Wolfram Sang References: <0d1eaadd-5350-63a4-fe6d-f8f357c49504@basealt.ru> <20210225093801.GA1008@ninjato> <3ffc29f8-cdf1-15fe-6406-28872bba5716@basealt.ru> Organization: BaseALT Message-ID: Date: Wed, 3 Mar 2021 15:48:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <3ffc29f8-cdf1-15fe-6406-28872bba5716@basealt.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, resending this once again, hoping it wouldn't contain any HTML and wouldn't be filtered by LKML. 03.03.2021 13:11, Nikolai Kostrigin пишет: > Hi, > > 25.02.2021 12:38, Wolfram Sang пишет: >> Hi, >> >>> I had a preliminary discussion with Benjamin Tissoires and according to >>> our agreement I repost it for wider audience. >>> Blacklisting the device was decided to be a bad idea. >>> But actually I managed to get touchpad totally operational via SMBus >>> using a following hack: >>> >>> providing a parameter to i2c_i801 driver: >>> >>> modprobe i2c_i801 disable_features=0x2 (i.e. disable the block buffer). >> So, from an I2C perspective, there are two things to mention here: >> >> a) I am in the process of extending the I2C core to allow block >> transfers > 32 byte. This is a slow process, though, because we need to >> pay attention to not break userspace ABI. If this is done *and* the i801 >> driver supports length > 32 bytes, too, then it would work natively. If >> the i801 can do this, this is a question for Jean Delvare. >> >> b) I don't know Elantech HW but there are devices out there which allow >> configuration for the block size. Something like a bit specifying if >> block transfers > 32 are allowed. Or the SMBus version to support. Block >> transfers > 32 are SMBus 3.0+ only. If your HW does not have that, >> disabling SMBus is an option, too. Disabling it in the i801 driver is >> too much of a hammer, I'd say. >> >> Hope this helps! Happy hacking, >> >> Wolfram > Thank you for the information, Wolfram! > > Finally it turned out that the solution was near me from the very > beginning, but I failed to check mainline code at that moment (which is > now 5.11). > Happily Jingle Wu has pointed me to a couple of  patches of his > (co-authored by Dmitry Torokhov): > > https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?h=next&id=056115daede8d01f71732bc7d778fb85acee8eb6 > > https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git/commit/?h=next&id=e4c9062717feda88900b566463228d1c4910af6d > > I applied those to 5.10.17 and trackpoint works like a charm. > So I guess theese patches are worth being backported to the longterm > 5.10 branch. > I'm really sorry for the noise. > -- Best regards, Nikolai Kostrigin