From patchwork Sat Jun 6 07:44:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 6558951 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4B7C09F326 for ; Sat, 6 Jun 2015 07:45:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A3482066A for ; Sat, 6 Jun 2015 07:45:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C3AD2068A for ; Sat, 6 Jun 2015 07:45:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751433AbbFFHpP (ORCPT ); Sat, 6 Jun 2015 03:45:15 -0400 Received: from mail-la0-f44.google.com ([209.85.215.44]:33264 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751137AbbFFHpO (ORCPT ); Sat, 6 Jun 2015 03:45:14 -0400 Received: by labpy14 with SMTP id py14so67724399lab.0 for ; Sat, 06 Jun 2015 00:45:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=mLg5gdJwP8nXKJKFOBXlxfLvf91k3nDFB0wCSFSyN0M=; b=nFtFEvC3hlyUmxvBjgVU9VZfiMDhWsZyhwyR3EcAgjqonChkym+/4aXcLgjepyH9ss lhDHrs1gRW/u0pEbDskg+dJqp6NQ4VGe1tDbPZWaUIDmPw/pSpvi1RKAcFP+7soTiFw9 UuFqJX6xKJCEHvM51a6TezfWKWnuzqgm5xIy/FJM7smg+N9H8Z1P0owjDKuTVpjKxRX4 6TwGYGlstbK40lVsJ8EquY3ZybQ8iRJr4VkUXALs+VvmBzndOyU1CPu5dt02QTSWUAC/ qBMPw8KCHL91Xo34PiMeeD4Tpf81f8DRe/vDqMsZfiM+tdOoyC7dw1wmTADV4yXjyXbI KOTQ== X-Gm-Message-State: ALoCoQnsQkkCrQE8U73P1a0q6Z/OS5DcdioSeREXsCO4XMWBF6CxZ8enbZpnNI3KiC3Stjgv1sCj X-Received: by 10.112.201.74 with SMTP id jy10mr6892518lbc.94.1433576712344; Sat, 06 Jun 2015 00:45:12 -0700 (PDT) Received: from dl160.lan (188-67-112-174.bb.dnainternet.fi. [188.67.112.174]) by mx.google.com with ESMTPSA id ca8sm2352502lad.46.2015.06.06.00.45.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 06 Jun 2015 00:45:11 -0700 (PDT) From: Olli Salonen To: linux-media@vger.kernel.org Cc: Olli Salonen Subject: [PATCH 2/2] Revert "[media] saa7164: Improvements for I2C handling" Date: Sat, 6 Jun 2015 10:44:58 +0300 Message-Id: <1433576698-1780-2-git-send-email-olli.salonen@iki.fi> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433576698-1780-1-git-send-email-olli.salonen@iki.fi> References: <1433576698-1780-1-git-send-email-olli.salonen@iki.fi> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 This reverts commit ad90b6b0f10566d4a5546e27fe455ce3b5e6b6c7. This patch breaks I2C communication towards Si2168. After reverting and applying the other patch in this series the I2C communication is correct. Signed-off-by: Olli Salonen Reviewed-by: Antti Palosaari Tested-By: Steven Toth --- drivers/media/pci/saa7164/saa7164-api.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/media/pci/saa7164/saa7164-api.c b/drivers/media/pci/saa7164/saa7164-api.c index e807703..e7e586c 100644 --- a/drivers/media/pci/saa7164/saa7164-api.c +++ b/drivers/media/pci/saa7164/saa7164-api.c @@ -1385,8 +1385,7 @@ int saa7164_api_i2c_read(struct saa7164_i2c *bus, u8 addr, u32 reglen, u8 *reg, * 08... register address */ memset(buf, 0, sizeof(buf)); - if (reg) - memcpy((buf + 2 * sizeof(u32) + 0), reg, reglen); + memcpy((buf + 2 * sizeof(u32) + 0), reg, reglen); *((u32 *)(buf + 0 * sizeof(u32))) = reglen; *((u32 *)(buf + 1 * sizeof(u32))) = datalen; @@ -1475,14 +1474,6 @@ int saa7164_api_i2c_write(struct saa7164_i2c *bus, u8 addr, u32 datalen, * 04-07 dest bytes to write * 08... register address */ - if (datalen == 1) { - /* Workaround for issues with i2c components - * that issue writes with no data. IE: SI2168/2157 - * Increase reglen by 1, strobe out an additional byte, - * ignored by SI2168/2157. - */ - datalen++; - } *((u32 *)(buf + 0 * sizeof(u32))) = reglen; *((u32 *)(buf + 1 * sizeof(u32))) = datalen - reglen; memcpy((buf + 2 * sizeof(u32)), data, datalen);