From: jacopo mondi <jacopo@jmondi.org>
To: sakari.ailus@iki.fi
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Wolfram Sang <wsa@the-dreams.de>,
Akinobu Mita <akinobu.mita@gmail.com>,
linux-media@vger.kernel.org, linux-i2c@vger.kernel.org,
linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>,
Peter Rosin <peda@axentia.se>,
Sebastian Reichel <sebastian.reichel@collabora.co.uk>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
Jacopo Mondi <jacopo+renesas@jmondi.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Mauro Carvalho Chehab <mchehab@s-opensource.com>
Subject: Re: [PATCH -next v4 2/3] media: ov772x: use SCCB regmap
Date: Fri, 20 Jul 2018 09:38:20 +0200 [thread overview]
Message-ID: <20180720073820.GF6784@w540> (raw)
In-Reply-To: <20180719131019.2kolodvc4r5ewqic@lanttu.localdomain>
[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]
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 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.
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²C 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2018-07-20 7:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 15:47 [PATCH -next v4 0/3] introduce SCCB regmap Akinobu Mita
2018-07-16 15:47 ` [PATCH -next v4 1/3] regmap: add SCCB support Akinobu Mita
2018-07-18 14:47 ` Mark Brown
2018-07-18 15:28 ` Wolfram Sang
2018-07-18 15:31 ` Mark Brown
2018-07-20 21:53 ` Wolfram Sang
2018-07-23 17:02 ` Mark Brown
2018-07-20 17:41 ` Akinobu Mita
2018-07-19 12:33 ` Sebastian Reichel
2018-07-16 15:47 ` [PATCH -next v4 2/3] media: ov772x: use SCCB regmap Akinobu Mita
2018-07-18 15:36 ` Wolfram Sang
2018-07-19 7:47 ` jacopo mondi
2018-07-19 8:42 ` Wolfram Sang
2018-07-19 12:14 ` Laurent Pinchart
2018-07-19 13:10 ` sakari.ailus
2018-07-20 7:38 ` jacopo mondi [this message]
2018-07-23 15:13 ` Sakari Ailus
2018-07-16 15:47 ` [PATCH -next v4 3/3] media: ov9650: " Akinobu Mita
2018-07-18 15:36 ` Wolfram Sang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180720073820.GF6784@w540 \
--to=jacopo@jmondi.org \
--cc=akinobu.mita@gmail.com \
--cc=broonie@kernel.org \
--cc=hans.verkuil@cisco.com \
--cc=jacopo+renesas@jmondi.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@s-opensource.com \
--cc=peda@axentia.se \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@iki.fi \
--cc=sakari.ailus@linux.intel.com \
--cc=sebastian.reichel@collabora.co.uk \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.