diff mbox series

[v2,1/2] media: imx274: remove binning enum

Message ID 20200915090442.52322-1-eugen.hristev@microchip.com
State Accepted
Commit e599fc86717fde6741891c8b1689fe7043734348
Headers show
Series [v2,1/2] media: imx274: remove binning enum | expand

Commit Message

Eugen Hristev Sept. 15, 2020, 9:04 a.m. UTC
Binning enum is unused. Remove from driver.

Suggested-by: Sakari Ailus <sakari.ailus@ifi.fi>
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
---
Changes in v2:
- new patch

 drivers/media/i2c/imx274.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Luca Ceresoli Sept. 15, 2020, 9:21 a.m. UTC | #1
Hi,

On 15/09/20 11:04, Eugen Hristev wrote:
> Binning enum is unused. Remove from driver.
> 
> Suggested-by: Sakari Ailus <sakari.ailus@ifi.fi>
> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>

Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Luca Ceresoli Sept. 15, 2020, 9:25 a.m. UTC | #2
Hi,

On 15/09/20 11:04, Eugen Hristev wrote:
> Add support for the mode 6 for the sensor, this mode uses

> 3/8 subsampling and 3 horizontal binning.

> Aspect ratio is changed.

> Split the bin_ratio variable into two parts, one for

> width and one for height, as the ratio is no longer preserved

> when doing subsampling in this mode.

> 

> Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>


Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>


-- 
Luca
diff mbox series

Patch

diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c
index e6aa9f32b6a8..69221c2c192c 100644
--- a/drivers/media/i2c/imx274.c
+++ b/drivers/media/i2c/imx274.c
@@ -65,7 +65,6 @@ 
  */
 #define IMX274_MIN_EXPOSURE_TIME		(4 * 260 / 72)
 
-#define IMX274_DEFAULT_BINNING			IMX274_BINNING_OFF
 #define IMX274_MAX_WIDTH			(3840)
 #define IMX274_MAX_HEIGHT			(2160)
 #define IMX274_MAX_FRAME_RATE			(120)
@@ -145,12 +144,6 @@  static const struct regmap_config imx274_regmap_config = {
 	.cache_type = REGCACHE_RBTREE,
 };
 
-enum imx274_binning {
-	IMX274_BINNING_OFF,
-	IMX274_BINNING_2_1,
-	IMX274_BINNING_3_1,
-};
-
 /*
  * Parameters for each imx274 readout mode.
  *
@@ -1837,7 +1830,7 @@  static int imx274_probe(struct i2c_client *client)
 	mutex_init(&imx274->lock);
 
 	/* initialize format */
-	imx274->mode = &imx274_modes[IMX274_DEFAULT_BINNING];
+	imx274->mode = &imx274_modes[0];
 	imx274->crop.width = IMX274_MAX_WIDTH;
 	imx274->crop.height = IMX274_MAX_HEIGHT;
 	imx274->format.width = imx274->crop.width / imx274->mode->bin_ratio;