Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2571277imm; Fri, 20 Jul 2018 00:39:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeSz+K9/95IjCKI0WrVyEmKrqHbbacuH43ecy6SJqgtYV7tfKhOxu08Ugfe8HwicU4lSayb X-Received: by 2002:a17:902:b604:: with SMTP id b4-v6mr1060449pls.18.1532072362230; Fri, 20 Jul 2018 00:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532072362; cv=none; d=google.com; s=arc-20160816; b=n6fRqUjBYymGX2AM5YJIEu2OnC5gihDwwO1oglUNUhPvqr9C6cJrToS1JUHSoLH9ci mt5qKFREt5NGZCf1t4WR7TXQTimavf460CIk5NoOaRMcKd791rkGhickNkNGGOVWVkU4 /HFZA1isBIJqYZBGqqmfzKNaJSmVjLOBTkW6kawJydFPdt5z9wGA1YOV/ElG8aXcpP1I VAlHuizeaIO8Nj9G6epFA07u8mPL6nwIN9zO1/OE1RXZE49/HIERnl2IBSmcRg+HL9VT oXHBYQ2tsdgRieGq6KhtbhkRZQGwy1ccJs51azRQFxvTaY+sKgmxa5x5OphwUHiO0tFY yxVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=K04ohEgl4eB5d5VgdykalAGVBRVdACKF5CeeYGo5fVA=; b=GC5KUowLj8BvT2Czh6JB2kLn4wenIU9fDKF/uDlef0VuR4zqjB3ramRYIj/h3Wr0ml 3NYn4JGuTBbnXocpeoEQk2oQ42lOlG9Ne1scbt+x0GVd3yGrm8xNJot4KpfdhIQ38pqN R8ub8wVdg4aSKydZ8k/qiQKcsFglJPpXf3MzvTCdqgg1BwDWkwMLwRqzrx7kBaa0YznX qsAJ29Ki4dfjfMKLO5Wf0BjB/C5TISt72BcYNFMHLJGUdi/zucN7fU5USmaOO6BeMbMN xh99RxaM3mWQbC7oJk8MWCQmvutz5qAC/WGsHQGhvEy+l+BPDPzyKitk5Ac1a8Ri3He7 BnEQ== ARC-Authentication-Results: i=1; mx.google.com; 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 a12-v6si1087402pgv.296.2018.07.20.00.39.07; Fri, 20 Jul 2018 00:39:22 -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; 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 S1727360AbeGTIZ1 (ORCPT + 99 others); Fri, 20 Jul 2018 04:25:27 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:41219 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727160AbeGTIZ1 (ORCPT ); Fri, 20 Jul 2018 04:25:27 -0400 X-Originating-IP: 2.224.242.101 Received: from w540 (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 52734240009; Fri, 20 Jul 2018 07:38:22 +0000 (UTC) Date: Fri, 20 Jul 2018 09:38:20 +0200 From: jacopo mondi To: sakari.ailus@iki.fi Cc: Laurent Pinchart , Wolfram Sang , 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 Message-ID: <20180720073820.GF6784@w540> References: <1531756070-8560-1-git-send-email-akinobu.mita@gmail.com> <20180719074736.GA6784@w540> <20180719084208.4zdwt4vzcop4hve7@ninjato> <2173334.CLADOdgFxd@avalon> <20180719131019.2kolodvc4r5ewqic@lanttu.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JSkcQAAxhB1h8DcT" Content-Disposition: inline In-Reply-To: <20180719131019.2kolodvc4r5ewqic@lanttu.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Level: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --JSkcQAAxhB1h8DcT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, On Thu, Jul 19, 2018 at 04:10:20PM +0300, sakari.ailus@iki.fi wrote: > On Thu, Jul 19, 2018 at 03:14:06PM +0300, Laurent Pinchart wrote: > > On Thursday, 19 July 2018 11:42:08 EEST Wolfram Sang wrote: > > > > > -static int ov772x_mask_set(struct i2c_client *client, u8 comman= d, u8 > > > > > mask, > > > > > - u8 set) > > > > > -{ > > > > > - s32 val =3D ov772x_read(client, command); > > > > > - > > > > > - if (val < 0) > > > > > - return val; > > > > > - > > > > > - val &=3D ~mask; > > > > > - val |=3D set & mask; > > > > > - > > > > > - return ov772x_write(client, command, val); > > > > > -} > > > > > - > > > > > > > > If I were you I would have kept these functions and wrapped the reg= map > > > > 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. This was my reasoning too, but I'm happy with the current implementation. Thanks Akinobu for handling this! > > May be, but using the regmap functions directly makes the driver cleaner. > Most drivers have some kind of wrappers around the I=C2=B2C framework (or > regmap) functions; this one is one of the few to get rid of them. > > The two could be done in a separate patch, too, albeit I think the current > one seems fine as such. > > -- > Sakari Ailus > e-mail: sakari.ailus@iki.fi --JSkcQAAxhB1h8DcT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJbUZFsAAoJEHI0Bo8WoVY8xYUP/R6e5qUtBgY0rxxzzGt6l+Gh +ANvSsmeZX0cAIzdTjTdj2DPOlDMv0enciKjO0enwDZTAXiyPU1Wn8n6XUext7s+ I7o2hsoMf1w1NIyOPAXlISvnZ0Dc8iFeNA3E0M/rck/cz/d3tUjc/7ZWX0oC4ZeZ stOKf0PRa/vjv3jQjqIEK6QnA41EP8VzKIiSh9+HMWoasiiN0FiZsPwF51nwgzsR pi/T4gS1NdYSBeN3JkmsCDcM/wjk81FuuvHLVrtj6U4zHUYwqZ+MWiC6l1AjpdCe Cx6n/To52os5R+XPJstZxUoZwDEeAYHGq0sHAZBoPYsp442t8sixH5AO9rE/sbLc DvM5VYksoiBkem4k+M6oTxMGXrIdtXRlSUWRDmpCavfJRLLtWa91FRme7l6iPJKo m6y1YxbpPkGhvj+I3lPXyuNn3jwLGgLOj/BScGMyBnG2vCzvjLnTi4bBWRwo+JQV aDQGXiyFpM5UqwVWIIuE8g+60ItT/9ap96rixrVfDsLN2yyvjUNAUi5nfJ207Ocj 9WyIkrzgKDxUn/9/R/sPUpxDRyQji2OlyCyZ3wKAyNe1EWmfl7rZkuaovpvQ5oBu LtRibGdJpVxSglX8k7fmrDfO5frFzyciZeQNr8Ny/p88ttKFZbGb5ToeWFF1WDuP iPnhbP6hx1VJv7hZ9XG4 =qXJo -----END PGP SIGNATURE----- --JSkcQAAxhB1h8DcT--