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: 11902 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 6FA9824146 for ; Tue, 2 Oct 2012 08:13:38 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 23B54A181F7 for ; Tue, 2 Oct 2012 08:13:38 +0000 (UTC) Received: by ieje10 with SMTP id e10so13594640iej.11 for ; Tue, 02 Oct 2012 01:13:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=aTOMcV7VeAaRLvfTpVrXMqrwTaMQNm+RTko19Hqg5Zo=; b=SmuMVoA2pzXu9KdgU5siGP00s21zOuRZ2K4SR79r5OtHn1eR/6BMl+9occtHErmSBr /SGZreK9Dkbexrm3fVkfpf6KorlWkhscRyhHv4P5/esk42dFYSFZqO39wc5k5c17COQe h+mdXRWCcS/lhhomAnFJbIhvprx7fFZog9KDlnL0iKHMf5pi3rOUHLWG5Tk4E1HUpaHj IyrXunTn6TCPVesgqTJo6oRarAZ3DQ48GLQm5sFAtAS7fJh1OrgbSHl+ijpZSct5Nbxj 60CqfEP5Kc669b5xEeJNoytIInIzgl0VGttegL0vk+SwsHTZLOKYPfxLuBZccSWkhNEu 16Ww== Received: by 10.50.0.193 with SMTP id 1mr8131563igg.0.1349165617554; Tue, 02 Oct 2012 01:13:37 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp69876igc; Tue, 2 Oct 2012 01:13:36 -0700 (PDT) Received: by 10.180.99.133 with SMTP id eq5mr20058762wib.21.1349165616240; Tue, 02 Oct 2012 01:13:36 -0700 (PDT) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx.google.com with ESMTPS id h18si804576wiw.39.2012.10.02.01.13.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 02 Oct 2012 01:13:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=209.85.212.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.172 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wi0-f172.google.com with SMTP id hq12so402456wib.13 for ; Tue, 02 Oct 2012 01:13:35 -0700 (PDT) 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 Cc: arnd@arndb.de, linus.walleij@stericsson.com, Lee Jones 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: ALoCoQkC5KXEp3/gNRpluvLh/0cx5ZMQSlX4P42eI+h4HgxWJBcmUqjTcv7+CstrHGpxBZLEJIPu 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 --- 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));