From patchwork Fri Feb 9 08:45:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13550967 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 362EAC48297 for ; Fri, 9 Feb 2024 08:47:11 +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:References:In-Reply-To: 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: List-Owner; bh=B9p11KBxMSbj9qZmjAqhAWcvNO944su6I/hIS4/5ELI=; b=T3wh2WN0KMfv8i GB9lqDH7zWZupVVfWZjgKP0+NmpKlP1E9wUcD6yPZILDX7PFXhztx6TPqXG1x/D2mKnNE7J+/Bi+y vs/G7it1aA141ZuVJt1P0CSizXg/GOVJmlUA8pGHGys1jygkWpXO5HVxULudoFfvlftkSK5EMupu9 +88ODg9/cdpCb2eDvqcgqF0ukfS9/N5KK6QVhl+Gk/UALoflXxl5CFafqIdQKmvCRpm5ymAe/tw2L 8ubjEbZDVnxE8hzS/qKXPwCXYioOktyOGAbrN1PC3QTVygEUK1Cnvss+j38uIZElnRns6129ILAHl a9CHETJhPUQTDwcjWt2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYMXD-0000000GUBS-18A9; Fri, 09 Feb 2024 08:46:59 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYMXA-0000000GUAt-4BFl for linux-arm-kernel@lists.infradead.org; Fri, 09 Feb 2024 08:46:58 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-41071e85659so1575885e9.1 for ; Fri, 09 Feb 2024 00:46:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707468415; x=1708073215; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SZwRK1DevWHs7TSy/8l1VCGmE7RT9MSmuvvOPNO04ZE=; b=KyudGkqhZfNIIut720rS9NHVNRSUNrGDBe1mUnjEiKQwbqKalaZA/NrM/WjyH4zXEd U8jDJ6FopdXkUMwzpPkU9Qbo+zebiOeoq+8F7m/FyIXHeFaIxIqk/+PQjh2qttoM8SBD 0+LOjVnDPYcmYufMuogjqTnsxnmfreHi11b8CYiIA2NGFKH+Xd7fKfuywpvqCLiNNug9 2WabeyAzrzMgPSej1OorIfB+OgVlLAGi/h9Jou6XLykIKZfHtS/Vz6YTCiXKnCfwjT0Q vrW139dhlNxrGVVdhL5JEAjUSs7KQuGG1B1vrOGVV1LwItVDqAOqRWXciFiGJLOkCakI PsRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707468415; x=1708073215; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SZwRK1DevWHs7TSy/8l1VCGmE7RT9MSmuvvOPNO04ZE=; b=JO5dvUH/x7S6TB4L48ifvhAsOUQEn+AoWXnmvLcsS6UYvuEmEpQerWNy7EL0TOrD5P Xn8+RN8lISQBZkg1r9dE42admNuALHDLeJNydaAas8N8SrAPsdgwqpPlohTFSeHuWNPH 7pUGjNNwPK6yKOYYwi7CGz8k5Y6mEUQz98vluy8k+0bmFNrl4B0YHsc3U2KsqQtmAgT1 MEL3tzmVA6cUc8/5mAWJqgL+WB2gTWBObgnoYo5ZPUQJtSPBtXOWIzSvaWDnZ95Ev5N0 vm9G+HkkOdwkdsOTi1KyuGt0zZACtZ0WzQMf5L49JqD5dxjKjRP72238+M+s0x7HxwK/ rXPA== X-Gm-Message-State: AOJu0Yz6jXiY4oa0Jf2UGnXqcjr/w2jSYkPBH5Q4eydXrCCbR71slrH3 gqm3kVSU2xcU2ZRyCPnt42vaVg8vJUoGaujLlRXL8aKr7gubtSWW X-Google-Smtp-Source: AGHT+IG6ikGOM0+y1lKrtnzXUToQ3aaz7wu2SFc4d/jW8z2QjNHbwXPT9alpt+r7RAQlQ4i/3SKawQ== X-Received: by 2002:a5d:5228:0:b0:33b:3b89:8d14 with SMTP id i8-20020a5d5228000000b0033b3b898d14mr581050wra.25.1707468415289; Fri, 09 Feb 2024 00:46:55 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUXxTSxu/ibSAf6MK8BKw2R4lYZ3VbtkfpeAI+hSXAARmY98rCaubF3pJN7kgShEFp2iEZ4ENk/IpO0PnMQsTHy0vhcGuxX+rcQrtjav2h3a3yOrPfnSkmbzIJIijatZkq95L4I26q/evTKtCGQximYErEbbzXa+tcSr9y1MKBwGC6/hOS16LcAH8ZWspvnX9ANg0MiX7KuOR83BzttLzlECiY5xuDmuvqkUc+KcsgyLJLUqddN0Bol5E35XOPPCM17pfo6e6UkgOqkUYhMJ0IxwPJxTS0fHQUe1hQ7mhiiLFAPQ1qMK5yN1OL1F16vwIqdnTexgdZt0flYYOyM3w2rgekbgRyJ2+HCjSopLOSc3ZzQxAZYOMhj9BQ54xEniJyRtoh2OPpwNrcKJGvYFLkQrMEfTAO3XbcJikaDP4CP90HZavXlBL7yjNORIQonJj7uJhUVL2RzEhvr2Xwnl7emCdmuMFpkapg1tG1S5sE1djmIFUUURshF3KSbhyUMYXrHMjAomPkvUifTImH2fSGUlCSCNfMItCc3tvf7arqCicvlCieTZYoihn+Kd8OuQq8jEka5Z14WSgu5qVFBlR+vbXkHfYk= Received: from eichest-laptop.toradex.int ([2a02:168:af72:0:765:2268:762e:2748]) by smtp.gmail.com with ESMTPSA id y6-20020adfee06000000b0033b3cf1ff09sm1236689wrn.29.2024.02.09.00.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 00:46:55 -0800 (PST) From: Stefan Eichenberger To: nick@shmanahar.org, dmitry.torokhov@gmail.com, robh+dt@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, francesco.dolcini@toradex.com, Stefan Eichenberger , Krzysztof Kozlowski Subject: [PATCH v3 1/2] dt-bindings: input: atmel,maxtouch: add poweroff-sleep property Date: Fri, 9 Feb 2024 09:45:42 +0100 Message-Id: <20240209084543.14726-2-eichest@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240209084543.14726-1-eichest@gmail.com> References: <20240209084543.14726-1-eichest@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240209_004657_063920_85BC37AE X-CRM114-Status: GOOD ( 12.81 ) 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 From: Stefan Eichenberger Add a new property to indicate that the device should power off rather than use deep sleep. Deep sleep is a feature of the controller that expects the controller to remain powered in suspend. However, if a display shares its regulator with the touch controller, we may want to do a power off so that the display and touch controller do not use any power. Signed-off-by: Stefan Eichenberger Reviewed-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/input/atmel,maxtouch.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml index c40799355ed7..8de5f539b30e 100644 --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml @@ -87,6 +87,12 @@ properties: - 2 # ATMEL_MXT_WAKEUP_GPIO default: 0 + atmel,poweroff-sleep: + description: | + Instead of using the deep sleep feature of the maXTouch controller, + poweroff the regulators. + type: boolean + wakeup-source: type: boolean From patchwork Fri Feb 9 08:48:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13550968 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 3E96DC48297 for ; Fri, 9 Feb 2024 08:48:38 +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=a2UnJCGbcY+hsYS8AJDrGPyXChhKvfvKEZC1y4JdokY=; b=cUDDCSK2elgJEF RXm5n3tFAZ6eJQMy5/SHhG5rX2r4u3ebJtIvfCpwImLgMiFMSnRWeZwFejgkphWsw7wuVNfBuNzLP 5uve++P5SnyH5d6fY3KMJlbM90mUb3bZ9lcdG3wlLZtzC26CirbCa2ns7E5N+Bxrx9Y/XvTxuGmnj ddBtg9hwXSecbw9+d47gpX8ZIo5mh1YVb1pGSgCheT+MIq0R98JsoALhw6RBK21iM+hnTe1g8d8S2 IBHM183TpcFCg1Ypj5DzeQIqbCAKxk0e6rJyMrlaBC4GnW03UYG4m7HMKGBoNeLsnUcm7er0zKqDh qDHzkYjrLQPr5/KIFWQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYMYd-0000000GUWP-1wPI; Fri, 09 Feb 2024 08:48:27 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYMYb-0000000GUUf-06HF for linux-arm-kernel@lists.infradead.org; Fri, 09 Feb 2024 08:48:26 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-41028900b83so5598325e9.3 for ; Fri, 09 Feb 2024 00:48:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707468502; x=1708073302; 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=mVc4M1YbGvNb8ipoFp9BUg+QNpL61/sf2CwDTAOM2wc=; b=TWvokKU4I2XlQ+6CEIgJ/HKxDKsHW8ONlh/oJO1HNW6UJ7NMCRfy1q7Tp8O/BYSGH9 BkvxUPOGKVluoHCOTt1+QT4a3K+f1LLRHpmbrqraYSvalpVrF037ntvxly9FaN5vZ/Qe LWPSuANxcPlNm+qmAwJFlXmZdNOQ8ejsl9wwEt0/7zoR63gHPK6a33FsSdMbVkshJpv1 7m0TS04PtAwivqIme8Z0OwAPTwRvtPNQDGtuognrzZW2q5/XoBdhXf03KRDaKeB1Tn12 ak9J6WKTzF1MHgMgmkL0EyFbTqSz1W+ThQIta+ymbGJikMjJvLywq/Ncg5dCW+1+PLZv hsJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707468502; x=1708073302; 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=mVc4M1YbGvNb8ipoFp9BUg+QNpL61/sf2CwDTAOM2wc=; b=iMBIEfUYGgTAUJ4CHB7+ZyyjdGb51KJw+y/Bt0gTtWT6YWZZ6t88tyf4U1WYLQisHL 7iK/LjDnOIEnHzgmsDjAsyXO9GgpkWbuwVMWKTJpZylo0D40RTva/Q3AQdKosdLPoglt XE4jZMLbKUqh4mnmHmyGZENezFor2ZY+kC4D/+XBK6iNOaCl7RGMHPDQ6Ksf4WZZ2ZhY fVWYPKUek+BYYxvPMEhakWqE3CrgP7Zg0tZqKK7aGTnI9Y4xrrAwdJ8HvCgxXmhRPO/k c60OaUOXe/o6frYBjIiZROYP2p/gQDrt7mEBOis0XIJBtc0MFytfOMgkZXCT57VqH5Xl kGMg== X-Forwarded-Encrypted: i=1; AJvYcCWuadiBiaeRp6yyQOorrluJJJFqLBMKJZ9jH3wMtqomZOoUY18SM9yswa0w7dP+s3pFzTin1jG5p9NjmG9m39Ch0ic+PAyupCjN8hdhHn9wsxMG/kQ= X-Gm-Message-State: AOJu0Yxhge7YvUWcSdx1MOLEaAShqaSPv7xITEDXlXDaqRj+1fVveswW oa2jIXCHLPWwyn4ZDSWpjQ24nIxrlbDwSZCyl+NQjOkZe0CExwiKcDVJ9Bqa6n8= X-Google-Smtp-Source: AGHT+IHuxdHaNTj7uUg4YZXvHOqK3J6+QqpObkDOjVG7/rLFtq6TckteUGsRtSTTw5jPMArfUD8fuw== X-Received: by 2002:a05:600c:4587:b0:410:5f2f:ba24 with SMTP id r7-20020a05600c458700b004105f2fba24mr654283wmo.36.1707468502203; Fri, 09 Feb 2024 00:48:22 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCU2Tiy+O6M8HnHHpdnhfaYBO9GDILs3PraxayUeInXD/FQNeVFFqDpP9cvIj2VDvLQpSL16hHaq6NYgiQl0xiku68jJZbUarnWIm5Uynd8AG0ziwiKLLN3zrvxEUFLKpG8sqzBN6V2PDK+8EYt/qLcxXjG2oNtyLchDkKFY84igUAOzKxZknzNbc88edXa2cVEim4RkUH4J4ubb8vREvigKjR2p/uE9uB0eOlV6u+A3nhk2f0ocOonK1UhkpVZ3a8BMs5lhgj9WSC1KX8ozVQKG8E1NGcNNSQOWO7MP4FTh2oUPV4Id2iKS3vXAm7tzaHj96tqcnj2x+veWjUBi736aRC3MRlm0y4VCkjEVt32esUhvHf+cEWVmKwrrGbOyrFY+onnWKAaWy/PepFKcIQPQHQAqQOvLDfCvGL8XgqCplOIZIe5HhlDImUDvD5hi7miShnN9DHXVaDDMcWSv89azzDowpFofhCLe/SY0ebvBk0nWsvHXDAngFWgSKN+2wcJsDSRU5ozb7eM+F+qY4CQwKB1roiAA9l6q0rx/CzU4oARbeRz3 Received: from eichest-laptop.toradex.int ([2a02:168:af72:0:765:2268:762e:2748]) by smtp.gmail.com with ESMTPSA id e13-20020a05600c4e4d00b0040fdb244485sm1897494wmq.40.2024.02.09.00.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 00:48:21 -0800 (PST) From: Stefan Eichenberger To: nick@shmanahar.org, dmitry.torokhov@gmail.com, robh+dt@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, francesco.dolcini@toradex.com, Stefan Eichenberger Subject: [PATCH v3 2/2] Input: atmel_mxt_ts - support poweroff in suspend Date: Fri, 9 Feb 2024 09:48:18 +0100 Message-Id: <20240209084818.14925-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-20240209_004825_159858_26554CD3 X-CRM114-Status: GOOD ( 21.11 ) 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 From: Stefan Eichenberger Add a new device tree property to indicate that the device should be powered off in suspend mode. We have a shared regulator that powers the display, a USB hub and some other peripherals. The maXTouch controller doesn't normally disable the regulator in suspend mode, so our extra peripherals stay powered on. This is not desirable as it consumes more power. With this patch we add the option to disable the regulator in suspend mode for the maXTouch and accept the longer initialisation time. Signed-off-by: Stefan Eichenberger --- drivers/input/touchscreen/atmel_mxt_ts.c | 72 ++++++++++++++++++------ 1 file changed, 55 insertions(+), 17 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 542a31448c8f..2d5655385702 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -317,6 +317,7 @@ struct mxt_data { struct gpio_desc *reset_gpio; struct gpio_desc *wake_gpio; bool use_retrigen_workaround; + bool poweroff_sleep; /* Cached parameters from object table */ u16 T5_address; @@ -2799,15 +2800,18 @@ static int mxt_configure_objects(struct mxt_data *data, dev_warn(dev, "Error %d updating config\n", error); } - if (data->multitouch) { - error = mxt_initialize_input_device(data); - if (error) - return error; - } else { - dev_warn(dev, "No touch object detected\n"); - } + /* If input device is not already registered */ + if (!data->input_dev) { + if (data->multitouch) { + error = mxt_initialize_input_device(data); + if (error) + return error; + } else { + dev_warn(dev, "No touch object detected\n"); + } - mxt_debug_init(data); + mxt_debug_init(data); + } return 0; } @@ -3325,6 +3329,8 @@ static int mxt_probe(struct i2c_client *client) msleep(MXT_RESET_INVALID_CHG); } + data->poweroff_sleep = device_property_read_bool(&client->dev, + "atmel,poweroff-sleep"); /* * Controllers like mXT1386 have a dedicated WAKE line that could be * connected to a GPIO or to I2C SCL pin, or permanently asserted low. @@ -3387,12 +3393,21 @@ static int mxt_suspend(struct device *dev) if (!input_dev) return 0; - mutex_lock(&input_dev->mutex); + if (!device_may_wakeup(dev) && data->poweroff_sleep) { + if (data->reset_gpio) + gpiod_set_value(data->reset_gpio, 1); - if (input_device_enabled(input_dev)) - mxt_stop(data); + regulator_bulk_disable(ARRAY_SIZE(data->regulators), + data->regulators); + data->T44_address = 0; + } else { + mutex_lock(&input_dev->mutex); + + if (input_device_enabled(input_dev)) + mxt_stop(data); - mutex_unlock(&input_dev->mutex); + mutex_unlock(&input_dev->mutex); + } disable_irq(data->irq); @@ -3408,14 +3423,37 @@ static int mxt_resume(struct device *dev) if (!input_dev) return 0; - enable_irq(data->irq); + if (!device_may_wakeup(dev) && data->poweroff_sleep) { + int ret; - mutex_lock(&input_dev->mutex); + ret = regulator_bulk_enable(ARRAY_SIZE(data->regulators), + data->regulators); + if (ret) { + dev_err(dev, "failed to enable regulators: %d\n", + ret); + return ret; + } + msleep(MXT_BACKUP_TIME); - if (input_device_enabled(input_dev)) - mxt_start(data); + if (data->reset_gpio) { + /* Wait a while and then de-assert the RESET GPIO line */ + msleep(MXT_RESET_GPIO_TIME); + gpiod_set_value(data->reset_gpio, 0); + msleep(MXT_RESET_INVALID_CHG); + } - mutex_unlock(&input_dev->mutex); + /* This also enables the irq again */ + mxt_initialize(data); + } else { + enable_irq(data->irq); + + mutex_lock(&input_dev->mutex); + + if (input_device_enabled(input_dev)) + mxt_start(data); + + mutex_unlock(&input_dev->mutex); + } return 0; }