Linux Media Controller development
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, hdegoede@redhat.com
Subject: Re: [PATCH v2 2/6] media: v4l: cci: Add driver-private bit definitions
Date: Mon, 13 Nov 2023 13:56:31 +0000	[thread overview]
Message-ID: <ZVIrDw5x2VB06VlQ@kekkonen.localdomain> (raw)
In-Reply-To: <20231113135400.GF24338@pendragon.ideasonboard.com>

Hi Laurent,

On Mon, Nov 13, 2023 at 03:54:00PM +0200, Laurent Pinchart wrote:
> On Mon, Nov 13, 2023 at 03:53:22PM +0200, Laurent Pinchart wrote:
> > On Mon, Nov 13, 2023 at 03:44:54PM +0200, Sakari Ailus wrote:
> > > Provide a few bits for drivers to store private information on register
> > > definitions.
> > > 
> > > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > > Reviewed-by: Hans de Goede <hdegoede@redhat.com>
> > > ---
> > >  include/media/v4l2-cci.h | 5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > diff --git a/include/media/v4l2-cci.h b/include/media/v4l2-cci.h
> > > index f2c2962e936b..ee469f03e440 100644
> > > --- a/include/media/v4l2-cci.h
> > > +++ b/include/media/v4l2-cci.h
> > > @@ -33,6 +33,11 @@ struct cci_reg_sequence {
> > >  #define CCI_REG_ADDR_MASK		GENMASK(15, 0)
> > >  #define CCI_REG_WIDTH_SHIFT		16
> > >  #define CCI_REG_WIDTH_MASK		GENMASK(19, 16)
> > 
> > Should these be unsigned too for consistency ?
> > 
> > > +/*
> > > + * Private CCI register flags, for the use of drivers.
> > > + */
> > > +#define CCI_REG_PRIVATE_SHIFT		28U
> > > +#define CCI_REG_PRIVATE_MASK		GENMASK(31U, CCI_REG_PRIVATE_SHIFT)
> 
> And actually, for consistency again, I would write
> 
> #define CCI_REG_PRIVATE_MASK		GENMASK(31U, 28U)

I would prefer to use the macro instead.

I can post a patch doing that for the older definitions, too.

It's not urgent though. I'll wait for the endianness patches to get merged.

-- 
Regards,

Sakari Ailus

  reply	other threads:[~2023-11-13 13:56 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 13:44 [PATCH v2 0/6] Use V4L2 CCI in CCS driver Sakari Ailus
2023-11-13 13:44 ` [PATCH v2 1/6] media: v4l: cci: Include linux/bits.h Sakari Ailus
2023-11-13 13:44 ` [PATCH v2 2/6] media: v4l: cci: Add driver-private bit definitions Sakari Ailus
2023-11-13 13:53   ` Laurent Pinchart
2023-11-13 13:54     ` Laurent Pinchart
2023-11-13 13:56       ` Sakari Ailus [this message]
2023-11-13 13:54     ` Sakari Ailus
2023-11-13 13:44 ` [PATCH v2 3/6] media: v4l: cci: Add macros to obtain register width and address Sakari Ailus
2023-11-13 13:44 ` [PATCH v2 4/6] media: ccs: Generate V4L2 CCI compliant register definitions Sakari Ailus
2023-11-13 13:44 ` [PATCH v2 5/6] media: ccs: Better separate CCS static data access Sakari Ailus
2023-11-13 13:57   ` Laurent Pinchart
2023-11-13 14:08     ` Sakari Ailus
2023-11-13 14:16       ` Laurent Pinchart
2023-11-13 16:00         ` Sakari Ailus
2023-11-13 13:44 ` [PATCH v2 6/6] media: ccs: Use V4L2 CCI for accessing sensor registers 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=ZVIrDw5x2VB06VlQ@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /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