From patchwork Fri Aug 16 00:30:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Ausmus X-Patchwork-Id: 2845310 Return-Path: X-Original-To: patchwork-intel-gfx@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 DC437BF546 for ; Fri, 16 Aug 2013 00:36:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DEF33202AE for ; Fri, 16 Aug 2013 00:36:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3695C202A1 for ; Fri, 16 Aug 2013 00:36:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 36404E6CC4 for ; Thu, 15 Aug 2013 17:36:27 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 6521CE5C25 for ; Thu, 15 Aug 2013 17:31:58 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 15 Aug 2013 17:31:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,889,1367996400"; d="scan'208";a="387901461" Received: from jausmus-gentoo-dev5.jf.intel.com ([10.7.198.60]) by orsmga002.jf.intel.com with ESMTP; 15 Aug 2013 17:31:57 -0700 From: james.ausmus@intel.com To: intel-gfx@lists.freedesktop.org Date: Thu, 15 Aug 2013 17:30:54 -0700 Message-Id: <1376613069-15790-30-git-send-email-james.ausmus@intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1376613069-15790-1-git-send-email-james.ausmus@intel.com> References: <1376613069-15790-1-git-send-email-james.ausmus@intel.com> Subject: [Intel-gfx] [PATCH] CHROMIUM: drm/i915/intel_i2c: Allow 400khz for atmel mxt bl on VGADDC X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Benson Leung The atmel_mxt_ts bootloader mode can support 400khz operation successfully. Enable it for bootloader at address 0x25 on the VGADDC adapter. BUG=chrome-os-partner:9994 TEST=place valid atmel mxt firmware at /lib/firmware/maxtouch.fw time echo 1 > update_fw Check that firmware update succeeds, and that the time is less than 9s. time echo 1 > update_fw real 0m8.450s user 0m0.001s sys 0m0.100s Change-Id: I52373189e051c265ce32a99cee8b139f51721b28 Signed-off-by: Benson Leung Reviewed-on: https://gerrit.chromium.org/gerrit/23760 Reviewed-by: Daniel Kurtz --- drivers/gpu/drm/i915/intel_i2c.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c index 6d9364c..a18837f 100644 --- a/drivers/gpu/drm/i915/intel_i2c.c +++ b/drivers/gpu/drm/i915/intel_i2c.c @@ -346,10 +346,12 @@ gmbus_xfer(struct i2c_adapter *adapter, /* Hack to use 400kHz only for touch i2c devices on ddc ports */ gmbus0 = bus->reg0; if (((gmbus0 & GMBUS_PORT_MASK) == GMBUS_PORT_VGADDC && - (msgs[0].addr == 0x4b || msgs[0].addr == 0x67)) || + (msgs[0].addr == 0x4b || msgs[0].addr == 0x67 || + msgs[0].addr == 0x25)) || ((gmbus0 & GMBUS_PORT_MASK) == GMBUS_PORT_PANEL && - (msgs[0].addr == 0x4a || msgs[0].addr == 0x26))) + (msgs[0].addr == 0x4a || msgs[0].addr == 0x26))) { gmbus0 = (gmbus0 & ~GMBUS_RATE_MASK) | GMBUS_RATE_400KHZ; + } I915_WRITE(GMBUS0 + reg_offset, gmbus0); for (i = 0; i < num; i++) {