From patchwork Tue Oct 2 08:13:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 1536161 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id 462473FE1C for ; Tue, 2 Oct 2012 08:16:10 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TIxc0-0004RR-ET; Tue, 02 Oct 2012 08:13:52 +0000 Received: from mail-wg0-f49.google.com ([74.125.82.49]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TIxbo-0004PY-C6 for linux-arm-kernel@lists.infradead.org; Tue, 02 Oct 2012 08:13:41 +0000 Received: by wgbgg4 with SMTP id gg4so2556242wgb.18 for ; Tue, 02 Oct 2012 01:13:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=aTOMcV7VeAaRLvfTpVrXMqrwTaMQNm+RTko19Hqg5Zo=; b=ej8xUfcgzD8V4oBCpOyMr7KcR+1ywUsCRE5pWx+FGrs29h7Q9nKzWrw/T8YF1G+QL5 dZdtP0zNtD/Ptno4PBGKiygRl7POjITESQz9vXj5TQcf3FLqMvYMOC6XzXv3BMvRQdLN SElsPM8pLQdSbmGVK6z8ndfeXXXo7U62ZKArnhfOUCmEwZetyj1rx9fqbD9tndUMEOrL XYJ1L5nHjniWakMuikLX2BwZ0j3XCe4hzYP7j4Wskm81wbuy2ohh15dDFwhpnN0JsGDC b9cszP60DndpvTCV6XSk4fyJe5pOJ+m7syFwUmc9OoscSnCwOEoHAjTT3W4QepbbH6ct SjOg== Received: by 10.216.202.206 with SMTP id d56mr10169864weo.73.1349165615558; Tue, 02 Oct 2012 01:13:35 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id p4sm1193936wix.0.2012.10.02.01.13.34 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 01:13:34 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/10] ARM: ux500: Strip out duplicate touch screen platform information Date: Tue, 2 Oct 2012 09:13:15 +0100 Message-Id: <1349165603-24401-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349165603-24401-1-git-send-email-lee.jones@linaro.org> References: <1349165603-24401-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQlftivsxSzN/V7QCF3B3rtTsIVz2MOKnIwu9sAd7Oh/nJSAr603xKgJk9P8v6CYQkh4x77n X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.49 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Lee Jones , linus.walleij@stericsson.com, arnd@arndb.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org We're currently carrying two 'struct bu21013_platform_device's which are identical for no apparent reason. Here we remove the extra burden and apply the same information to the two different instances of the bu21012_tp driver registration. Signed-off-by: Lee Jones Acked-by: Linus Walleij --- arch/arm/mach-ux500/board-mop500-stuib.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/arch/arm/mach-ux500/board-mop500-stuib.c b/arch/arm/mach-ux500/board-mop500-stuib.c index 8c97977..564f57d 100644 --- a/arch/arm/mach-ux500/board-mop500-stuib.c +++ b/arch/arm/mach-ux500/board-mop500-stuib.c @@ -162,18 +162,6 @@ static struct bu21013_platform_device tsc_plat_device = { .y_flip = true, }; -static struct bu21013_platform_device tsc_plat2_device = { - .cs_en = bu21013_gpio_board_init, - .cs_dis = bu21013_gpio_board_exit, - .irq_read_val = bu21013_read_pin_val, - .irq = NOMADIK_GPIO_TO_IRQ(TOUCH_GPIO_PIN), - .touch_x_max = TOUCH_XMAX, - .touch_y_max = TOUCH_YMAX, - .ext_clk = false, - .x_flip = false, - .y_flip = true, -}; - static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = { { I2C_BOARD_INFO("bu21013_tp", 0x5C), @@ -181,21 +169,17 @@ static struct i2c_board_info __initdata u8500_i2c3_devices_stuib[] = { }, { I2C_BOARD_INFO("bu21013_tp", 0x5D), - .platform_data = &tsc_plat2_device, + .platform_data = &tsc_plat_device, }, }; void __init mop500_stuib_init(void) { - if (machine_is_hrefv60()) { + if (machine_is_hrefv60()) tsc_plat_device.cs_pin = HREFV60_TOUCH_RST_GPIO; - tsc_plat2_device.cs_pin = HREFV60_TOUCH_RST_GPIO; - } else { + else tsc_plat_device.cs_pin = GPIO_BU21013_CS; - tsc_plat2_device.cs_pin = GPIO_BU21013_CS; - - } mop500_uib_i2c_add(0, mop500_i2c0_devices_stuib, ARRAY_SIZE(mop500_i2c0_devices_stuib));