From patchwork Wed Mar 6 07:41:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benson Leung X-Patchwork-Id: 2223601 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 B8D66DF23A for ; Wed, 6 Mar 2013 07:42:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755203Ab3CFHmn (ORCPT ); Wed, 6 Mar 2013 02:42:43 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:37296 "EHLO mail-ie0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754571Ab3CFHmI (ORCPT ); Wed, 6 Mar 2013 02:42:08 -0500 Received: by mail-ie0-f173.google.com with SMTP id 9so9095872iec.18 for ; Tue, 05 Mar 2013 23:42:07 -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=DEMijd+4KCZ6Ot+0q64V+DTDwGWH/tweHW8VFV7cdmI=; b=JEAn7JvT+8jaar9OxYsv5ONKCY8W2TCFaAe7K8u1YFY5DRN21DVxu8j59gprMLZcX0 TIR4qfXQ7VCBn8DowfdK36mP9PLEBCqgQzDj7PHIhpUORcHnE9q4/nfYzn/uzVBoYVND tFXlD1ajLVTZP1OOsd1xKOquLXop+kOvruEgg= 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=DEMijd+4KCZ6Ot+0q64V+DTDwGWH/tweHW8VFV7cdmI=; b=oaCEX6DMf8V4NCnPQENbmBbsQU1Xm/tedCvzKRZzJD8m8KWtguLd0GZCwEY+fHYAl/ j0GPD4LGtL406R/Wx9yJFdiB4fRXC4MIG5dXsYy1trlagh6dir0nZi+J2YzSW8nyah1o sySSBHNnURGH7wUjfY2EFkgjywYoeu4Ab+ssaRuu+8+CyJBySZRP7tn+yOZvUrH/1dGn bVL1es8IY5XcGxi4e0IUeA4l70P5zNFDwp5M4D8ZMVilv28Qj0SPa1geFu77z3e4sHq4 sc6RQKVBE7P4npPFMtbfHQrFwq/x68urjKuN0nj/yaTSROFOXQRO6E7SA7zX7BO8AsKf AAYA== X-Received: by 10.50.94.201 with SMTP id de9mr9586672igb.99.1362555727671; Tue, 05 Mar 2013 23:42:07 -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 g6sm19638174ign.4.2013.03.05.23.42.05 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Mar 2013 23:42:06 -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 v2 2/2] Platform: x86: chromeos_laptop : Add basic platform data for atmel devices Date: Tue, 5 Mar 2013 23:41:47 -0800 Message-Id: <1362555707-24654-3-git-send-email-bleung@chromium.org> X-Mailer: git-send-email 1.8.1.3 In-Reply-To: <1362555707-24654-1-git-send-email-bleung@chromium.org> References: <1362187254-9227-1-git-send-email-bleung@chromium.org> <1362555707-24654-1-git-send-email-bleung@chromium.org> X-Gm-Message-State: ALoCoQldmiJmt50z+1mBHo8DpcipFp15n2BA6lrFjZ3lpatiTu+y2cnPTDPuJNZ+cXElRSuD77ub 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 Tested-by: Olof Johansson --- v2: Patches cleanly with v3.9-rc1 v1: Initial --- 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 93d6680..c10ff84 100644 --- a/drivers/platform/x86/chromeos_laptop.c +++ b/drivers/platform/x86/chromeos_laptop.c @@ -23,6 +23,8 @@ #include #include +#include +#include #include #define ATMEL_TP_I2C_ADDR 0x4b @@ -67,15 +69,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, };