From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Hans de Goede <hdegoede@redhat.com>,
linux-media@vger.kernel.org,
Alain Volmat <alain.volmat@foss.st.com>,
stable@vger.kernel.org
Subject: Re: [PATCH v2 2/2] media: i2c: imx290: Properly encode registers as little-endian
Date: Thu, 2 Nov 2023 03:23:59 +0200 [thread overview]
Message-ID: <20231102012359.GD5933@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20231101122354.270453-3-alexander.stein@ew.tq-group.com>
Hi Alexander,
Thank you for the patch.
On Wed, Nov 01, 2023 at 01:23:54PM +0100, Alexander Stein wrote:
> The conversion to CCI also converted the multi-byte register access to
> big-endian. Correct the register definition by using the correct
> little-endian ones.
>
> Fixes: af73323b97702 ("media: imx290: Convert to new CCI register access helpers")
> Cc: stable@vger.kernel.org
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/i2c/imx290.c | 42 +++++++++++++++++++-------------------
> 1 file changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c
> index 29098612813cb..c6fea5837a19f 100644
> --- a/drivers/media/i2c/imx290.c
> +++ b/drivers/media/i2c/imx290.c
> @@ -41,18 +41,18 @@
> #define IMX290_WINMODE_720P (1 << 4)
> #define IMX290_WINMODE_CROP (4 << 4)
> #define IMX290_FR_FDG_SEL CCI_REG8(0x3009)
> -#define IMX290_BLKLEVEL CCI_REG16(0x300a)
> +#define IMX290_BLKLEVEL CCI_REG16_LE(0x300a)
> #define IMX290_GAIN CCI_REG8(0x3014)
> -#define IMX290_VMAX CCI_REG24(0x3018)
> +#define IMX290_VMAX CCI_REG24_LE(0x3018)
> #define IMX290_VMAX_MAX 0x3ffff
> -#define IMX290_HMAX CCI_REG16(0x301c)
> +#define IMX290_HMAX CCI_REG16_LE(0x301c)
> #define IMX290_HMAX_MAX 0xffff
> -#define IMX290_SHS1 CCI_REG24(0x3020)
> +#define IMX290_SHS1 CCI_REG24_LE(0x3020)
> #define IMX290_WINWV_OB CCI_REG8(0x303a)
> -#define IMX290_WINPV CCI_REG16(0x303c)
> -#define IMX290_WINWV CCI_REG16(0x303e)
> -#define IMX290_WINPH CCI_REG16(0x3040)
> -#define IMX290_WINWH CCI_REG16(0x3042)
> +#define IMX290_WINPV CCI_REG16_LE(0x303c)
> +#define IMX290_WINWV CCI_REG16_LE(0x303e)
> +#define IMX290_WINPH CCI_REG16_LE(0x3040)
> +#define IMX290_WINWH CCI_REG16_LE(0x3042)
> #define IMX290_OUT_CTRL CCI_REG8(0x3046)
> #define IMX290_ODBIT_10BIT (0 << 0)
> #define IMX290_ODBIT_12BIT (1 << 0)
> @@ -78,28 +78,28 @@
> #define IMX290_ADBIT2 CCI_REG8(0x317c)
> #define IMX290_ADBIT2_10BIT 0x12
> #define IMX290_ADBIT2_12BIT 0x00
> -#define IMX290_CHIP_ID CCI_REG16(0x319a)
> +#define IMX290_CHIP_ID CCI_REG16_LE(0x319a)
> #define IMX290_ADBIT3 CCI_REG8(0x31ec)
> #define IMX290_ADBIT3_10BIT 0x37
> #define IMX290_ADBIT3_12BIT 0x0e
> #define IMX290_REPETITION CCI_REG8(0x3405)
> #define IMX290_PHY_LANE_NUM CCI_REG8(0x3407)
> #define IMX290_OPB_SIZE_V CCI_REG8(0x3414)
> -#define IMX290_Y_OUT_SIZE CCI_REG16(0x3418)
> -#define IMX290_CSI_DT_FMT CCI_REG16(0x3441)
> +#define IMX290_Y_OUT_SIZE CCI_REG16_LE(0x3418)
> +#define IMX290_CSI_DT_FMT CCI_REG16_LE(0x3441)
> #define IMX290_CSI_DT_FMT_RAW10 0x0a0a
> #define IMX290_CSI_DT_FMT_RAW12 0x0c0c
> #define IMX290_CSI_LANE_MODE CCI_REG8(0x3443)
> -#define IMX290_EXTCK_FREQ CCI_REG16(0x3444)
> -#define IMX290_TCLKPOST CCI_REG16(0x3446)
> -#define IMX290_THSZERO CCI_REG16(0x3448)
> -#define IMX290_THSPREPARE CCI_REG16(0x344a)
> -#define IMX290_TCLKTRAIL CCI_REG16(0x344c)
> -#define IMX290_THSTRAIL CCI_REG16(0x344e)
> -#define IMX290_TCLKZERO CCI_REG16(0x3450)
> -#define IMX290_TCLKPREPARE CCI_REG16(0x3452)
> -#define IMX290_TLPX CCI_REG16(0x3454)
> -#define IMX290_X_OUT_SIZE CCI_REG16(0x3472)
> +#define IMX290_EXTCK_FREQ CCI_REG16_LE(0x3444)
> +#define IMX290_TCLKPOST CCI_REG16_LE(0x3446)
> +#define IMX290_THSZERO CCI_REG16_LE(0x3448)
> +#define IMX290_THSPREPARE CCI_REG16_LE(0x344a)
> +#define IMX290_TCLKTRAIL CCI_REG16_LE(0x344c)
> +#define IMX290_THSTRAIL CCI_REG16_LE(0x344e)
> +#define IMX290_TCLKZERO CCI_REG16_LE(0x3450)
> +#define IMX290_TCLKPREPARE CCI_REG16_LE(0x3452)
> +#define IMX290_TLPX CCI_REG16_LE(0x3454)
> +#define IMX290_X_OUT_SIZE CCI_REG16_LE(0x3472)
> #define IMX290_INCKSEL7 CCI_REG8(0x3480)
>
> #define IMX290_PGCTRL_REGEN BIT(0)
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-11-02 1:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 12:23 [PATCH v2 0/2] v4l2-cci: little-endian registers Alexander Stein
2023-11-01 12:23 ` [PATCH v2 1/2] media: v4l2-cci: Add support for little-endian encoded registers Alexander Stein
2023-11-02 1:22 ` Laurent Pinchart
2023-11-02 6:30 ` Sakari Ailus
2023-11-02 7:51 ` Alexander Stein
2023-11-02 8:25 ` Sakari Ailus
2023-11-02 9:27 ` Hans de Goede
2023-11-02 9:56 ` Sakari Ailus
2023-11-02 9:58 ` Sakari Ailus
2023-11-02 7:55 ` Alexander Stein
2023-11-02 8:24 ` Laurent Pinchart
2023-11-02 8:31 ` Sakari Ailus
2023-11-02 8:33 ` Sakari Ailus
2023-11-01 12:23 ` [PATCH v2 2/2] media: i2c: imx290: Properly encode registers as little-endian Alexander Stein
2023-11-02 1:23 ` Laurent Pinchart [this message]
2023-11-01 15:26 ` [PATCH v2 0/2] v4l2-cci: little-endian registers Hans de Goede
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=20231102012359.GD5933@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=alain.volmat@foss.st.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=hdegoede@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stable@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 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.