public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>, linux-media@vger.kernel.org
Subject: Re: [PATCH 3/6] media: v4l: cci: Add macros to obtain register width
Date: Fri, 10 Nov 2023 16:44:45 +0200	[thread overview]
Message-ID: <20231110144445.GC21167@pendragon.ideasonboard.com> (raw)
In-Reply-To: <ZU4RWhxbJyG-2lR2@kekkonen.localdomain>

On Fri, Nov 10, 2023 at 11:17:46AM +0000, Sakari Ailus wrote:
> Hi Hans,
> 
> Thank you for the review.
> 
> On Fri, Nov 10, 2023 at 12:14:10PM +0100, Hans de Goede wrote:
> > Hi,
> > 
> > On 11/10/23 10:47, Sakari Ailus wrote:
> > > Add CCI_REG_WIDTH() macro to obtain register width in bits and similarly,
> > > CCI_REG_WIDTH_BYTES() to obtain it in bytes.
> > > 
> > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > > ---
> > >  include/media/v4l2-cci.h | 3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/include/media/v4l2-cci.h b/include/media/v4l2-cci.h
> > > index b4ce0a46092c..80eaa7fdc606 100644
> > > --- a/include/media/v4l2-cci.h
> > > +++ b/include/media/v4l2-cci.h
> > > @@ -40,6 +40,9 @@ struct cci_reg_sequence {
> > >  #define CCI_REG_FLAG_PRIVATE_END	31U
> > >  #define CCI_REG_PRIVATE_MASK		GENMASK(CCI_REG_FLAG_PRIVATE_END, CCI_REG_FLAG_PRIVATE_START)
> > >  
> > > +#define CCI_REG_WIDTH_BYTES(x)		(((x) & CCI_REG_WIDTH_MASK) >> CCI_REG_WIDTH_SHIFT)
> > 
> > Please use FIELD_GET like v4l2-cci.c does:
> > 
> > #define CCI_REG_WIDTH_BYTES(x)		FIELD_GET(CCI_REG_WIDTH_MASK, (x))
> > 
> > With that fixed:
> > 
> > Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> > 
> > As for the patch 4 - 6, those are interesting patches but
> > I'm afraid I don't have time to review them.
> 
> No worries, I mainly included them to have a user for the newly added
> features.
> 
> I'll send v2 with FIELD_GET().

With FIELD_GET(),

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2023-11-10 17:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10  9:46 [PATCH 0/6] Use V4L2 CCI in CCS driver Sakari Ailus
2023-11-10  9:47 ` [PATCH 1/6] media: v4l: cci: Include linux/bits.h Sakari Ailus
2023-11-10 11:11   ` Hans de Goede
2023-11-10 14:44   ` Laurent Pinchart
2023-11-10  9:47 ` [PATCH 2/6] media: v4l: cci: Add driver-private bit definitions Sakari Ailus
2023-11-10 11:11   ` Hans de Goede
2023-11-10 14:44   ` Laurent Pinchart
2023-11-10 21:21     ` Sakari Ailus
2023-11-10  9:47 ` [PATCH 3/6] media: v4l: cci: Add macros to obtain register width Sakari Ailus
2023-11-10 11:14   ` Hans de Goede
2023-11-10 11:17     ` Sakari Ailus
2023-11-10 14:44       ` Laurent Pinchart [this message]
2023-11-10 14:49         ` Laurent Pinchart
2023-11-10 14:52           ` Hans de Goede
2023-11-10 21:21             ` Sakari Ailus
2023-11-10  9:47 ` [PATCH 4/6] media: ccs: Generate V4L2 CCI compliant register definitions Sakari Ailus
2023-11-10  9:47 ` [PATCH 5/6] media: ccs: Better separate CCS static data access Sakari Ailus
2023-11-10 14:46   ` Laurent Pinchart
2023-11-10 21:24     ` Sakari Ailus
2023-11-10  9:47 ` [PATCH 6/6] media: ccs: Use V4L2 CCI for accessing sensor registers Sakari Ailus
2023-11-10 15:21   ` Laurent Pinchart
2023-11-10 21:38     ` Sakari Ailus
2023-11-10 22:53       ` Laurent Pinchart
2023-11-10 23:03         ` Sakari Ailus

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=20231110144445.GC21167@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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