Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp2956179lqt; Tue, 23 Apr 2024 06:50:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGNhWS8rDQzOPbcQWRKqykWD9LbLeTUA/tLBB8WoVd9ImK/1uKEK2XVyEIF5/u35iyZiSkr6+QLapAbScF9NQEzdRC65hwk2jkwTZAxw== X-Google-Smtp-Source: AGHT+IHrq/vVgxApghUL9kmHNY9XlSjors1F9Og7cJVT3KvCE2jxuorMb5+tCx3oKPkzJHnvIRxX X-Received: by 2002:a05:6a21:6802:b0:1ac:d96a:4fd6 with SMTP id wr2-20020a056a21680200b001acd96a4fd6mr10911081pzb.23.1713880238238; Tue, 23 Apr 2024 06:50:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713880238; cv=pass; d=google.com; s=arc-20160816; b=h5rIq8uBmr+y41KxI22jvDleOrz7TFROECZaZxZZBw4AfgIQLZVjs8rsuQrcRXsyiK C8+n9Dwfd25o2A5dFBBULCIL/JAoB4cNKnddox6jTLAo5dQvBvjHhc90okTNfuEDVAv7 sgy8V9pzxZ1PpGNF/QHaPIt2tbBJGCkdk3WgjzJR+aekrlz0k+mDCsn7SIHqxCJ3buJu 6NTF+VXZlA1jzMWbLNBQPDa1gxcbOEMbW09pIlMynjlzP3PWnZ1mUh3sZ/Nk0bElpnFN T0NU6ERtkMwDREv9OoK8eB+1LSQjC63LUIRU0z/DEL/d7NA3Vf74xV3AhpTZycrWspNH Ydtw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=naXR/aRL1fNuBNgcM8vdj3ajcFJh3SXNbNcVF0ABxAM=; fh=OUM2ADVDOxG1pP3f4HwfkkZVy6UyrD6LX+eX6WqP38M=; b=jMKJx17u3fbUOOueJaSK2d7Zc2WnzuR3lPknvxla6P6p2vA00AGLpKNanAbsduPfgW R+BE+asVrXoqLl+FNo0jj7mv2e4vrm6BmI3tbWMub8HcP3S9cXez331zlXHiddJxR8Dp nowgpkIfO3sQwwooiVNYDqisaPWS+M/1NEI3If3scZVssKxThA6J+rTVmQSGGsJgQz05 SX8je1k259jTJHToFWBUPGlCaTGyO1c24Cm9DReCizdJUmfEmG3crDtxYS78loyy5G1b 7AUDsgU6y93r0D1rTTeizdaMMdyAt80k8/xssCyMQcMVoWZVmfBgtfp5YJgROvAK2gTm Dn6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n1YofQiA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-155304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id b2-20020a631b42000000b005e42b4c0c48si9343474pgm.390.2024.04.23.06.50.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 06:50:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=n1YofQiA; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-155304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6D92B2896C8 for ; Tue, 23 Apr 2024 13:48:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A363513BAEA; Tue, 23 Apr 2024 13:46:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="n1YofQiA" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B32831369BE; Tue, 23 Apr 2024 13:46:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713880012; cv=none; b=HS/KxlOTRJM5dimZLLfUebBvEKas7XGw8TyGfqgyA4VchHJlbHcuJekAgm3r1NpUGXE0IHzq/7ZP50kd3YDRe4V0eVIIPWBFmyjRbca1qhuvyCaOmDMSCiiwa3Ch4LX/1N8I9qNlIM4NTSGbBEw9+0r8o4rmKkpU47BQ/4cS1gI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713880012; c=relaxed/simple; bh=Wm1xdrgosT91TDDq0rbWVizXhaR6E3LE+4BSaV+vb6A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=QQTbnA4t5zPcw16ck6Pjcl2IYaLfx7HV2laUlKcMKbJaSea3+UjH75So/YGCdxHVrWYdDmA/2XRkoQdTBsewPNaJY3brrwUbInraFT2y2KBUsUz5an1IwUPnrEyID3y5R7ykpXFmlhvjky0ylA3w/LhbN/IaDpDWbS99IwkD9fY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=n1YofQiA; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DEE8C4AF07; Tue, 23 Apr 2024 13:46:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713880012; bh=Wm1xdrgosT91TDDq0rbWVizXhaR6E3LE+4BSaV+vb6A=; h=From:To:Cc:Subject:Date:From; b=n1YofQiAQSaaW+Ph9p5+IdGwbdhbsdJuuaWlpJp0P8IxtxOY0UdutduFzvWdMvCpp EMXcZJ9rSO2IuqjeRgM8qKfvW7c46pPvQt+NlDKhXK3ibVtf9kQ6fphCXOvmgEaxDi LMrPMXgXjxLqIUqKnTjbjudUl2DOmqlh1ILzJu3lwMb85XaHgjfrGmvZFo7jbA68OM qdFFrekPyvUDj/Wu3EJEYWU9Q0v8PzZ1Sqi00kus+a3mXpxv0pnn82qLai0jw5PSEW eafiFqCxKX9hJqcDTq1NsGe6C6vzaxm3oraGlstudxGm0c+REiQNn/4/1S7Lywxrq6 X9vqv5Eya3hVQ== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rzGTx-000000008Ke-405K; Tue, 23 Apr 2024 15:46:50 +0200 From: Johan Hovold To: Jiri Kosina , Benjamin Tissoires Cc: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Linus Walleij , Douglas Anderson , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 0/6] HID/arm64: dts: qcom: sc8280xp-x13s: fix touchscreen power on Date: Tue, 23 Apr 2024 15:46:05 +0200 Message-ID: <20240423134611.31979-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The Elan eKTH5015M touch controller on the X13s requires a 300 ms delay before sending commands after having deasserted reset during power on. This series switches the X13s devicetree to use the Elan specific binding so that the OS can determine the required power-on sequence and make sure that the controller is always detected during boot. [1] The Elan hid-i2c driver currently asserts reset unconditionally during suspend, which does not work on the X13s where the touch controller supply is shared with other peripherals that may remain powered. Holding the controller in reset can increase power consumption and also leaks current through the reset circuitry pull ups. Note that the latter also affects X13s variants where the touchscreen is not populated as the driver also exits probe() with reset asserted. Fix this by adding a new 'no-reset-on-power-off' devicetree property which can be used by the OS to determine when reset needs to be asserted on power down and when it safe and desirable to leave it deasserted. I tried to look for drivers that had already addressed this but it was only after I finished implementing this that I noticed Doug's reference to commit 18eeef46d359 ("HID: i2c-hid: goodix: Tie the reset line to true state of the regulator"), which tried to solve a related problem. That commit has since been reverted but ultimately resulted in commit 7607f12ba735 ("HID: i2c-hid: goodix: Add support for "goodix,no-reset-during-suspend" property") being merged to handle the related case where the touch controller supply is always on. The implementation is very similar, but I decided to use the slightly more generic 'no-reset-on-power-off' property name after considering a number of alternatives (including trying to describe the hardware configuration in the name). (And as this is not vendor specific, I left out the prefix.) Note that my X13s does not have a touchscreen, but I have done partial verification of the implementation using that machine and the sc8280xp CRD reference design. Bjorn has promised to help out with final verification on an X13s with a touchscreen. The devicetree changes are expected to go in through the Qualcomm tree once the binding and driver updates have been merged. Johan [1] The reset signal is currently deasserted using the pin configuration and the controller would be detected if probe is deferred or if user space triggers a reprobe through sysfs. Johan Hovold (6): dt-bindings: HID: i2c-hid: add dedicated Ilitek ILI2901 schema dt-bindings: HID: i2c-hid: elan: add Elan eKTH5015M dt-bindings: HID: i2c-hid: elan: add 'no-reset-on-power-off' property HID: i2c-hid: elan: fix reset suspend current leakage arm64: dts: qcom: sc8280xp-x13s: fix touchscreen power on arm64: dts: qcom: sc8280xp-crd: use external pull up for touch reset .../bindings/input/elan,ekth6915.yaml | 20 ++++-- .../bindings/input/ilitek,ili2901.yaml | 66 +++++++++++++++++++ arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 3 +- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 15 +++-- drivers/hid/i2c-hid/i2c-hid-of-elan.c | 37 ++++++++--- 5 files changed, 118 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/input/ilitek,ili2901.yaml -- 2.43.2