From patchwork Mon Feb 8 15:00:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 378565 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp4777157jah; Mon, 8 Feb 2021 07:26:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3O+hICfKv/O99v6TuhMXSGalUxZ1qRZRNeQmkVSqtzVzMDIAGRVhb2NRWAOdjGWWISv3S X-Received: by 2002:a17:906:d8b5:: with SMTP id qc21mr16684412ejb.62.1612798005513; Mon, 08 Feb 2021 07:26:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612798004; cv=none; d=google.com; s=arc-20160816; b=M3+KbvmBLWdcFafgy/KAOMVrOUSAXMrMkcOBU2F4dW7bhjuUrmQbEMKeGBiZCr2jWo zNe3W0zHK50x3f3zxkSTHsdXUfbaQnN+zf3OFBrcepDvizjVITMxIus+XmyzXfVo6jgD gjnwFbEgz+lfHuGEp9Pj0bFYZUZPrw4mHUkGQfTopC22HTdevcH1jnb1NtidrlEtzQOX R3+s9pvu+neZFdCo6qUuVBTPvqJQj/xLEvBEcxnwlOMvU3JRrBNYXqEFbCfdJdUvXa7G ZgW7mCEfQserrpbdkFRqcR7ItMqQ3pWjmj244UKbsx8hLvtQNuhUunlOInB0rxoabump ulfg== 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=92f+S8Minq7CBnfy+cN5I90vCFYCoIED526GGhDWJ+A=; b=HASBwQBjkd42gKbQuiS9dIgiGcwzuSgoPfExO24HovkmRCVohVhEjHFaztjPkT3Qli mAELZ5XPAJ0k3Y97ZdbW7O9Jw1a0/LjIusY7CDlplc9kt14VhhDIeIP65+BaaUrCo21A +6xBi+/rXtHNlY6loD++u/bT9x90yrzHjZeAVDOnOm3G3Yswf1GA7i0LCgPaRjL4W+SY KFzfzM0IFbsMP2cKz1yLI79OeOH0AQ22Y1FstJGcU8dy24/pzCMuFy7r4is8zVyjCSR0 iXOVpySsXreOmH+VcjEAvWPtpCufQMwvNyw3ZulVi/SZ+p9puRThje15mAO2aRuCf1TJ iBnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=I5OLdsKC; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 bo4si11908975edb.420.2021.02.08.07.26.43; Mon, 08 Feb 2021 07:26:44 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=I5OLdsKC; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S233705AbhBHPZY (ORCPT + 13 others); Mon, 8 Feb 2021 10:25:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:60182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233632AbhBHPTq (ORCPT ); Mon, 8 Feb 2021 10:19:46 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id EC58C64EE5; Mon, 8 Feb 2021 15:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797164; bh=m29GOr1ZNRbuTh+yg0paSYXRRR4viAiudyCE0w116cU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I5OLdsKC2QKzrXElF/1Rjw227nevmOMnLqVb9lJdRupFlYC9uDTnhh8O5tNhtYdQL f/Pj0BWiBB7tdeXaS/yggd78ukZO03o0ildeVtzGm+Pm4TV3l/nwZozHFEgL8MY4th wYb7meQ6Lc6tTVvZul30VQoP/yLpfFo5eBvBf29I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shawn Guo , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.10 015/120] arm64: dts: qcom: c630: keep both touchpad devices enabled Date: Mon, 8 Feb 2021 16:00:02 +0100 Message-Id: <20210208145819.002423018@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145818.395353822@linuxfoundation.org> References: <20210208145818.395353822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Shawn Guo [ Upstream commit a9164910c5ceed63551280a4a0b85d37ac2b19a5 ] Indicated by AML code in ACPI table, the touchpad in-use could be found on two possible slave addresses on &i2c3, i.e. hid@15 and hid@2c. And which one is in-use can be determined by reading another address on the I2C bus. Unfortunately, for DT boot, there is currently no support in firmware to make this check and patch DT accordingly. This results in a non-functional touchpad on those C630 devices with hid@2c. As i2c-hid driver will stop probing the device if there is nothing on the slave address, we can actually keep both devices enabled in DT, and i2c-hid driver will only probe the existing one. The only problem is that we cannot set up pinctrl in both device nodes, as two devices with the same pinctrl will cause pin conflict that makes the second device fail to probe. Let's move the pinctrl state up to parent node to solve this problem. As the pinctrl state of parent node is already defined in sdm845.dtsi, it ends up with overwriting pinctrl-0 with i2c3_hid_active state added in there. Fixes: 11d0e4f28156 ("arm64: dts: qcom: c630: Polish i2c-hid devices") Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20210102045940.26874-1-shawn.guo@linaro.org Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin --- arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) -- 2.27.0 diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts index 76a8c996d497f..d70aae77a6e84 100644 --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -263,6 +263,8 @@ &i2c3 { status = "okay"; clock-frequency = <400000>; + /* Overwrite pinctrl-0 from sdm845.dtsi */ + pinctrl-0 = <&qup_i2c3_default &i2c3_hid_active>; tsel: hid@15 { compatible = "hid-over-i2c"; @@ -270,9 +272,6 @@ hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; - - pinctrl-names = "default"; - pinctrl-0 = <&i2c3_hid_active>; }; tsc2: hid@2c { @@ -281,11 +280,6 @@ hid-descr-addr = <0x20>; interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; - - pinctrl-names = "default"; - pinctrl-0 = <&i2c3_hid_active>; - - status = "disabled"; }; };