Re: [PATCH v2 08/11] media: i2c: max9286: Define macros for all bits of register 0x15

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sergey,

On Mon, Jan 10, 2022 at 01:37:51PM +0300, Sergey Shtylyov wrote:
> Hello!
> 
> On 1/10/22 2:21 AM, Laurent Pinchart wrote:
> 
> >>> Macros are easier to read than numerical values.
> >>>
> >>> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
> >>> ---
> >>>  drivers/media/i2c/max9286.c | 27 ++++++++++++++++++---------
> >>>  1 file changed, 18 insertions(+), 9 deletions(-)
> >>>
> >>> diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
> >>> index 24c2bf4fda53..4b69bd036ca6 100644
> >>> --- a/drivers/media/i2c/max9286.c
> >>> +++ b/drivers/media/i2c/max9286.c
> [...]
> >>> @@ -810,13 +815,17 @@ static int max9286_s_stream(struct v4l2_subdev *sd, int enable)
> >>>  		}
> >>>
> >>>  		/*
> >>> -		 * Enable CSI output, VC set according to link number.
> >>> -		 * Bit 7 must be set (chip manual says it's 0 and reserved).
> >>> +		 * Configure the CSI-2 output to line interleaved mode (W x (N
> >>> +		 * x H), as opposed to the (N x W) x H mode that outputs the
> >>> +		 * images stitched side-by-side) and enable it.
> >>>  		 */
> >>> -		max9286_write(priv, 0x15, 0x80 | MAX9286_VCTYPE |
> >>> -			      MAX9286_CSIOUTEN | MAX9286_0X15_RESV);
> >>> +		max9286_write(priv, 0x15, MAX9286_CSI_IMAGE_TYP | MAX9286_VCTYPE |
> >>> +			      MAX9286_CSIOUTEN | MAX9286_EN_CCBSYB_CLK_STR |
> >>> +			      MAX9286_EN_GPI_CCBSYB);
> >>>  	} else {
> >>> -		max9286_write(priv, 0x15, MAX9286_VCTYPE | MAX9286_0X15_RESV);
> >>> +		max9286_write(priv, 0x15, MAX9286_VCTYPE |
> >>> +			      MAX9286_EN_CCBSYB_CLK_STR |
> >>> +			      MAX9286_EN_GPI_CCBSYB);
> >>
> >> Probably fits better on two lines only.
> > 
> > That would be over the 80 columns limit, which is a soft limit now, but
> > still often requested by reviewers (including myself in quite a few
> > cases :-)).
> 
>     The new limit is 100 columns, not 80. :-)

That's the new hard limit, yes :-) I do occasionally write lines wider
than 80 columns and am often asked to change that. In this specific case
it doesn't matter much to me, I'll happily pick whatever option
reviewers will want to give me a Reviewed-by as both are equally
readable for me.

> [...]

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux