From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FBFC606A321 for ; Tue, 24 Nov 2026 11:24:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=LMI3SKUq; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=mR9sDyMn DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=eykty3oSoGJNJdXFXeVz8CWaTenWGSavrnXua+sfRF8=; b=LMI3SKUqpBeFgZ aJkj3Ou70STUPBWwyrwt8ij2N+5BXycHjvJKZ5OlvlO08pbuOc71usE3OA6BVS5wFHHR/gUE3SZpy hJv/gy6R7Ce/nahASDCqdkZ4NTpoTAuFR5iYMILwoPckBEYPGYzqS7snBNgv8NQZZp5UHRb06QKLi yosFkgCOcW2x9qUZQTmTiISbEKguWkZsTIpUQIZhDS441TZ8kb5KRsTAs4ee89k65Pzb5r+ZHnd6c pHliQtK6KXpu7YH3mvh4ebg0FpKiI3DhXIKxHH/yAU/y0AoHg0X4huumrcvyzty23fMuKyioxwfzw 2aiPbEwFhxTh7Rtcj26w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xVocq-00000006Ldn-3ndx; Tue, 24 Nov 2026 11:23:52 +0000 Received: from bali.collaboradmins.com ([2a01:4f8:201:9162::2]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xVoaF-00000006KWc-0jWw; Tue, 24 Nov 2026 11:21:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1795519268; bh=X92meWCIe2idWIvdqkPIsxNMMdDXuDPGPKHlu8WtMvU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mR9sDyMno2ncuDBWp1CXjOfdhq2+FvMOYrlLG1QM5AiNIstJ2Fh5FFKfTDgw811W+ CqrrGgaUUaojO/WET+fhKLVzyMvGvX6gvzFyqx5VLJAsnwpWFwEWZ3Tll8ZZe0WkDu RJtbOKK2pRbB6rdnaFtq814ERrnL3aGAJhVc57tY+YhN5fnTBfp9Sipycb/fVpeb6c YQ3atOJeiT5eIydbtYUk/aho8TJUm2G0lwYTsU+vx0PnhdkNF4BfeviWXd9dyMcH03 kYwYE9dBAQfROwvA+qZf5QDuOXP6j0egDeTAmES2mQ0UjpLbBIRh1R4K+EhP5ty+17 KF0Ebeg0cztAA== Received: from [100.64.1.21] (unknown [100.64.1.21]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by bali.collaboradmins.com (Postfix) with ESMTPSA id 8D79617E0309; Tue, 24 Nov 2026 12:21:08 +0100 (CET) Message-ID: Date: Tue, 24 Nov 2026 12:21:08 +0100 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] Input: goodix - sync the irq controller while starting firmware To: Luca Leonardo Scorcia , linux-mediatek@lists.infradead.org Cc: Hans de Goede , Dmitry Torokhov , Matthias Brugger , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20261124085058.128173-1-l.scorcia@gmail.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20261124085058.128173-1-l.scorcia@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261124_032113_509062_1E1A2E1D X-CRM114-Status: GOOD ( 20.46 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-22.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 11/24/26 09:46, Luca Leonardo Scorcia wrote: > On the Lenovo Tab E7 (TB-7104F), which has a Goodix GT-912 touch screen, > the touch screen fails to come online after loading firmware, printing > the error "Error reading 1 bytes from 0x8041: -6". > > Comparing the upstream code with the Android stock sources, the existing > call to goodix_int_sync should be moved between the upload of the firmware > and the watchdog restart. With this change the touchscreen is correctly > detected and working. > > Signed-off-by: Luca Leonardo Scorcia Reviewed-by: AngeloGioacchino Del Regno > --- > Relevant bit of the stock source driver at [1]. > > Credits for noticing the issue and finding its cause go to matemiller992 > on the postmarketOS forums, I cannot provide tags as he wants to stay > anonymous. > > Patch tested on the Lenovo Tab E7 (TB-7104F). > > Changes in v2: > - Instead of adding a second call to goodix_int_sync, move the existing > one; > - Simplify the access to the necessary arguments/parameters. > > v1: [2] > > [1] https://github.com/lscorcia/linux-lenovo-tb7104f/blob/2dad69c9f28611ac6d3db2f1ee11b480a60d83ee/kernel-4.4/drivers/input/touchscreen/mediatek/gt912_p98996/gt9xx_driver.c#L1529 > [2] https://lore.kernel.org/linux-mediatek/20261020122712.526797-1-l.scorcia@gmail.com/ > > drivers/input/touchscreen/goodix_fwupload.c | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > > diff --git a/drivers/input/touchscreen/goodix_fwupload.c b/drivers/input/touchscreen/goodix_fwupload.c > index 888da7538c06..642a632d363c 100644 > --- a/drivers/input/touchscreen/goodix_fwupload.c > +++ b/drivers/input/touchscreen/goodix_fwupload.c > @@ -153,8 +153,9 @@ static int goodix_enter_upload_mode(struct i2c_client *client) > return 0; > } > > -static int goodix_start_firmware(struct i2c_client *client) > +static int goodix_start_firmware(struct goodix_ts_data *ts) > { > + struct i2c_client *client = ts->client; > int error; > u8 val; > > @@ -168,6 +169,10 @@ static int goodix_start_firmware(struct i2c_client *client) > if (error) > return error; > > + error = goodix_int_sync(ts); > + if (error) > + return error; > + > error = goodix_i2c_read(client, GOODIX_REG_SW_WDT, &val, 1); > if (error) > return error; > @@ -249,11 +254,7 @@ static int goodix_firmware_upload(struct goodix_ts_data *ts) > if (error) > return error; > > - error = goodix_start_firmware(ts->client); > - if (error) > - return error; > - > - error = goodix_int_sync(ts); > + error = goodix_start_firmware(ts); > if (error) > return error; >