From patchwork Thu Nov 12 15:30:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hans Verkuil (hansverk)" X-Patchwork-Id: 7603141 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 F2F789F1C2 for ; Thu, 12 Nov 2015 15:30:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A2AF20453 for ; Thu, 12 Nov 2015 15:30:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 46D8C2042C for ; Thu, 12 Nov 2015 15:30:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752493AbbKLPao (ORCPT ); Thu, 12 Nov 2015 10:30:44 -0500 Received: from aer-iport-1.cisco.com ([173.38.203.51]:26598 "EHLO aer-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752191AbbKLPam (ORCPT ); Thu, 12 Nov 2015 10:30:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=742; q=dns/txt; s=iport; t=1447342242; x=1448551842; h=to:from:subject:message-id:date:mime-version: content-transfer-encoding; bh=xoQ0/Q1Xc5vt5+/Lv3iujxy717HY6xfic0K2GcLZEHg=; b=XaTOLPCF0Kj/hYOlOqpLZY6dazrEPrLR1sLBd6ZnSXo+WzvE/N8ycJU8 cwXHFkyVX8vsT7ge9uYsCENzUOPbRYShawFUNH7v1SGrG4M6FOTwDxWxv qnf/vHUzygbX3czzLWraDWGGsW37ofpAkirH6n555HCi1naE0rGdflAL9 Q=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DMAQAir0RW/xbLJq1ehH2+PwENgWWIAhQBAQEBAQEBgQqEXlU2AgUWCwILAwIBAgFLDQYCAogqo0WPcJBrAQEBBwIBIIEBhVOMc4FEBZZIjSeJHZMoHwEBQoQFPTSFPQEBAQ X-IronPort-AV: E=Sophos;i="5.20,282,1444694400"; d="scan'208";a="631681444" Received: from aer-iport-nat.cisco.com (HELO aer-core-4.cisco.com) ([173.38.203.22]) by aer-iport-1.cisco.com with ESMTP; 12 Nov 2015 15:30:39 +0000 Received: from [10.47.79.222] ([10.47.79.222]) (authenticated bits=0) by aer-core-4.cisco.com (8.14.5/8.14.5) with ESMTP id tACFUdq5015721 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 12 Nov 2015 15:30:39 GMT To: linux-media From: Hans Verkuil Subject: adv7511: fix incorrect bit offset Message-ID: <5644B09F.7040706@cisco.com> Date: Thu, 12 Nov 2015 16:30:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.3.0 MIME-Version: 1.0 X-Authenticated-User: hansverk Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-14.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY, USER_IN_DEF_DKIM_WL 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 The quantization bits are in bits 7-6, not 7-4, so shift by 6 instead of 4. This bug is caused by a typo in the adv7511 datasheet. Signed-off-by: Hans Verkuil --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c index e4900df..b8de64c 100644 --- a/drivers/media/i2c/adv7511.c +++ b/drivers/media/i2c/adv7511.c @@ -1116,7 +1116,7 @@ static int adv7511_set_fmt(struct v4l2_subdev *sd, adv7511_wr_and_or(sd, 0x55, 0x9f, y << 5); adv7511_wr_and_or(sd, 0x56, 0x3f, c << 6); adv7511_wr_and_or(sd, 0x57, 0x83, (ec << 4) | (q << 2)); - adv7511_wr_and_or(sd, 0x59, 0x0f, yq << 4); + adv7511_wr_and_or(sd, 0x59, 0x3f, yq << 6); adv7511_wr_and_or(sd, 0x4a, 0xff, 1); return 0;