]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: i2c: imx219: Simplify binning mode
authorJai Luthra <jai.luthra@ideasonboard.com>
Fri, 21 Feb 2025 10:52:13 +0000 (16:22 +0530)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 4 Mar 2025 12:35:32 +0000 (13:35 +0100)
commit5345c743ba36a737cf9118101e8224bf1654a61d
treeb33543fe32895d429fe0391c8053eb32c75ab07e
parent5b1ea9af9955a2bcf467bb289026b1924b71ba44
media: i2c: imx219: Simplify binning mode

The imx219_get_binning() function currently returns two separate pieces
of information, the return value is the binning mode enum, and the bin_h
and bin_v references are updated with whether to perform binning in
horizontal and vertical dimensions.

It is simpler to combine both of these pieces of information, and
directly update the bin_h and bin_v references with the register value
that we will write to the sensor, which includes if the binning is
digital or analog mode, thus allowing us to remove the superfluous
binning mode enum.

This is only a style change for the driver, with no functionality
updated.

Suggested-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Link: https://lore.kernel.org/linux-media/ubuuob7mb3o5bxoumrxv4rufutgk3lvdmdery6d3bfc6rytfti@tcchhlechzzp/
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jai Luthra <jai.luthra@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/imx219.c