Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp611691pxb; Wed, 3 Mar 2021 10:42:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzC+US13Z4RW7rVvlfQWb2CGMWVFdsJ4pbdEvLGV4UghjvqQ406I7+Ca4mi00bePruACFOF X-Received: by 2002:a17:906:c1cf:: with SMTP id bw15mr249752ejb.82.1614796973208; Wed, 03 Mar 2021 10:42:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614796973; cv=none; d=google.com; s=arc-20160816; b=aw0GiZ3L3WkMOAKZEL+VUAiDz+uA71Hu+c7XThxWrH/saj+a9+UzfzUFQ8d47UC2rh j/JYO4JIGxYBei1OLAVXGJ1UnozM8yVTk577Qww1dJtN5EB9IY9lMeVB+jYsCJSB5wqQ 7DA2RgPGCv3WvmAa4150bdl3CWeifSuCNPoT23NhkaI/MK26i09ar1M+Zarv7omWPrFz HrLiDedfL5pwyMzoptryEMDQz1sQvF6ucsANWepxluTUzp3bGM7q9ggF5rqI66tEgCI0 7GAvlXrBYbt67lWfbxjCSpDvzdfuvUJbSLsep/9UQjOV6ifgQ3wHLe9bF/Yad8Rpjlib LNjg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=fJEjmlwkUohti0Pgx7wZt0MZxU7OjQNdSBzLcIjB1yw=; b=S4Xw3PH1hhOWPIi+yJ3tfbweqy4cxkMF4w7ImsY5oqH4cFzxh3E5jXRCCPzHR6nZsV +QMygT43X8FUhI6i8VcOSuNPSwRwKAqQLzsHaKMM6XwHfU5VVeQGDTSCfdQOhcqSOiBx whNKHL+j/FqakO2uOopay9eZ0K1Hrb3veBSZ99XBlHFF1Jhw9/kozcvV1/OQSXEnwi82 /8KvnfuTVYxES2YGgqT41FAdDiJnlLc5CDFEjJKsAa/nflZV1HgUGMbFCnY38zZUyQ2n hg1m7uOHZciuQpCaCsnhocajiDFRf4SZ1qFpzAf4Crp6fXEzrFh4HVzxjHYm5zoQj5iy XdSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=K9yILuRb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si15724337edd.574.2021.03.03.10.42.04; Wed, 03 Mar 2021 10:42:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=K9yILuRb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378288AbhCBBFO (ORCPT + 99 others); Mon, 1 Mar 2021 20:05:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:34108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236011AbhCAS65 (ORCPT ); Mon, 1 Mar 2021 13:58:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7D54C6522B; Mon, 1 Mar 2021 17:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614619530; bh=D2LVDaN8hZJpX1CeiMcPvE6wKFL2Bwh5v9y4bTsAd5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K9yILuRbx1SBCj0zDu9W+uYwLxJ/iFhPtpQ4GAXx2mgDg8zFydUZFEP4qiylLwh8r 8v1XT7TwxYLMMUgkv0LQB2AnHdHoHHQWZJxt6tp4Mvjffun3ELV/Up5akAsO6LS1ZT /aJ2ZAHAxSqfFBEC9RY1+DBd/K0dX3Z9bJENC10A= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "jeffrey.lin" , Dmitry Torokhov Subject: [PATCH 5.10 486/663] Input: raydium_ts_i2c - do not send zero length Date: Mon, 1 Mar 2021 17:12:14 +0100 Message-Id: <20210301161205.903689240@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161141.760350206@linuxfoundation.org> References: <20210301161141.760350206@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: jeffrey.lin commit fafd320ae51b9c72d371585b2501f86640ea7b7d upstream. Add default write command package to prevent i2c quirk error of zero data length as Raydium touch firmware update is executed. Signed-off-by: jeffrey.lin Link: https://lore.kernel.org/r/1608031217-7247-1-git-send-email-jeffrey.lin@raydium.corp-partner.google.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/raydium_i2c_ts.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/input/touchscreen/raydium_i2c_ts.c +++ b/drivers/input/touchscreen/raydium_i2c_ts.c @@ -445,6 +445,7 @@ static int raydium_i2c_write_object(stru enum raydium_bl_ack state) { int error; + static const u8 cmd[] = { 0xFF, 0x39 }; error = raydium_i2c_send(client, RM_CMD_BOOT_WRT, data, len); if (error) { @@ -453,7 +454,7 @@ static int raydium_i2c_write_object(stru return error; } - error = raydium_i2c_send(client, RM_CMD_BOOT_ACK, NULL, 0); + error = raydium_i2c_send(client, RM_CMD_BOOT_ACK, cmd, sizeof(cmd)); if (error) { dev_err(&client->dev, "Ack obj command failed: %d\n", error); return error;