From patchwork Sun Apr 29 17:13:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 10370603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 795A360116 for ; Sun, 29 Apr 2018 17:13:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69BC628A1C for ; Sun, 29 Apr 2018 17:13:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E65528A27; Sun, 29 Apr 2018 17:13:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEE0C28A1C for ; Sun, 29 Apr 2018 17:13:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753898AbeD2RNk (ORCPT ); Sun, 29 Apr 2018 13:13:40 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36388 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753559AbeD2RNi (ORCPT ); Sun, 29 Apr 2018 13:13:38 -0400 Received: by mail-pf0-f193.google.com with SMTP id g14so5002270pfh.3; Sun, 29 Apr 2018 10:13:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IQYFUI0YOyAMwQgaV1Zz1E88g2JdrIdJ1LDRZutGF0A=; b=q+h1W8wXPz2Vq1yt1xYXnirofyrx30ncaZbaXi2sthxuFe7hURfLDeZW+1Scg2VK3m 7gnbbkg/Sdx4UJ3ROnIOo8uXBPgV8rYaWNJ+Zp8bWQF41XgdLqWQhjcd1yNa03cJ0Jra 6Ws4Ge5rTuMAk2OO62kUbpHLOrwFpY+2nxr4BlKePAiaBWwXyqhO4RKZJYBQVtMxXji9 KYPmlwvYvNfLiycQJLxbu50H8UUv40p7OQKA/B5P7yegAiAVc1UAf28fg1Uaj8cGFGyn gM9svK69tgahJ+GaAoSZuRqPAoKkSaxb1IRGUq+WeNERi8BPdiHSVVxUgOPqIMuYo9y7 aJ5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IQYFUI0YOyAMwQgaV1Zz1E88g2JdrIdJ1LDRZutGF0A=; b=HbBI9k5nfxevVSqufsrjPaNBBfirkqfG/qbdb2MEqkAFPvo277JuQDX+T3pgB+TxIc KKN6vxQ6xgYTSvLsHpq06qkOENKzhi/trjIJyP+/JSTQtJ3niyzKhSq/xyoBtBGyeBMO BvjbUT1l+90c3BHnD2P5ggAv+Ft36Uqp8vla8B1u51WW4yeOKFjwRH6KCKmsB/nLqQzb IKhvNFRgVJw7E2iOxSO1jviUQJj+OZLjwl02cNNud3mpBXh5QA1lSiZk40dsjbUcJfSr njdWfg2sKzDvBRLMidG8wCoZECcHgjhme7okhXqP57QIzzK3UqWLojixGX4JTFVPjjm5 8ZNQ== X-Gm-Message-State: ALQs6tCdA3O3gqr5eOYuQCIVxfFbC2JYrUh9t+MxI9xXC2KvRCe2aNC/ 9JgOy3YCw0oe86vgB+NEbPbXLw== X-Google-Smtp-Source: AB8JxZrlc8ZZ6mXJzwfo2BwwCt1lQ2QuAo6BiqcEKQYYw/o8UXPmTfZzwam9gk1pQrYGCA5FWE6MBQ== X-Received: by 2002:a63:6d84:: with SMTP id i126-v6mr7948701pgc.414.1525022018239; Sun, 29 Apr 2018 10:13:38 -0700 (PDT) Received: from localhost.localdomain ([240f:4:c2bc:1:754e:5a21:c35f:52a1]) by smtp.gmail.com with ESMTPSA id e10sm10168022pfn.67.2018.04.29.10.13.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 29 Apr 2018 10:13:37 -0700 (PDT) From: Akinobu Mita To: linux-media@vger.kernel.org, devicetree@vger.kernel.org Cc: Akinobu Mita , Jacopo Mondi , Laurent Pinchart , Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH v4 02/14] media: ov772x: correct setting of banding filter Date: Mon, 30 Apr 2018 02:13:01 +0900 Message-Id: <1525021993-17789-3-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525021993-17789-1-git-send-email-akinobu.mita@gmail.com> References: <1525021993-17789-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The banding filter ON/OFF is controlled via bit 5 of COM8 register. It is attempted to be enabled in ov772x_set_params() by the following line. ret = ov772x_mask_set(client, COM8, BNDF_ON_OFF, 1); But this unexpectedly results disabling the banding filter, because the mask and set bits are exclusive. On the other hand, ov772x_s_ctrl() correctly sets the bit by: ret = ov772x_mask_set(client, COM8, BNDF_ON_OFF, BNDF_ON_OFF); Cc: Jacopo Mondi Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Sakari Ailus Cc: Mauro Carvalho Chehab Signed-off-by: Akinobu Mita Acked-by: Jacopo Mondi --- * v4 - New patch drivers/media/i2c/ov772x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov772x.c b/drivers/media/i2c/ov772x.c index b62860c..e255070 100644 --- a/drivers/media/i2c/ov772x.c +++ b/drivers/media/i2c/ov772x.c @@ -1035,7 +1035,7 @@ static int ov772x_set_params(struct ov772x_priv *priv, /* Set COM8. */ if (priv->band_filter) { - ret = ov772x_mask_set(client, COM8, BNDF_ON_OFF, 1); + ret = ov772x_mask_set(client, COM8, BNDF_ON_OFF, BNDF_ON_OFF); if (!ret) ret = ov772x_mask_set(client, BDBASE, 0xff, 256 - priv->band_filter);