Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1625451imm; Thu, 19 Jul 2018 05:14:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdzVFdOOGBORW8m0STtHnRcnoWjZfP+3Wy8JiJ2tLJKTWqgI26Q5x7z1R5uLAjf/b9kv/PY X-Received: by 2002:a65:46ca:: with SMTP id n10-v6mr9879956pgr.345.1532002464272; Thu, 19 Jul 2018 05:14:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532002464; cv=none; d=google.com; s=arc-20160816; b=ZGBA8MpjoPrX1PblCOfWDy/w+rFWz69CLG4GbnwA6YPIqP1a7bGW7c5wIwoj7Kf1GR v0+borBwj6MNvJx0EJxTpcUh4q/I6PIYyQV3qdd2lLWF4VH27JiAGgybbOeyeC2fF2WP BpQXoM9SzF8nbuFwie0M9gQW2XJyLakTu+yAVr4gh17DY8bTz5ts/klhrF6FeslnHt37 zSFxYLibmLMhJyDKUPzFz4wvEZtS4qEXv/A0swLmVNYm/xbEyceXgRtGCCe92DLyc082 NdpKsWLn4+JzLjlNgZ2IxPTo22byr0lntus3loehfrHUtf6H2IyPiME6pQBbN1YX094F Wn8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=FepzkaUny1TMP9rbKEDQJ6fxX2M1mwzgyOVbBDAfMOA=; b=kmPiuw6c5mRtA2QugNP2/UQCmES8nBDg30WhAW5GM0UcslsYxfrfxXhWWl3NE0ntWf 2c4BjOGaaT2ILKOjRtLE2DULxQTdXhEdhpS03AQDmztWV6um8yCafmRr0jHgbDn2rGxh 0MdgQIlx/8uok4SMvkJG5DACyJeKrFeqmMAfaa1yXqBZLRsNEm1tz6hV2ssSAYXr7zdw j1tMn2YHAMO+T6rytZDdKH1+D7n66XO8P/dtT8/fPJ1yQMa4vXxUcfwpmxcjRH7f4JOf ma9q6S6UB45YahpBFVLH+LHJ/5XQorzHepP9Etpgn461JNt07sh8bsjnrwRtUKfWUIfF 3hwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="pmB/i3jq"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q30-v6si5928575pgk.253.2018.07.19.05.14.09; Thu, 19 Jul 2018 05:14:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="pmB/i3jq"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730470AbeGSM42 (ORCPT + 99 others); Thu, 19 Jul 2018 08:56:28 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:44728 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727489AbeGSM42 (ORCPT ); Thu, 19 Jul 2018 08:56:28 -0400 Received: from avalon.localnet (unknown [IPv6:2a02:587:8041:9d00:717d:d1d9:bcc8:c702]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 499D2B7F; Thu, 19 Jul 2018 14:13:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1532002414; bh=0aW5VaLGXiiIMBeMvMHJoKT5pvIlsJjj3CjhPc2HX+o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pmB/i3jqAmCQCEdkB3lvnYTEAS8yriN5gftVPp2Hlkj5oVTOwYsOOOndCr3OUaVGT sZk3vmHMTTV+FU5ZITtxeICA4WrYGgheZfxmU2vevE86ZuFJgrTKLg8TPab9mzLslv TGwUCab3tYsyoMhOEnb+020H1xUSAbczzgU5fHIE= From: Laurent Pinchart To: Wolfram Sang Cc: jacopo mondi , Akinobu Mita , linux-media@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown , Peter Rosin , Sebastian Reichel , Sylwester Nawrocki , Jacopo Mondi , Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab Subject: Re: [PATCH -next v4 2/3] media: ov772x: use SCCB regmap Date: Thu, 19 Jul 2018 15:14:06 +0300 Message-ID: <2173334.CLADOdgFxd@avalon> Organization: Ideas on Board Oy In-Reply-To: <20180719084208.4zdwt4vzcop4hve7@ninjato> References: <1531756070-8560-1-git-send-email-akinobu.mita@gmail.com> <20180719074736.GA6784@w540> <20180719084208.4zdwt4vzcop4hve7@ninjato> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday, 19 July 2018 11:42:08 EEST Wolfram Sang wrote: > > > -static int ov772x_mask_set(struct i2c_client *client, u8 command, u8 > > > mask, > > > - u8 set) > > > -{ > > > - s32 val = ov772x_read(client, command); > > > - > > > - if (val < 0) > > > - return val; > > > - > > > - val &= ~mask; > > > - val |= set & mask; > > > - > > > - return ov772x_write(client, command, val); > > > -} > > > - > > > > If I were you I would have kept these functions and wrapped the regmap > > operations there. This is not an issue though if you prefer it this > > way :) > > I have suggested this way. It is not a show stopper issue, but I still > like this version better. Wrapping the regmap functions minimizes the diff and makes it easier to backport the driver. -- Regards, Laurent Pinchart