From patchwork Mon Jul 8 07:15:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13726241 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 C58EAC3271E for ; Mon, 8 Jul 2024 07:16:29 +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=BQGw9DkmWwdPFAMx1H/PonmyPrG2FWoQ4nV2EvrT1q0=; b=v15npQ8xqpFLe4oVZ/1zR+QhX6 Qg0/9aJiPY7Plx172TbVxCUXYdYfNnbBN/5R/nMGiRUiQNjN2MLk4iYlYlzrBsBx5+gGMZCVEB2kk aY1k5bzHLdZEobbvktdRcNW7HMKRC7yN0Aup0UjAjoMlbV9VtkRf3NQGYwGkzUXHrR2x7v+NY3p3R U/M4UxdAh/Uxojx5Z8BqW3n22kEVcedXDgJAlTXhnRRS7c33hd8hnERX6kGSPCAFORljUhriyOUo2 S4YSSn4vgCrB4SkNCk9RTEmtjRAekcBAIVyvmw6Zndy40qaf2KX18m8w4dvy4qUjoW2u/3RVsH6fo 7T9ncutw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQibj-000000030D9-00Gw; Mon, 08 Jul 2024 07:16:19 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sQibU-000000030A8-2UM9 for linux-arm-kernel@lists.infradead.org; Mon, 08 Jul 2024 07:16:06 +0000 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-367ab76d5e1so614902f8f.3 for ; Mon, 08 Jul 2024 00:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720422962; x=1721027762; 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=BQGw9DkmWwdPFAMx1H/PonmyPrG2FWoQ4nV2EvrT1q0=; b=GxbocC6TjFcA/xsTYLWgi3+3lgBMyJrgfa+Nsrvtaz9vPiqvMLGWbafpS0RD4LNYkZ v7SMMBz/b6TTcEClqClzNlelUMk24xrnKGVOfDc9MGfdg9xo/8xhgaB+yOP7Bt0pwu8J ffqs2KJqQjWRm1TTf/1EInrxq7XpD9AFlQVE7uKMpEmmv5nrcgIPzczeHbMcA3+2tds4 ntgnsPojiHG6Co4QLBEVAHWSvCN7LUua/4dboxABEb5VAMzoK3wemXKdiDGawxuvHkIK V5IU/AkrkoYkIdoQ9x+kEmc4nzBMYq76oqClnru5GtYVhylLJSRZ/NNGLWDuqSpKU62i 9+SA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720422962; x=1721027762; 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=BQGw9DkmWwdPFAMx1H/PonmyPrG2FWoQ4nV2EvrT1q0=; b=UC0VhlCINSAweXvppl9FnixwyzZeMJ5nkt2bm9TQjdMmiIz1rDFR9ElpVJqEUHcyu+ KDe7f9IlkM8EZcm8ROpWqQ2u0RhMnyUZjHQX7Qe2zH0ExsKOe3+gpJ5BqiWIqD8QY2RM Zv0vbA6cTHcpF3HPBCPRB5gN19yV+wUkhcifNPT7S6dli1sXx1S50ZmHEDNHbtf2Xnke ilJyeODzRgGmbMcohOtdH5baKpO4EcXGD3Wa7U3/3/C8Cjz1mjed8VmYVJSLQ3SYF90l T3Sg1IetknrefxHO6apwurFy3XoFCh/7N8OnRqNcyH9EB/wimCdoub5lHpRY7MYBeek8 DuyQ== X-Forwarded-Encrypted: i=1; AJvYcCUWqwxX9wUQS0qkB7Rm8ljJ8ORSVpNXjer31s4V0MJqTY4RLsRKUxEoJPqbgnVusGr3llUodQY3mcRWS+ezkDZyQB8Gld9ZM9EICEcvRbYJtZ30Lq8= X-Gm-Message-State: AOJu0YxubYBUD1zMpjtBVW21UzzYjnhxiEDW+GZ6D+nQI0CE8AWwQ/pm KhuLaElAgBN6RLpadxU3Hs+acPCq2WF0lqXThzeQvTijX8aZa2b/ X-Google-Smtp-Source: AGHT+IEBsQoXiPndbDDXXZLyk3MQ6ndPcMKilUfLRL3rlKi+NQPpkKVzrKjylB+wycsQYYtbadkqlg== X-Received: by 2002:a5d:55c5:0:b0:366:f994:33c with SMTP id ffacd0b85a97d-3679dd66b69mr6822031f8f.56.1720422962294; Mon, 08 Jul 2024 00:16:02 -0700 (PDT) Received: from eichest-laptop.toradex.int ([2a02:168:af72:0:a786:d603:1c55:ced1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3679dd5ea09sm9994564f8f.65.2024.07.08.00.16.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jul 2024 00:16:01 -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 v5 0/4] Add a property to turn off the max touch controller if not used Date: Mon, 8 Jul 2024 09:15:47 +0200 Message-ID: <20240708071601.7571-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-20240708_001604_656446_3568DC0A X-CRM114-Status: GOOD ( 16.27 ) 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 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 (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 | 148 ++++++++++++++---- 2 files changed, 121 insertions(+), 33 deletions(-)