From patchwork Fri Feb 9 10:50:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13551040 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 955CDC4828F for ; Fri, 9 Feb 2024 10:50:35 +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=UrNJ2B6YUaqku6 od+/VB/j0wUNZQYr8/T+2NWlmW5EVErB8gGDveNYFdQuW0VovI4aMPr72zXzKY5B42TycKd6jY4ur OyDIs6sGS1qDgaOIU34UWWmimzdxisQXm+F+56CERr+7NlEToBL6AtMdiZ98iePu1WCh0diEuCLls ZHINvZyyHkSj+saYGZ/W/7dLDCFzagcRzF0tJxzVFMvXj/GRAqr2clHh/etGzgZIlv6ac+ZxD8Sl8 5om25C+TnwxGhXU30PyHsdYkxMDTMbhiPYTaTJvvJD0gOIkK7EHJKtzXeKDMCOjYNWBbNxUaMPgw6 rQzH4sYzalV3lsmlpEyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYOSf-0000000GlJt-2qBf; Fri, 09 Feb 2024 10:50:25 +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 1rYOSa-0000000GlGj-0YNs for linux-arm-kernel@lists.infradead.org; Fri, 09 Feb 2024 10:50:21 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40fdc63f4feso7030965e9.3 for ; Fri, 09 Feb 2024 02:50:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707475817; x=1708080617; 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=hiw7STIwH5rYmzlfL1zNFjCcUBHsRwwOJ5fQC89ZPts5bZNbVVHIQ7voN00SBoujMr dXSKmMuu7robcc+TbuWV1zKKYLRzkXPoOXw5HfwafeAwUTaL6mDlGs+aENnyG1iiD9dT N4T/9f29zioyRcsVCpowTsIvAAgY2vLs/tw7ehlOyqjTxEWZUKhZbMj2rkZKLdBzhaBS lZYOOLXWhFWusEwq6lUTxEG7u2hgn40z64RWMZh9i7lak/mzNl7O/UGdOEzPmsGiT4o1 kS6dY1h7uNiZyJ5Mlc8w53maB3jIGa2htya9jxzBRWs/HGBl5DI9xOD+aP2e9RLNkivK Q5BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707475817; x=1708080617; 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=d2znE7ZtpZdnALK2OQuWb4UEYDMhW9/sZeHRvBa/uKURtp3qN58qYSb1qk/Hfd+3Ci 6+xljwpbtbHMK/gIBZgu73HLuS+jdL7QPLapPQWy3DzvrjuiYzi/GuzNws/1cVkGFUG3 Gb9J0TXrf5ZC7B7osIDl7zmi0uJ+Zj+B2Xo88/64+83wn1NMCvijjtNCsh+8fv0NfG86 0fBfvHTLz/jhtSCvqoZ76WztMLCxY3izEUX3osHpikW9hp3fzcOGySNQ6yOU73Af0Jjr DEVyqh2k3idLksxKwfbM+2JR9/fgMysB9vU0Wjopgi4VTEVkQwZHzsFFw2pVeghIGYj7 Y3ig== X-Gm-Message-State: AOJu0Yw/tvyBxvsqun5533f8lDAio2V+tY95+ZUeUfAp3wwZUcZQiVrh ccRTtBbzy/axzTtYSgppFvDQGHxpbLI1Ad30ByYO5Cc/+VIG1mjd X-Google-Smtp-Source: AGHT+IFLvTHLX8Ab5kv6hCZYjklTGqUjMudeOyyOj57sb/u9OZKz6XTkP90ITEfQG3yjl+mZG4Zqnw== X-Received: by 2002:a05:600c:3596:b0:410:6506:68c2 with SMTP id p22-20020a05600c359600b00410650668c2mr760796wmq.14.1707475817104; Fri, 09 Feb 2024 02:50:17 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWTJFCYzflemGUHHiGpmSJ3L4fd/0g+ziBN0wzI9pf89I5j691ofb14mCig7J21SNfrnQ2SfNXEl/990+T7tDJ5KLytUAnv2fCQ0xz8y5Gedr8A6PP6WAQmM/o7OpnJ88gYCHFIHmkaVR8tKkt0obhRtOP1bKAdv0H0NYFBcZFX7zvrMsNsj86M8o6Ong7PcG61ULuJg5Fr4OBromd71W0ZpOPn4LIwDdxYwxaAxH1FLhhFO6Jz2KX810tnLulakx3XRdtmB41q1D7aQYnKPHPguIXTubp5LL1B5Qavf4U80mEBUslVxB1BBo22DcDh6UMI7wzeAi3nXl0pIrjiiLx9reUZat/IIHJtkctFSu2XS1HYVYFSBC488bgoS6H0EmnkTGSg9HB6FcCQJUcPwmux5O2eV6zNtO7Y+hv/8dGc+YEpFEA2f3Fty/BNvtfPDkrHfsoyE7LOBhM4I2VOBhrPOGB3awEhX/2rsmEz6HpK8xetYluvjEgydRw4YrIQwhhJWu7nm4Xn7Sqm/Z3c41Alh3uu9odVm1HbXgNo+o1vP1ViVzIImFwAE3+IZTEm4FRMvG6PezfnspnE1UcQisrLnd5wyYI= Received: from eichest-laptop.toradex.int ([2a02:168:af72:0:765:2268:762e:2748]) by smtp.gmail.com with ESMTPSA id t18-20020a05600c199200b0040fc26183e8sm253627wmq.8.2024.02.09.02.50.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 02:50:16 -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 RESEND v3 1/2] dt-bindings: input: atmel,maxtouch: add poweroff-sleep property Date: Fri, 9 Feb 2024 11:50:11 +0100 Message-Id: <20240209105012.22470-2-eichest@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240209105012.22470-1-eichest@gmail.com> References: <20240209105012.22470-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_025020_184338_F368A4DC X-CRM114-Status: GOOD ( 12.48 ) 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 10:50:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Eichenberger X-Patchwork-Id: 13551041 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 950C7C48297 for ; Fri, 9 Feb 2024 10:50:39 +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=a2UnJCGbcY+hsYS8AJDrGPyXChhKvfvKEZC1y4JdokY=; b=rOyvuZJxCkmD2l LWLFH6yCExRhkzEjqwB5n4K4OBtO2hOVuEIPK7NqOz6iZJ6a+lfkZkp4CMkzLpgc8c/wuijrnZJML eCIpJiIHiiyPN30Uh/ftY7FWFuoKQI6AZ+jboIAB3PclRCUHK1asa66Jbu9YJKYi0M9ojFZ73Ic5u Z3XvzBmwGDGO7BYd1Wc8jJuG8YH3IWaDcVNVFYJPH2Ux9GWFOHctOAbLeeTxT6aU0DcTWvh2NBhNP XHWmBHnRg+58vDh0Cjc2MOPhUqtLdpGFMIxW0WnlJIb/9UYU19DiGsHac3DHZ5swJGZqa0XZOFcwX ErMOkXmVRioZUvdw+nhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rYOSh-0000000GlKl-0ASP; Fri, 09 Feb 2024 10:50: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 1rYOSa-0000000GlGl-3ReG for linux-arm-kernel@lists.infradead.org; Fri, 09 Feb 2024 10:50:22 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4101d4c5772so4568985e9.0 for ; Fri, 09 Feb 2024 02:50:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707475818; x=1708080618; 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=mVc4M1YbGvNb8ipoFp9BUg+QNpL61/sf2CwDTAOM2wc=; b=nj9/gv4TYzyF/ziNqAMgTLLtb1wTBaEOy0j2hAudBq0k5xKawOswhKGGzLliGgm97m r+QPWiG4s28+KQCTzIpQE9tysn+E6BFvDfliqTZm7Om4fdo9deWlOejsCrR/N+QaKkrl V+pP7CR5ZJ93qMMECUUJKM9j62kZ2B/Vwjk0pv5hnOdIRbjMDgUDJ2OpA/ZX1Y6Udzpw T2YvIRBNnxM36OPpPA7yb1mHZobmR80GbMhVPI4RopFTVxlgJCART5+B1KHwoaRLs/DP mF005tgpqjzaWD8RTwE215McqngO9sjAIdat9R6XA4lVzhXGwBw8tJSYGsSH2Jf4XxLO EZtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707475818; x=1708080618; 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=mVc4M1YbGvNb8ipoFp9BUg+QNpL61/sf2CwDTAOM2wc=; b=ESs8DB4iB8ldn2UaiunhQ1OsxD6uaVoFkDnRu0G/mefVmRSpnX9s+xq+iuvba7cZq0 JWmPKLMl98L8TpSOUsd4z41KxiLy0D7Dt8YDn6TmJUFXK2avv3cwcZqNCJ8NMY3vWQyV 5DwsKYXlYIRv4GEV8OxW9tEDern+r59wvYGoQz5B38EEU9J/6t/86nXOgbfkjSwKvzDv ZGvTW25BQVclUzwO/jrvtk8B60QWkslt3bYAHMCd/QiBzcDoXfGvml7L8/Ll4DqwMhnc x/mff7N1RreUUv/XfRVscMRoCWJyv3em3i0CuNar9FLET8/kkgOxjOBhKVschZsbzpCK gyUw== X-Gm-Message-State: AOJu0YyN7n4dJ6EODWdoip3oF5od7tUZl9lRKGmAQToKWiXSiYlxRWZQ HAHtiZ/AAxepWgkluFlNm3er6QhHOGBKZ0nO3aVWqQhyyBnXuBqr X-Google-Smtp-Source: AGHT+IGnXDekBiujHQv+XLsrfkX6e5Wxmu2GVzrddWdHW02pTuApjf//3c2Wh7SIkpQ3tD9pirwNqQ== X-Received: by 2002:a05:600c:46cf:b0:410:4b4:dc7f with SMTP id q15-20020a05600c46cf00b0041004b4dc7fmr655530wmo.4.1707475818274; Fri, 09 Feb 2024 02:50:18 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCX4eE7ROrtmTolbB2S5sYVQJ9RixDkW0mR4Btlqzf15LrqUXDitF7gsevS5eTiwsbNuxPR71Y1KDWbB3QNk5IqGsbkC0HTatgMlq/J3EqoobkPpk6emEaggcm0BhrA1njJEBLBPEvvDi0Uo62kUPwy/c8LQIDME/BemJ/Ls4s0B8/LG0if0oQAYfbXTT+s4dxTQhvrcDPy3mtFz+7hDvHppzmvLJAjj4xZF+rSCTJ+vZGDwSUKwfpcWqoAstwU+pmtcwOMNjoFpr3vfnYPUExNYbKRTUg+ZfUnJyrEtZFtroX8c8hWxcq9wB4URcHIk+WoWWC6HxDKDFTc/LXy11APlURRec/O8h7DPe3/i6hm7nqIse9FjOgVjHir4B8ltDe8BcBJgmK/bwVqCjs7qKXE4TmbnJ+iKvGeSNZYjgkgkiadgj9qdwno7FjMA4BNf/FKSrrCXQfaX9GcvX2hFwjNcADTuwpKVkXOKV/Urug3uRR0cUEDxWoEwWpgwfoI6zGvfTMsjNXCMNMTvo3N9Xuff7gzulNWxLR6S1HVxUVAR/hLoBx/2 Received: from eichest-laptop.toradex.int ([2a02:168:af72:0:765:2268:762e:2748]) by smtp.gmail.com with ESMTPSA id t18-20020a05600c199200b0040fc26183e8sm253627wmq.8.2024.02.09.02.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 02:50:17 -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 RESEND v3 2/2] Input: atmel_mxt_ts - support poweroff in suspend Date: Fri, 9 Feb 2024 11:50:12 +0100 Message-Id: <20240209105012.22470-3-eichest@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240209105012.22470-1-eichest@gmail.com> References: <20240209105012.22470-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_025020_892607_5D4DE638 X-CRM114-Status: GOOD ( 21.35 ) 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; }