From patchwork Wed Apr 17 09:05:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13633052 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 2C402C4345F for ; Wed, 17 Apr 2024 09:05:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2TU+do3GuWaMfPHYYFDBvh6puny5tp0bKDM+L00FVs8=; b=lhmgi/zw6xMkAk h5UX6aCbW9ivymT2eiotZ6bhzeR0uk+nDitIXCVJitYB0jaBfXKxxWJ2WeDM+gXQ9F/g+tF2w1a9b o3v2c2b8a165jR8kgiLA/ahVTekKZppywaD+1939MKQBh6+3MsLxKANZvoxvIlGiK3A+sIx5icjA9 y2kpHGcueGQ6wj0zqfioV6bH94jum/+fD/pCIK+JEgNuq9rROEYLurqnB7ZcUHwT65Xmthbf+W/YQ FeKzXnT5api022yJ8l+IZCvO8x+i/oNJXQgHD+0/4KkMgpMH12sUK4dXKNx2AxMKefVJuJmZAEjcR WAfmP59JxVOUwh301ekA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx1Ea-0000000FKij-0jkH; Wed, 17 Apr 2024 09:05:40 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx1ET-0000000FKgG-3z4I for linux-arm-kernel@lists.infradead.org; Wed, 17 Apr 2024 09:05:38 +0000 Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-56e2c1650d8so5442888a12.0 for ; Wed, 17 Apr 2024 02:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713344728; x=1713949528; 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=NGmjfmjvJt/yjSXYMBDNTlpob7e25JoHrGjnnPxXC80=; b=ApxqfdBV9JOdNps/BpmlS8EONGRENh1duacilbQpfA4tATFfVnBC3K1P62FXZAmazv 5nWSWp9l7in45sDXyqazPkx5VooFVEk0NLeqjZOY7MHB4zrYQXb4JonlwPZ/XdhSg/7Q 3ZojgfCm+BzEf5ZtxkbHXv4s4GAGEEU1v1BOrbsw5+ycqx3iG6hkhnvV7ePGyfvZHAx4 hW7LzxFDEmP95eJxSmMl5YZP+M9lxy8EWl+tBZwrOkf4aHtRTsR+s0ufLqGy0TCHko9s Vu4NJKlxrpkpQ8suVRpqUelAPVYtDRss/BoNV56Nw0HkOv/MP04LFDW8oJV5ZAfxDMt2 o3uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713344728; x=1713949528; 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=NGmjfmjvJt/yjSXYMBDNTlpob7e25JoHrGjnnPxXC80=; b=larVC3Ui0opS+EHOz7HmtLFnr35WrhBUKwhjIUke5m906xmrxiniEQb0WEVf72A2UI KKymg+d1wQrlMiyBkclalnZ5iC4WJspidSyUmB60u8TTqh1aw4Zoc5rgWp67Gb9zhQX7 veX//+FE0/mKNvACcpNxBA5vnVAFfbLaDQvj4PPpccE4yKInXlbdhvxdppw0gbYWuKye cVDwJb4KotFaojt5O9/sS19cMpRPm3ETCAwY3VYFrRDzECAT1vy0mM1RSrO3qArIKs+9 LOLRtYHgVi7CcGjXu6epXAlKbIr5QcwvV3l/sX3Dtu/XZUw7a5Hwhh5P0gXPu8HNN2Gt IrwQ== X-Forwarded-Encrypted: i=1; AJvYcCVL+ClcHmU4LQqX3UwBsPhGqpaG9qCb3wp0B3xcbc0PQbXVC9eiKDbeZd29VxkFCv4F11pK3855wYTNQiA7igw7POqM74YUzdhvPXRvwxYwlZZeX3Q= X-Gm-Message-State: AOJu0Yw1O8HhviTU9bs7dRnsWcT0ZjZfOAdm8e+ezSb3uTHpWeHJD/6z YQADKnDJ9OPNWG3RqZLNQ/B4tNwxBTOVf0BUKU9SpzcH7ImjGUH+ X-Google-Smtp-Source: AGHT+IGEiY2JB0qdptuZ7ccCF8KInrVw1xa3h+hNmYB4Kd7mL5BMZwNGp6ps35fhUTL0Ra2SxLpEew== X-Received: by 2002:a17:906:46ca:b0:a55:36d7:d0ff with SMTP id k10-20020a17090646ca00b00a5536d7d0ffmr3787755ejs.46.1713344728114; Wed, 17 Apr 2024 02:05:28 -0700 (PDT) Received: from eichest-laptop.corp.toradex.com (31-10-206-125.static.upc.ch. [31.10.206.125]) by smtp.gmail.com with ESMTPSA id x16-20020a170906135000b00a51a7832a7asm7897814ejb.199.2024.04.17.02.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 02:05:27 -0700 (PDT) From: Stefan Eichenberger To: nick@shmanahar.org, dmitry.torokhov@gmail.com, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, linus.walleij@linaro.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 0/4] Add a property to turn off the max touch controller if not used Date: Wed, 17 Apr 2024 11:05:23 +0200 Message-Id: <20240417090527.15357-1-eichest@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240417_020534_019374_5AA52D5D X-CRM114-Status: GOOD ( 15.07 ) 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 ensurs that it can resume from the power off state. 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 (4): Input: atmel_mxt_ts - add power off and power on functions Input: atmel_mxt_ts - move calls to register the input device to separate function 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 | 162 +++++++++++++----- 2 files changed, 124 insertions(+), 44 deletions(-) Reviewed-by: Joao Paulo Goncalves