From patchwork Fri Jan 1 02:24:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 355783 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp12575750jai; Thu, 31 Dec 2020 18:27:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyizchtGaX759M8R+ZH0ge6tJewxYPmfaw8PiG/W4TtUTBoLw91rojmFH/7anXm/7HJCyZu X-Received: by 2002:a17:906:fb1a:: with SMTP id lz26mr55212311ejb.194.1609468024469; Thu, 31 Dec 2020 18:27:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609468024; cv=none; d=google.com; s=arc-20160816; b=M5beNb9vFpUbro8pKdis9UT1bfmJ7yH4gGagMAbzNZTBbLOgFZWDwyIUdToHCuNsAN d7Z5JgkU/mr2k9DOluC0ky4+7SAvVrkOlzLZTbI6ERaylikciUZ5dVQng1pWPTTlgyZu BprQdoCeE+9jrRj9rh9YooN8zrGwrk93zH0tvQK0hSIPU8kENxYXcQXusaeFnK9e+0QS w+t4WiuzAzzDK6slwaXGfK263i1ilnWqz6kcbivP4hltS0lIaKUCaVAqpki+vunm7ZRG wH9m3zhBDa1R+fZ9xXLkCHGmjblmtR6Ob/GShRd4Iy9OevHdDLJR4HWTiE7H2QksLBcG HQxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=BhoRxuko7KSfFYnhq5Nsjj2QrBDkwsvdM4s7SqoC3BY=; b=ZneqaFl6cNriEh40hjxOoJBFlzYBeIyek23Zkpo/A5cQiAtXP5d6a2Mw06ma2cWGza Qa2/kAutG7RjotPY8bv2FGZphVl1pmgebxvDntFNVb6zmweZLkt9GZpHNmQe+Yjxin0s YtiAK8GxVIWIDVA1X/OL0cfQL2Ka+HqP2kUkxN2sFgKICHbyuz3Zb3qsK9LU5Qm1LaEK Cjv8rv+xqbgRz8h4ffrXVYQHrQeSuH/GftOF7vAYDR4SgvnzNmJUUnhphXgjbkcpOsts b9AsTyUfGomP8ew7L9mRPXMuOXETJCGwILhevRXuCUAeKN+evmGXR2a3g8KaI0T0tuRW KkyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xvUvyjiF; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z16si24370561eju.92.2020.12.31.18.27.03; Thu, 31 Dec 2020 18:27:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-msm-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=@linaro.org header.s=google header.b=xvUvyjiF; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726485AbhAACZq (ORCPT + 15 others); Thu, 31 Dec 2020 21:25:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726219AbhAACZq (ORCPT ); Thu, 31 Dec 2020 21:25:46 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4198AC061573 for ; Thu, 31 Dec 2020 18:25:06 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id y8so10660702plp.8 for ; Thu, 31 Dec 2020 18:25:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=BhoRxuko7KSfFYnhq5Nsjj2QrBDkwsvdM4s7SqoC3BY=; b=xvUvyjiFavs1GRLLZlSBNqmBGNcJbm/MA4jwf5L+NEADwYI4aweCFXsrrPaMfO3hqH lVCqlME/vKsvK7vRAfypJznWHbRVAWCp9/bnPmFiZPszr+M0+wScHirqBvrWJRVMR6QP 0TKyMuT4LQr7Yd7Mp0LnA4iUA7fpltTFf+EoYwZU3dMA4by9o9J9Dff32HQcqWFYN7Ay JQArl9CTHqjPPWjSnTYQF1/8qNzvYO6/KM5iZ3UQIfl3aJbXgp9wsvtKoa6qfKIG5k3q G53Bo/skDYOTEvpdHpwNGDVoA7A+Mg/iNskxTcZPy21qUc4UqK+UQOXZg//32HBeXczy 4iPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=BhoRxuko7KSfFYnhq5Nsjj2QrBDkwsvdM4s7SqoC3BY=; b=ph7+dxZn+xygWlRTUu5tmfI/nz4EDC5KySQOlMPVgytu66kGBSGG6KDNa2xr5jrt+4 2zKeOyH7NSUoVqviOqiWlE6PljoUP3tl151YqZtVZ2nz9W0l7hvUV0PDEJV3CleWFpHw YQVAIa9TUjTtf9I9CFjU5GUyZ0Xg2Jo3UqDzcMfoVYxW24AFwYcx3YGSZZAR+j5+ooR6 VvDt/1C8Ry07ER4y+Jkb7id9rmQezRO2XdLAo5gUDp0UhYfCe2sg4YcpnM3JUVuak05X c7OhHyEwHIV3CukSm+WKOXF7XGxhfnbi0IO3KJiNE9/G7swVas5F0GZLyj9jfTSRTdUa ccyw== X-Gm-Message-State: AOAM532g/Ay/r9CgkIlcd4BNMIio1eF1lkUDQkjF0azikqd0nhUDPLbz saXHKyLjMdmPKc8NJY7Rhr6Hug== X-Received: by 2002:a17:90a:e64e:: with SMTP id ep14mr15198040pjb.5.1609467905725; Thu, 31 Dec 2020 18:25:05 -0800 (PST) Received: from localhost.localdomain (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id h12sm50655035pgs.7.2020.12.31.18.25.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Dec 2020 18:25:05 -0800 (PST) From: Shawn Guo To: Bjorn Andersson , Andy Gross Cc: Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Shawn Guo Subject: [PATCH] arm64: dts: qcom: c630: keep both touchpad devices enabled Date: Fri, 1 Jan 2021 10:24:51 +0800 Message-Id: <20210101022451.21882-1-shawn.guo@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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. Signed-off-by: Shawn Guo --- arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) -- 2.17.1 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 dcfe66f169f9..802966e11152 100644 --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -353,6 +353,8 @@ &i2c3 { status = "okay"; clock-frequency = <400000>; + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_hid_active>; tsel: hid@15 { compatible = "hid-over-i2c"; @@ -360,9 +362,6 @@ hid-descr-addr = <0x1>; interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; - - pinctrl-names = "default"; - pinctrl-0 = <&i2c3_hid_active>; }; tsc2: hid@2c { @@ -371,11 +370,6 @@ hid-descr-addr = <0x20>; interrupts-extended = <&tlmm 37 IRQ_TYPE_LEVEL_HIGH>; - - pinctrl-names = "default"; - pinctrl-0 = <&i2c3_hid_active>; - - status = "disabled"; }; };