From patchwork Mon Jul 15 15:31:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13733611 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0BC13C3DA4B for ; Mon, 15 Jul 2024 15:34:08 +0000 (UTC) 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: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=KjxCwRmZxD0NghIAdi0Gj+hYNdC308NqnsUVK+w6DfE=; b=IXAylwgvL7bsMJaAev6hvtD7c0 9eJvK5l/clCDdSfZXf7kkLE30XyDIXYeqa/UAJNOyaxTirJPduEERiqeIUYvGjCFxWrBj/xAGfv+1 RDOwO8xTJUg1UvC1lnQzQtqxusknGIAfE403DyePRUgpsqDn1xPNTBxeC3SPKgXZwEGBf4TRF90NH d5BY73w15Mye0bkGq/0H5UqhECpClj0eAFU0/NNppGrVn8+tdHC4NXsAxsI51+MRN4Uty5/KWmptV 4zedhj5yXxARD/kJpN2C+uy4mZmV+DP/mKwQEuMK9XAkJNHyhs9k+dGPvRwP2ZASbbP0yFPNh7+yW aAUjOSxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTNi6-00000007aLl-1aPr; Mon, 15 Jul 2024 15:33:54 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sTNhm-00000007aD5-1jo4 for linux-arm-kernel@lists.infradead.org; Mon, 15 Jul 2024 15:33:35 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-427b1d4da32so5312965e9.0 for ; Mon, 15 Jul 2024 08:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721057612; x=1721662412; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=KjxCwRmZxD0NghIAdi0Gj+hYNdC308NqnsUVK+w6DfE=; b=UZqND/Z56GAtjytkX7K2KijysaJqkvgcui1lIUUhzTIaUQIxkD4RqlM/uRAyCC02I2 tso7PbwuKVFnriclsLeuErb4+TMJKnfnqXQLgKEat0K/6bUNhrqJJGJT5Vk9fK3i3r4r tLFD4Vbn2Fst9Tge7HjiMve5GA0uqNjunOO0YHp061m1tUCEJSWZNgaHpCOQKvRirMd2 RqdGSTyrlvume98al/E+0GQlfOuURmk9J3AfPAZaNJP2dFO62ET/VfDRWnkbq9ERoKSW /FTTShwik8OBp6tkPjI1SUYaU3Sonll3TYX1zFlvm24dlgO22xCT4WNSX/NK/bCVTpNd T2qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721057612; x=1721662412; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=KjxCwRmZxD0NghIAdi0Gj+hYNdC308NqnsUVK+w6DfE=; b=xDI2f+2FR6SlIwl4qcPWVV329TU1RnidehTb5InQeu6wTjzX47tcQPLeQ07hsRry1y 5FbSQ+00ZnQPWOwmXyAb9hryYloKjUJmA/zCUkQovu0UqOlTd1pBhUCySkSr1ZD5liaV WwS3lBXKiwm9pz35+VZu5TE61UqOqSTE74XmvkKguUru7jDFgQYs5q/Y4loewbHwS2Cw r3qEKhTPrfiNe2i7oj5Yi2rMGS1uT6dBf0SRe1xJj4XuAFfmfFfReSSNMSTs7s26qi0N lxtzIV17+W6pY8qCYH9x1B6ljEU8SxWOapgUeNvR6zB+1GkbMwDEFS3nsbdu51mesB4K IsDQ== X-Forwarded-Encrypted: i=1; AJvYcCXp2voQh28ylSioMgkb3acz8sJBG+Z2zWPpKcCsEJcJYerxgK7HDMxDJHgq8xeQZy9JKFFSnSNSIWE7Ue+IJlaT6pz4yP4RcRBtaH+ToS1awKtthkQ= X-Gm-Message-State: AOJu0Yw911VyyXCvrA+isz6MFnoERsRzUK3AV6jxXoSjpog+HkLPl/TK 1+sRr6DVtJu1wI6ubsEqX82rmEkbprBG8pHxyEDdBDImWs8Lx1la X-Google-Smtp-Source: AGHT+IF8lHceTME+XT0pHLUI+dbiNjpEZB4/QdSQgJ4j5SKkXA1Gy/sqaXaS97dqmAsS4RVL2gwAUw== X-Received: by 2002:a5d:4f04:0:b0:367:89b0:f584 with SMTP id ffacd0b85a97d-36823c4ce4dmr227387f8f.11.1721057611736; Mon, 15 Jul 2024 08:33:31 -0700 (PDT) Received: from eichest-laptop.lan ([2a02:168:af72:0:564b:c18:f4fc:19ad]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3680dafbf4bsm6720866f8f.73.2024.07.15.08.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 08:33:31 -0700 (PDT) From: Stefan Eichenberger To: nick@shmanahar.org, dmitry.torokhov@gmail.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, linus.walleij@linaro.org, francesco.dolcini@toradex.com, joao.goncalves@toradex.com Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 0/3] Add a property to turn off the max touch controller if not used Date: Mon, 15 Jul 2024 17:31:20 +0200 Message-ID: <20240715153330.91979-1-eichest@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240715_083334_477534_DB4EC9C3 X-CRM114-Status: GOOD ( 15.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Our hardware has a shared regulator that powers various peripherals such as the display, touch, USB hub, etc. Since the Maxtouch controller doesn't currently allow it to be turned off, this regulator has to stay on when not used. This increases the overall power consumption. In order to turn off the controller when the system does not use it, this series adds a device tree property to the Maxtouch driver that allows the controller to be turned off completely and ensures that it can resume from the power off state. Changes since v5: - Keep reset pin untouched in mxt_power_off (Dmitry) - Generate proper reset signal in mxt_power_on (Dmitry) - Drop introduction of mxt_device_register (not necessary) Changes since v4: - Load configuration firmware during probe and not after resume (Dmitry) - Do some improvements on error handling (Dmitry) - Add Reviewed-by tag from Joao Changes since v3: - Move the power on part to mxt_start and the power off part to mxt_stop. This allows to turn the touch controller off even when not in use and not only when being suspended (Dmitry) Changes since v2: - Add Reviewed-by tags from Linus and Krzysztof to the dt-bindings patch Changes since v1: - Rename the property and change the description (Krzysztof, Linus, Dmitry, Conor) Stefan Eichenberger (3): Input: atmel_mxt_ts - add power off and power on functions dt-bindings: input: atmel,maxtouch: add poweroff-sleep property Input: atmel_mxt_ts - add support for poweroff-sleep .../bindings/input/atmel,maxtouch.yaml | 6 + drivers/input/touchscreen/atmel_mxt_ts.c | 134 +++++++++++++----- 2 files changed, 108 insertions(+), 32 deletions(-)