From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
linux-media@vger.kernel.org, linux-i2c@vger.kernel.org,
Sebastian Reichel <sebastian.reichel@collabora.co.uk>,
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: [RFC PATCH v2] media: i2c: add SCCB helpers
Date: Sat, 16 Jun 2018 02:13:51 +0300 [thread overview]
Message-ID: <2528868.S4lOAQh8Yk@avalon> (raw)
In-Reply-To: <20180614153357.vgz4umv2aqudghm3@ninjato>
Hello,
On Thursday, 14 June 2018 18:33:58 EEST Wolfram Sang wrote:
> On Wed, Jun 13, 2018 at 12:34:46AM +0900, Akinobu Mita wrote:
> > (This is 2nd version of SCCB helpers patch. After 1st version was
> > submitted, I sent alternative patch titled "i2c: add I2C_M_FORCE_STOP".
> > But it wasn't accepted because it makes the I2C core code unreadable.
> > I couldn't find out a way to untangle it, so I returned to the original
> > approach.)
> >
> > This adds Serial Camera Control Bus (SCCB) helper functions
> > (sccb_read_byte and sccb_write_byte) that are intended to be used by some
> > of Omnivision sensor drivers.
> >
> > The ov772x driver is going to use these functions in order to make it work
> > with most i2c controllers.
> >
> > As the ov772x device doesn't support repeated starts, this driver
> > currently requires I2C_FUNC_PROTOCOL_MANGLING that is not supported by
> > many i2c controller drivers.
> >
> > With the sccb_read_byte() that issues two separated requests in order to
> > avoid repeated start, the driver doesn't require
> > I2C_FUNC_PROTOCOL_MANGLING.
>
> From a first glance, this looks like my preferred solution so far.
> Thanks for doing it! Let me sleep a bit over it for a thorough review...
>
> > --- /dev/null
> > +++ b/drivers/media/i2c/sccb.h
>
> I'd prefer this file to be in the i2c realm. Maybe
> 'include/linux/i2c-sccb.h" or something. I will come back to this.
And while at it, I think we also need a .c file, the functions (and especially
sccb_read_byte()) should not be static inline.
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2018-06-15 23:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-12 15:34 [RFC PATCH v2] media: i2c: add SCCB helpers Akinobu Mita
2018-06-12 16:28 ` Sebastian Reichel
2018-06-12 17:31 ` Peter Rosin
2018-06-13 9:10 ` Peter Rosin
2018-06-14 15:41 ` Wolfram Sang
2018-06-15 4:39 ` Peter Rosin
2018-06-15 5:08 ` Wolfram Sang
2018-06-14 15:33 ` Wolfram Sang
2018-06-15 23:13 ` Laurent Pinchart [this message]
2018-06-19 2:55 ` 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=2528868.S4lOAQh8Yk@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=akinobu.mita@gmail.com \
--cc=hans.verkuil@cisco.com \
--cc=jacopo+renesas@jmondi.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@s-opensource.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox