[PATCH] ARM: dts: qcom: msm8926-motorola-peregrine: Add accelerometer, magnetometer, regulator

2024-06-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add the accelerometer, magnetometer and regulator that are present on the Motorola Moto G 4G (2013) device. While at it, update framebuffer supplies and temperature sensor. Signed-off-by: André Apitzsch --- .../dts/qcom/qcom-msm8926-motorola-peregrine.dts | 121

[PATCH v2 0/3] ARM: dts: qcom: msm8926-motorola-peregrine: Update device tree of Motorola Moto G 4G (2013)

2024-06-17 Thread André Apitzsch via B4 Relay
Add accelerometer, magnetometer, regulator and temperature sensor alert interrupt and update framebuffer supplies. Signed-off-by: André Apitzsch --- Changes in v2: - Split commit into three commits - Link to v1: https://lore.kernel.org/r/20240616-peregrine-v1-1-85d14ae1a...@apitzsch.eu --- Andr

[PATCH v2 2/3] ARM: dts: qcom: msm8926-motorola-peregrine: Update temperature sensor

2024-06-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add alert interrupt for the temperature sensor of Motorola Moto G 4G (2013), although not used by the driver yet. Signed-off-by: André Apitzsch --- arch/arm/boot/dts/qcom/qcom-msm8926-motorola-peregrine.dts | 12 1 file changed, 12 insertions(+) diff --git a/

[PATCH v2 1/3] ARM: dts: qcom: msm8926-motorola-peregrine: Add accelerometer, magnetometer, regulator

2024-06-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add the accelerometer, magnetometer and regulator that are present on the Motorola Moto G 4G (2013) device. Signed-off-by: André Apitzsch --- .../dts/qcom/qcom-msm8926-motorola-peregrine.dts | 85 ++ 1 file changed, 85 insertions(+) diff --git a/arch

[PATCH v2 3/3] ARM: dts: qcom: msm8926-motorola-peregrine: Add framebuffer supplies

2024-06-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add regulators used by the framebuffer of Motorola Moto G 4G (2013). Signed-off-by: André Apitzsch --- .../dts/qcom/qcom-msm8926-motorola-peregrine.dts | 24 ++ 1 file changed, 24 insertions(+) diff --git a/arch/arm/boot/dts/qcom/qcom-msm8926-motorol

[PATCH] Revert "arm64: dts: qcom: msm8939-longcheer-l9100: Add rear flash"

2024-08-30 Thread André Apitzsch via B4 Relay
From: André Apitzsch Patch "arm64: dts: qcom: msm8939-longcheer-l9100: Add rear flash" has been applied twice. This reverts the older version of the patch. Revert the commit f98bdb21cfc9 ("arm64: dts: qcom: msm8939-longcheer-l9100: Add rear flash") Fixes: f98bdb21cfc9 ("arm64: dts: qcom: msm893

[PATCH 03/13] media: i2c: imx214: Simplify with dev_err_probe()

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Error handling in probe() can be a bit simpler with dev_err_probe(). Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 52 -- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/drivers/media/i2c/imx214.c

[PATCH 02/13] media: i2c: imx214: Remove unneeded goto

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Simplify the imx214_start_streaming() by removing unneeded goto statements, and the corresponding error label. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/media/i2c/i

[PATCH 01/13] media: i2c: imx214: Use subdev active state

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Port the imx214 sensor driver to use the subdev active state. Move all the format configuration to the subdevice state and simplify the format handling, locking and initialization. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 129 +---

[PATCH 00/13] media: i2c: imx214: Miscellaneous cleanups and improvements

2024-09-02 Thread André Apitzsch via B4 Relay
This patch series is a collection of miscellaneous cleanups and improvements to the imx214 driver. The series converts the driver to the CCI helpers and adds controls needed to make the driver work with libcamera. The changes are inspired by the imx219 driver. Signed-off-by: André Apitzsch ---

[PATCH 07/13] media: i2c: imx214: Use number of lanes from device tree

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 camera is capable of either two-lane or four-lane operation. Currently only the four-lane mode is supported, as proper pixel rates and link frequences for the two-lane mode are unknown. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 37 +

[PATCH 08/13] media: i2c: imx214: Add vblank and hblank controls

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add vblank control to allow changing the framerate / higher exposure values. The vblank and hblank controls are needed for libcamera support. While at it, fix the minimal exposure time according to the datasheet. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214

[PATCH 05/13] media: i2c: imx214: Replace register addresses with macros

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Define macros for all the known registers used in the register arrays, and use them to replace the numerical addresses. This improves readability. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 407 ++--- 1 file chang

[PATCH 04/13] media: i2c: imx214: Convert to CCI register access helpers

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Use the new common CCI register access helpers to replace the private register access helpers in the imx214 driver. This simplifies the driver by reducing the amount of code. Signed-off-by: André Apitzsch --- drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/imx214.c |

[PATCH 10/13] media: i2c: imx214: Implement vflip/hflip controls

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports horizontal and vertical flipping. Add appropriate controls to the driver. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 73 +- 1 file changed, 65 insertions(+), 8 deletions(-) diff --g

[PATCH 11/13] media: i2c: imx214: Add analogue/digital gain control

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports analogue gain up to 8x and digital gain up to 16x. Implement the corresponding controls in the driver. Default gain values are not modified by this patch. Signed-off-by: André Apitzsch --- With the analogue gain control added by this patch, the

[PATCH 06/13] media: i2c: imx214: Drop IMX214_REG_EXPOSURE from mode reg arrays

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch The IMX214_REG_EXPOSURE is configured twice, once with a hardcoded value in the mode_ registers arrays, and once via v4l2_ctrl_ops. The latter is enough, drop the former. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 2 -- 1 file changed, 2 deletions(-) d

[PATCH 12/13] media: i2c: imx214: Verify chip ID

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Check the chip ID and stop probing if it is no imx214 sensor. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c index ce6d8

[PATCH 13/13] media: i2c: imx214: Add test pattern control

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch This adds V4L2_CID_TEST_PATTERN control support. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 77 -- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/

[PATCH 09/13] media: i2c: imx214: Extract format and crop settings

2024-09-02 Thread André Apitzsch via B4 Relay
From: André Apitzsch Remove format and crop settings from register sequences and set them programmatically. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 137 ++--- 1 file changed, 105 insertions(+), 32 deletions(-) diff --git a/drivers

[PATCH v2 04/13] media: i2c: imx214: Convert to CCI register access helpers

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Use the new common CCI register access helpers to replace the private register access helpers in the imx214 driver. This simplifies the driver by reducing the amount of code. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/Kconfig | 1 + d

[PATCH v2 06/13] media: i2c: imx214: Drop IMX214_REG_EXPOSURE from mode reg arrays

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The IMX214_REG_EXPOSURE is configured twice, once with a hardcoded value in the mode_ registers arrays, and once via v4l2_ctrl_ops. The latter is enough, drop the former. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 2 -- 1 file

[PATCH v2 09/13] media: i2c: imx214: Extract format and crop settings

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Remove format and crop settings from register sequences and set them programmatically. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 129 ++--- 1 file changed, 97 insertions(+), 32 deletions(-) diff --git a/drivers/

[PATCH v2 03/13] media: i2c: imx214: Simplify with dev_err_probe()

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Error handling in probe() can be a bit simpler with dev_err_probe(). Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 52 -- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a

[PATCH v2 02/13] media: i2c: imx214: Use subdev active state

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Port the imx214 sensor driver to use the subdev active state. Move all the format configuration to the subdevice state and simplify the format handling, locking and initialization. While at it, simplify imx214_start_streaming() by removing unneeded goto statements and the c

[PATCH v2 13/13] media: i2c: imx214: Add test pattern control

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch This adds V4L2_CID_TEST_PATTERN control support. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 77 -- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/im

[PATCH v2 10/13] media: i2c: imx214: Implement vflip/hflip controls

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports horizontal and vertical flipping. Add appropriate controls to the driver. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 69 -- 1 file changed, 61 insertions(+), 8 deletions(-) diff --g

[PATCH v2 01/13] media: i2c: imx214: Fix link frequency

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The driver defines IMX214_DEFAULT_LINK_FREQ 48000, and then IMX214_DEFAULT_PIXEL_RATE ((IMX214_DEFAULT_LINK_FREQ * 8LL) / 10), which works out as 384MPix/s. (The 8 is 4 lanes and DDR.) Parsing the PLL registers with the defined 24MHz input. We're in single PLL mode, so M

[PATCH v2 00/13] media: i2c: imx214: Miscellaneous cleanups and improvements

2024-10-20 Thread André Apitzsch via B4 Relay
This patch series is a collection of miscellaneous cleanups and improvements to the imx214 driver. The series converts the driver to the CCI helpers and adds controls needed to make the driver work with libcamera. The changes are inspired by the imx219 driver. Signed-off-by: André Apitzsch ---

[PATCH v2 05/13] media: i2c: imx214: Replace register addresses with macros

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Define macros for all the known registers used in the register arrays, and use them to replace the numerical addresses. This improves readability. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 407 ++--

[PATCH v2 12/13] media: i2c: imx214: Verify chip ID

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Check the chip ID and stop probing if it is no imx214 sensor. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/media/i2c/imx214.c b/drivers/med

[PATCH v2 07/13] media: i2c: imx214: Check number of lanes from device tree

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 camera is capable of either two-lane or four-lane operation. Currently only the four-lane mode is supported, as proper pixel rates and link frequences for the two-lane mode are unknown. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 26 +

[PATCH v2 08/13] media: i2c: imx214: Add vblank and hblank controls

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add vblank control to allow changing the framerate / higher exposure values. The vblank and hblank controls are needed for libcamera support. While at it, fix the minimal exposure time according to the datasheet. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214

[PATCH v2 11/13] media: i2c: imx214: Add analogue/digital gain control

2024-10-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports analogue gain up to 8x and digital gain up to 16x. Implement the corresponding controls in the driver. Default gain values are not modified by this patch. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 5

[PATCH v3 01/12] media: i2c: imx214: Use subdev active state

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch Port the imx214 sensor driver to use the subdev active state. Move all the format configuration to the subdevice state and simplify the format handling, locking and initialization. While at it, simplify imx214_start_streaming() by removing unneeded goto statements and the c

[PATCH v3 09/12] media: i2c: imx214: Add analogue/digital gain control

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports analogue gain up to 8x and digital gain up to 16x. Implement the corresponding controls in the driver. Default gain values are not modified by this patch. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 5

[PATCH v3 03/12] media: i2c: imx214: Convert to CCI register access helpers

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch Use the new common CCI register access helpers to replace the private register access helpers in the imx214 driver. This simplifies the driver by reducing the amount of code. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/Kconfig | 1 + d

[PATCH v3 02/12] media: i2c: imx214: Simplify with dev_err_probe()

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch Error handling in probe() can be a bit simpler with dev_err_probe(). Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 52 -- 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a

[PATCH v3 06/12] media: i2c: imx214: Check number of lanes from device tree

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 camera is capable of either two-lane or four-lane operation. Currently only the four-lane mode is supported, as proper pixel rates and link frequences for the two-lane mode are unknown. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 16 +

[PATCH v3 11/12] media: i2c: imx214: Add test pattern control

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch This adds V4L2_CID_TEST_PATTERN control support. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 77 -- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/im

[PATCH v3 04/12] media: i2c: imx214: Replace register addresses with macros

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch Define macros for all the known registers used in the register arrays, and use them to replace the numerical addresses. This improves readability. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 407 ++--

[PATCH v3 05/12] media: i2c: imx214: Drop IMX214_REG_EXPOSURE from mode reg arrays

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch The IMX214_REG_EXPOSURE is configured twice, once with a hardcoded value in the mode_ registers arrays, and once via v4l2_ctrl_ops. The latter is enough, drop the former. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 2 -- 1 file

[PATCH v3 07/12] media: i2c: imx214: Add vblank and hblank controls

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add vblank control to allow changing the framerate / higher exposure values. The vblank and hblank controls are needed for libcamera support. While at it, fix the minimal exposure time according to the datasheet. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214

[PATCH v3 10/12] media: i2c: imx214: Verify chip ID

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch Check the chip ID and stop probing if it is no imx214 sensor. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/media/i2c/imx214.c b/drivers/med

[PATCH v3 00/12] media: i2c: imx214: Miscellaneous cleanups and improvements

2024-12-07 Thread André Apitzsch via B4 Relay
This patch series is a collection of miscellaneous cleanups and improvements to the imx214 driver. The series converts the driver to the CCI helpers and adds controls needed to make the driver work with libcamera. The changes are inspired by the imx219 driver. Signed-off-by: André Apitzsch ---

[PATCH v3 08/12] media: i2c: imx214: Implement vflip/hflip controls

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports horizontal and vertical flipping. Add appropriate controls to the driver. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 69 -- 1 file changed, 61 insertions(+

[PATCH v3 12/12] media: i2c: imx214: Fix link frequency

2024-12-07 Thread André Apitzsch via B4 Relay
From: André Apitzsch The driver defines IMX214_DEFAULT_LINK_FREQ 48000, and then IMX214_DEFAULT_PIXEL_RATE ((IMX214_DEFAULT_LINK_FREQ * 8LL) / 10), which works out as 384MPix/s. (The 8 is 4 lanes and DDR.) Parsing the PLL registers with the defined 24MHz input. We're in single PLL mode, so M

[PATCH v3 0/2] media: i2c: dw9719: Add device tree bindings for the VCM

2025-02-09 Thread André Apitzsch via B4 Relay
Document the Dongwoon DW9719 and DW9761 dt-bindings and add the related of_match table. Signed-off-by: André Apitzsch --- Changes in v3: - Add patch to document devicetree bindings - Add "i2c:" to the subject of the 'Add of_match table' commit message - Link to v2: https://lore.kernel.org/r/2025

[PATCH v3 2/2] media: i2c: dw9719: Add of_match table

2025-02-09 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add of_match table for "dongwoon,dw9719" and "dongwoon,dw9761" compatible string. This fixes automatic driver loading when using a device-tree, and if built as a module like major linux distributions do. Signed-off-by: André Apitzsch --- drivers/media/i2c/dw9719.c | 8

[PATCH v3 1/2] dt-bindings: media: i2c: Add DW9719 and DW9761 VCM

2025-02-09 Thread André Apitzsch via B4 Relay
From: André Apitzsch Document Dongwoon DW9719 and DW9761 VCM devicetree bindings. Signed-off-by: André Apitzsch --- .../bindings/media/i2c/dongwoon,dw9719.yaml| 45 ++ 1 file changed, 45 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/dongwoo

[PATCH v4 03/13] media: i2c: imx214: Convert to CCI register access helpers

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch Use the new common CCI register access helpers to replace the private register access helpers in the imx214 driver. This simplifies the driver by reducing the amount of code. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/Kconfig | 1 + d

[PATCH v4 02/13] media: i2c: imx214: Simplify with dev_err_probe()

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch Error handling in probe() can be a bit simpler with dev_err_probe(). Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 54 +- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a

[PATCH v4 07/13] media: i2c: imx214: Add vblank and hblank controls

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add vblank control to allow changing the framerate / higher exposure values. The vblank and hblank controls are needed for libcamera support. While at it, fix the minimal exposure time according to the datasheet. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214

[PATCH v4 04/13] media: i2c: imx214: Replace register addresses with macros

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch Define macros for all the known registers used in the register arrays, and use them to replace the numerical addresses. This improves readability. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 407 ++--

[PATCH v4 08/13] media: i2c: imx214: Implement vflip/hflip controls

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports horizontal and vertical flipping. Add appropriate controls to the driver. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 69 -- 1 file changed, 61 insertions(+

[PATCH v4 12/13] media: i2c: imx214: Fix clock handling on probe error or remove

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch The driver should disable or unprepare the clock on probe error and on removing the module. Remove regulator_bulk_disable(), because it is called by imx214_power_off(). Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH v4 13/13] media: i2c: imx214: Fix link frequency validation

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch The driver defines IMX214_DEFAULT_LINK_FREQ 48000, and then IMX214_DEFAULT_PIXEL_RATE ((IMX214_DEFAULT_LINK_FREQ * 8LL) / 10), which works out as 384MPix/s. (The 8 is 4 lanes and DDR.) Parsing the PLL registers with the defined 24MHz input. We're in single PLL mode, so M

[PATCH v4 10/13] media: i2c: imx214: Verify chip ID

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch Check the chip ID and stop probing if it is no imx214 sensor. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/media/i2c/imx214.c b/drivers/med

[PATCH v4 05/13] media: i2c: imx214: Drop IMX214_REG_EXPOSURE from mode reg arrays

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch The IMX214_REG_EXPOSURE is configured twice, once with a hardcoded value in the mode_ registers arrays, and once via v4l2_ctrl_ops. The latter is enough, drop the former. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 2 -- 1 file

[PATCH v4 01/13] media: i2c: imx214: Use subdev active state

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch Port the imx214 sensor driver to use the subdev active state. Move all the format configuration to the subdevice state and simplify the format handling, locking and initialization. While at it, simplify imx214_start_streaming() by removing unneeded goto statements and the c

[PATCH v4 00/13] media: i2c: imx214: Miscellaneous cleanups and improvements

2024-12-16 Thread André Apitzsch via B4 Relay
This patch series is a collection of miscellaneous cleanups and improvements to the imx214 driver. The series converts the driver to the CCI helpers and adds controls needed to make the driver work with libcamera. The changes are inspired by the imx219 driver. Signed-off-by: André Apitzsch ---

[PATCH v4 06/13] media: i2c: imx214: Check number of lanes from device tree

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 camera is capable of either two-lane or four-lane operation. Currently only the four-lane mode is supported, as proper pixel rates and link frequences for the two-lane mode are unknown. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/

[PATCH v4 11/13] media: i2c: imx214: Add test pattern control

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch This adds V4L2_CID_TEST_PATTERN control support. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 77 -- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/im

[PATCH v4 09/13] media: i2c: imx214: Add analogue/digital gain control

2024-12-16 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports analogue gain up to 8x and digital gain up to 16x. Implement the corresponding controls in the driver. Default gain values are not modified by this patch. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 5

[PATCH v5 01/13] media: i2c: imx214: Use subdev active state

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Port the imx214 sensor driver to use the subdev active state. Move all the format configuration to the subdevice state and simplify the format handling, locking and initialization. While at it, simplify imx214_start_streaming() by removing unneeded goto statements and the c

[PATCH v5 00/13] media: i2c: imx214: Miscellaneous cleanups and improvements

2024-12-17 Thread André Apitzsch via B4 Relay
This patch series is a collection of miscellaneous cleanups and improvements to the imx214 driver. The series converts the driver to the CCI helpers and adds controls needed to make the driver work with libcamera. The changes are inspired by the imx219 driver. Signed-off-by: André Apitzsch ---

[PATCH v5 02/13] media: i2c: imx214: Simplify with dev_err_probe()

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Error handling in probe() can be a bit simpler with dev_err_probe(). Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 54 +- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a

[PATCH v5 04/13] media: i2c: imx214: Replace register addresses with macros

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Define macros for all the known registers used in the register arrays, and use them to replace the numerical addresses. This improves readability. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 407 ++--

[PATCH v5 12/13] media: i2c: imx214: Fix clock handling on probe error or remove

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch The driver should disable or unprepare the clock on probe error and on removing the module. Remove regulator_bulk_disable(), because it is called by imx214_power_off(). Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH v5 05/13] media: i2c: imx214: Drop IMX214_REG_EXPOSURE from mode reg arrays

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch The IMX214_REG_EXPOSURE is configured twice, once with a hardcoded value in the mode_ registers arrays, and once via v4l2_ctrl_ops. The latter is enough, drop the former. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 2 -- 1 file

[PATCH v5 09/13] media: i2c: imx214: Add analogue/digital gain control

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports analogue gain up to 8x and digital gain up to 16x. Implement the corresponding controls in the driver. Default gain values are not modified by this patch. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 5

[PATCH v5 13/13] media: i2c: imx214: Fix link frequency validation

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch The driver defines IMX214_DEFAULT_LINK_FREQ 48000, and then IMX214_DEFAULT_PIXEL_RATE ((IMX214_DEFAULT_LINK_FREQ * 8LL) / 10), which works out as 384MPix/s. (The 8 is 4 lanes and DDR.) Parsing the PLL registers with the defined 24MHz input. We're in single PLL mode, so M

[PATCH v5 06/13] media: i2c: imx214: Check number of lanes from device tree

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 camera is capable of either two-lane or four-lane operation. Currently only the four-lane mode is supported, as proper pixel rates and link frequences for the two-lane mode are unknown. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/

[PATCH v5 10/13] media: i2c: imx214: Verify chip ID

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Check the chip ID and stop probing if it is no imx214 sensor. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/media/i2c/imx214.c b/drivers/med

[PATCH v5 03/13] media: i2c: imx214: Convert to CCI register access helpers

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Use the new common CCI register access helpers to replace the private register access helpers in the imx214 driver. This simplifies the driver by reducing the amount of code. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/Kconfig | 1 + d

[PATCH v5 08/13] media: i2c: imx214: Implement vflip/hflip controls

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports horizontal and vertical flipping. Add appropriate controls to the driver. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 69 -- 1 file changed, 61 insertions(+

[PATCH v5 11/13] media: i2c: imx214: Add test pattern control

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch This adds V4L2_CID_TEST_PATTERN control support. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 77 -- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/im

[PATCH v5 07/13] media: i2c: imx214: Add vblank and hblank controls

2024-12-17 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add vblank control to allow changing the framerate / higher exposure values. The vblank and hblank controls are needed for libcamera support. While at it, fix the minimal exposure time according to the datasheet. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214

[PATCH v6 03/13] media: i2c: imx214: Convert to CCI register access helpers

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Use the new common CCI register access helpers to replace the private register access helpers in the imx214 driver. This simplifies the driver by reducing the amount of code. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/Kconfig | 1 + d

[PATCH v6 07/13] media: i2c: imx214: Add vblank and hblank controls

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add vblank control to allow changing the framerate / higher exposure values. The vblank and hblank controls are needed for libcamera support. While at it, fix the minimal exposure time according to the datasheet. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214

[PATCH v6 05/13] media: i2c: imx214: Drop IMX214_REG_EXPOSURE from mode reg arrays

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The IMX214_REG_EXPOSURE is configured twice, once with a hardcoded value in the mode_ registers arrays, and once via v4l2_ctrl_ops. The latter is enough, drop the former. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 2 -- 1 file

[PATCH v6 09/13] media: i2c: imx214: Add analogue/digital gain control

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports analogue gain up to 8x and digital gain up to 16x. Implement the corresponding controls in the driver. Default gain values are not modified by this patch. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 5

[PATCH v6 00/13] media: i2c: imx214: Miscellaneous cleanups and improvements

2024-12-20 Thread André Apitzsch via B4 Relay
This patch series is a collection of miscellaneous cleanups and improvements to the imx214 driver. The series converts the driver to the CCI helpers and adds controls needed to make the driver work with libcamera. The changes are inspired by the imx219 driver. Signed-off-by: André Apitzsch ---

[PATCH v6 01/13] media: i2c: imx214: Use subdev active state

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Port the imx214 sensor driver to use the subdev active state. Move all the format configuration to the subdevice state and simplify the format handling, locking and initialization. While at it, simplify imx214_start_streaming() by removing unneeded goto statements and the c

[PATCH v6 02/13] media: i2c: imx214: Simplify with dev_err_probe()

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Error handling in probe() can be a bit simpler with dev_err_probe(). Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 54 +- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a

[PATCH v6 13/13] media: i2c: imx214: Fix link frequency validation

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The driver defines IMX214_DEFAULT_LINK_FREQ 48000, and then IMX214_DEFAULT_PIXEL_RATE ((IMX214_DEFAULT_LINK_FREQ * 8LL) / 10), which works out as 384MPix/s. (The 8 is 4 lanes and DDR.) Parsing the PLL registers with the defined 24MHz input. We're in single PLL mode, so M

[PATCH v6 04/13] media: i2c: imx214: Replace register addresses with macros

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Define macros for all the known registers used in the register arrays, and use them to replace the numerical addresses. This improves readability. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 407 ++--

[PATCH v6 08/13] media: i2c: imx214: Implement vflip/hflip controls

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 sensor supports horizontal and vertical flipping. Add appropriate controls to the driver. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 68 -- 1 file changed, 60 insertions(+

[PATCH v6 06/13] media: i2c: imx214: Check number of lanes from device tree

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The imx214 camera is capable of either two-lane or four-lane operation. Currently only the four-lane mode is supported, as proper pixel rates and link frequences for the two-lane mode are unknown. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/

[PATCH v6 10/13] media: i2c: imx214: Verify chip ID

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch Check the chip ID and stop probing if it is no imx214 sensor. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/media/i2c/imx214.c b/drivers/med

[PATCH v6 11/13] media: i2c: imx214: Add test pattern control

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch This adds V4L2_CID_TEST_PATTERN control support. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 77 -- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/im

[PATCH v6 12/13] media: i2c: imx214: Fix clock handling on probe error or remove

2024-12-20 Thread André Apitzsch via B4 Relay
From: André Apitzsch The driver should disable or unprepare the clock on probe error and on removing the module. Remove regulator_bulk_disable(), because it is called by imx214_power_off(). Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 4 +++- 1 fil

[PATCH v2] media: dw9719: Add of_match table

2025-02-08 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add of_match table for "dongwoon,dw9719" and "dongwoon,dw9761" compatible string. This fixes automatic driver loading when using a device-tree, and if built as a module like major linux distributions do. Signed-off-by: André Apitzsch --- This patch depends on https://lore.

[PATCH] ASoC: wm8998: Add Kconfig prompt

2025-04-18 Thread André Apitzsch via B4 Relay
From: André Apitzsch Add tristate prompt to allow codec selection. Signed-off-by: André Apitzsch --- sound/soc/codecs/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 40bb7a1d44bcfa4c386f2eba0f475efeeedf1bdb.

[PATCH v2 0/4] media: i2c: imx214: Add support for more clock frequencies

2025-05-05 Thread André Apitzsch via B4 Relay
The imx214 driver currently supports only a 24 MHz external clock. But there are devices, like Qualcomm-MSM8916-based phones, which cannot provide this frequency. To make the sensor usable by those devices, add support for additional clock frequencies. This series supersedes https://lore.kernel.or

[PATCH v2 2/4] media: i2c: imx214: Prepare for variable clock frequency

2025-05-05 Thread André Apitzsch via B4 Relay
From: André Apitzsch Move clock frequency related parameters out of the constant register sequences, such that the hard coded external clock frequency can be replaced by a variable in the upcoming patches. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c

[PATCH v2 3/4] media: i2c: imx214: Make use of CCS PLL calculator

2025-05-05 Thread André Apitzsch via B4 Relay
From: André Apitzsch Calculate PLL parameters based on clock frequency and link frequency. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/imx214.c | 216 + 2 files changed, 178 inser

[PATCH v2 1/4] media: i2c: imx214: Reorder imx214_parse_fwnode call

2025-05-05 Thread André Apitzsch via B4 Relay
From: André Apitzsch Reorder imx214_parse_fwnode call to reduce goto paths in upcoming patches. No functional change intended. Acked-by: Ricardo Ribalda Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dr

[PATCH v2 4/4] media: i2c: imx214: Remove hard-coded external clock frequency

2025-05-05 Thread André Apitzsch via B4 Relay
From: André Apitzsch Instead rely on the rate set on the clock (using assigned-clock-rates etc.) Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c index 9e9be47394ec768a

[PATCH 1/4] media: i2c: imx214: Reorder imx214_parse_fwnode call

2025-04-15 Thread André Apitzsch via B4 Relay
From: André Apitzsch Reorder imx214_parse_fwnode call to reduce goto paths in upcoming patches. No functional change intended. Signed-off-by: André Apitzsch --- drivers/media/i2c/imx214.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/imx214.c b/

  1   2   >