From patchwork Sat Mar 2 01:20:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benson Leung X-Patchwork-Id: 2205371 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AC6DCDFF33 for ; Sat, 2 Mar 2013 01:21:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752543Ab3CBBVU (ORCPT ); Fri, 1 Mar 2013 20:21:20 -0500 Received: from mail-da0-f43.google.com ([209.85.210.43]:55547 "EHLO mail-da0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752539Ab3CBBVR (ORCPT ); Fri, 1 Mar 2013 20:21:17 -0500 Received: by mail-da0-f43.google.com with SMTP id u36so1654109dak.2 for ; Fri, 01 Mar 2013 17:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=Ngm5NZ2cqC7p6vMoMoOxtYp9EHkXxIjhP6nHga/xD70=; b=Wz2BpGc/GnfkA/apeVcOW4hSo/U9BELWfJYoUOOIYpbw8lV4Nb76kBTqP7pXGetKFM /R7g5RIFv4f+jSAr1TaX4M+wniRyxguXd7DA8KMlm/MSbYW5nmcE+VHrNoYC4dOa2xpV lqLWQc8dFM02uQFEX8Dc3mMJ8W+S8F5AAQ5Gg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=Ngm5NZ2cqC7p6vMoMoOxtYp9EHkXxIjhP6nHga/xD70=; b=SkfLhTpTg2hsIR88IeZ6RPhDEaWFgmYafjOgUYrj9liQq1zRsQpdGWiQRh9ni13OGp 5X6gSCfzP7n4cKFxjohqi+p4NgLfvQkmJupbPQIvr38z/5X6bR75XaxwlgYZjx1Z82sV mOvSRU9qQ3IH/LVKoT1dlC0l6N4bda4LxcrKbrtngO0oAMMy0KQI50WrCNxTPXhxuBI7 MAXmtfFmaUOfHHek4V6XWEd+lrldqkRWzMtbod0gUMSNCnkSXNO9HKqEhPXp96/emgzk ftGhrEh6RzcLGemmfMPg7OnPKM2blhfXXH0pA87FqAvIl3DJaobXtvk8BZIDSzBF1qk5 5OsQ== X-Received: by 10.68.116.169 with SMTP id jx9mr17061342pbb.94.1362187276707; Fri, 01 Mar 2013 17:21:16 -0800 (PST) Received: from laughingman.mtv.corp.google.com (laughingman.mtv.corp.google.com [172.22.73.99]) by mx.google.com with ESMTPS id kt5sm13716751pbc.30.2013.03.01.17.21.14 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Mar 2013 17:21:15 -0800 (PST) From: Benson Leung To: olofj@chromium.org, miletus@chromium.org, dmitry.torokhov@gmail.com, matthew.garrett@nebula.com, rydberg@euromail.se, djkurtz@chromium.org, jy0922.shim@samsung.com, wfp5p@virginia.edu, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org Cc: bleung@chromium.org Subject: [PATCH 2/2] Platform: x86: chromeos_laptop : Add basic platform data for atmel devices Date: Fri, 1 Mar 2013 17:20:54 -0800 Message-Id: <1362187254-9227-3-git-send-email-bleung@chromium.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1362187254-9227-1-git-send-email-bleung@chromium.org> References: <1362187254-9227-1-git-send-email-bleung@chromium.org> X-Gm-Message-State: ALoCoQn1Yx+S6hxmGUyC6VxmO+7KR8uA3yJa1LZnGb92cJRkAtJkXgYHp5aJQT1Q+/P60Wla0Ex2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add basic platform data to get the current upstream driver working with the 224s touchpad and 1664s touchscreen. We will be using NULL config so we will use the settings from the devices' NVRAMs. Signed-off-by: Benson Leung Change-Id: I712bf4726fb4b194fbde44ad200c54d13dc3bdb9 Tested-by: Olof Johansson --- drivers/platform/x86/chromeos_laptop.c | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/chromeos_laptop.c b/drivers/platform/x86/chromeos_laptop.c index 80b8d32..47d665b 100644 --- a/drivers/platform/x86/chromeos_laptop.c +++ b/drivers/platform/x86/chromeos_laptop.c @@ -23,6 +23,8 @@ #include #include +#include +#include #include #include @@ -68,15 +70,43 @@ static struct i2c_board_info __initdata tsl2563_als_device = { I2C_BOARD_INFO("tsl2563", TAOS_ALS_I2C_ADDR), }; +static struct mxt_platform_data atmel_224s_tp_platform_data = { + .x_line = 18, + .y_line = 12, + .x_size = 102*20, + .y_size = 68*20, + .blen = 0x80, /* Gain setting is in upper 4 bits */ + .threshold = 0x32, + .voltage = 0, /* 3.3V */ + .orient = MXT_VERTICAL_FLIP, + .irqflags = IRQF_TRIGGER_FALLING, + .config = NULL, + .config_length = 0, +}; + static struct i2c_board_info __initdata atmel_224s_tp_device = { I2C_BOARD_INFO("atmel_mxt_tp", ATMEL_TP_I2C_ADDR), - .platform_data = NULL, + .platform_data = &atmel_224s_tp_platform_data, .flags = I2C_CLIENT_WAKE, }; +static struct mxt_platform_data atmel_1664s_platform_data = { + .x_line = 32, + .y_line = 50, + .x_size = 1700, + .y_size = 2560, + .blen = 0x89, /* Gain setting is in upper 4 bits */ + .threshold = 0x28, + .voltage = 0, /* 3.3V */ + .orient = MXT_ROTATED_90_COUNTER, + .irqflags = IRQF_TRIGGER_FALLING, + .config = NULL, + .config_length = 0, +}; + static struct i2c_board_info __initdata atmel_1664s_device = { I2C_BOARD_INFO("atmel_mxt_ts", ATMEL_TS_I2C_ADDR), - .platform_data = NULL, + .platform_data = &atmel_1664s_platform_data, .flags = I2C_CLIENT_WAKE, };