From patchwork Wed Mar 5 03:39:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Heiny X-Patchwork-Id: 3770181 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DD379BF13A for ; Wed, 5 Mar 2014 03:39:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE28D20240 for ; Wed, 5 Mar 2014 03:39:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E2C0620237 for ; Wed, 5 Mar 2014 03:39:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756032AbaCEDj2 (ORCPT ); Tue, 4 Mar 2014 22:39:28 -0500 Received: from us-mx2.synaptics.com ([192.147.44.131]:14770 "EHLO us-mx2.synaptics.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755658AbaCEDj1 (ORCPT ); Tue, 4 Mar 2014 22:39:27 -0500 Received: from unknown (HELO securemail.synaptics.com) ([172.20.21.135]) by us-mx2.synaptics.com with ESMTP; 04 Mar 2014 19:39:27 -0800 Received: from USW-OWA1.synaptics-inc.local ([10.20.24.16]) by securemail.synaptics.com (PGP Universal service); Tue, 04 Mar 2014 19:25:40 -0800 X-PGP-Universal: processed; by securemail.synaptics.com on Tue, 04 Mar 2014 19:25:40 -0800 Received: from brontomerus.synaptics.com (10.3.20.103) by USW-OWA1.synaptics-inc.local (10.20.24.15) with Microsoft SMTP Server (TLS) id 14.3.123.3; Tue, 4 Mar 2014 19:39:26 -0800 From: Christopher Heiny To: Dmitry Torokhov CC: Linux Input , Christopher Heiny , Andrew Duggan , Vincent Huang , Vivian Ly , Daniel Rosenberg , Linus Walleij , Benjamin Tissoires , David Herrmann , Jiri Kosina Subject: [PATCH 01/02] input synaptics-rmi4: remove rmi_f01 interrupt enable handling Date: Tue, 4 Mar 2014 19:39:19 -0800 Message-ID: <1393990760-2587-1-git-send-email-cheiny@synaptics.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.3.20.103] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This functionality has been moved to rmi_driver.c. Signed-off-by: Christopher Heiny Cc: Dmitry Torokhov Cc: Benjamin Tissoires Cc: Linux Walleij Cc: David Herrmann Cc: Jiri Kosina --- drivers/input/rmi4/rmi_f01.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/input/rmi4/rmi_f01.c b/drivers/input/rmi4/rmi_f01.c index be68ae2..ee5f4a1 100644 --- a/drivers/input/rmi4/rmi_f01.c +++ b/drivers/input/rmi4/rmi_f01.c @@ -105,7 +105,6 @@ struct f01_basic_properties { /** * @ctrl0 - see the bit definitions above. - * @interrupt_enable - A mask of per-function interrupts on the touch sensor. * @doze_interval - controls the interval between checks for finger presence * when the touch sensor is in doze mode, in units of 10ms. * @wakeup_threshold - controls the capacitance threshold at which the touch @@ -115,7 +114,6 @@ struct f01_basic_properties { */ struct f01_device_control { u8 ctrl0; - u8 *interrupt_enable; u8 doze_interval; u8 wakeup_threshold; u8 doze_holdoff; @@ -126,7 +124,6 @@ struct f01_data { struct f01_device_control device_control; - u16 interrupt_enable_addr; u16 doze_interval_addr; u16 wakeup_threshold_addr; u16 doze_holdoff_addr; @@ -137,7 +134,6 @@ struct f01_data { #endif unsigned int num_of_irq_regs; - u8 interrupt_enable[]; }; static int rmi_f01_read_properties(struct rmi_device *rmi_dev, @@ -186,22 +182,18 @@ static int rmi_f01_probe(struct rmi_function *fn) struct rmi_driver_data *driver_data = dev_get_drvdata(&rmi_dev->dev); const struct rmi_device_platform_data *pdata = rmi_get_platform_data(rmi_dev); struct f01_data *f01; - size_t f01_size; int error; u16 ctrl_base_addr = fn->fd.control_base_addr; u8 device_status; u8 temp; - f01_size = sizeof(struct f01_data) + - sizeof(u8) * driver_data->num_of_irq_regs; - f01 = devm_kzalloc(&fn->dev, f01_size, GFP_KERNEL); + f01 = devm_kzalloc(&fn->dev, sizeof(struct f01_data), GFP_KERNEL); if (!f01) { dev_err(&fn->dev, "Failed to allocate fn01_data.\n"); return -ENOMEM; } f01->num_of_irq_regs = driver_data->num_of_irq_regs; - f01->device_control.interrupt_enable = f01->interrupt_enable; /* * Set the configured bit and (optionally) other important stuff @@ -247,20 +239,6 @@ static int rmi_f01_probe(struct rmi_function *fn) return error; } - /* Advance to interrupt control registers */ - ctrl_base_addr++; - f01->interrupt_enable_addr = ctrl_base_addr; - - error = rmi_read_block(rmi_dev, f01->interrupt_enable_addr, - f01->device_control.interrupt_enable, - sizeof(u8) * (f01->num_of_irq_regs)); - if (error) { - dev_err(&fn->dev, - "Failed to read F01 control interrupt enable register: %d\n", - error); - return error; - } - /* Dummy read in order to clear irqs */ error = rmi_read(rmi_dev, fn->fd.data_base_addr + 1, &temp); if (error < 0) { @@ -279,6 +257,8 @@ static int rmi_f01_probe(struct rmi_function *fn) f01->properties.manufacturer_id == 1 ? "Synaptics" : "unknown", f01->properties.product_id); + /* Advance to interrupt control registers, then skip over them. */ + ctrl_base_addr++; ctrl_base_addr += f01->num_of_irq_regs; /* read control register */ @@ -396,15 +376,6 @@ static int rmi_f01_config(struct rmi_function *fn) return error; } - error = rmi_write_block(fn->rmi_dev, f01->interrupt_enable_addr, - f01->device_control.interrupt_enable, - sizeof(u8) * f01->num_of_irq_regs); - if (error) { - dev_err(&fn->dev, - "Failed to write interrupt enable: %d\n", error); - return error; - } - if (f01->properties.has_adjustable_doze) { error = rmi_write(fn->rmi_dev, f01->doze_interval_addr, f01->device_control.doze_interval);