media: i2c: ds90ub953: Restructure clkout management
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Mon, 31 Jul 2023 13:24:41 +0000 (16:24 +0300)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Thu, 10 Aug 2023 05:58:37 +0000 (07:58 +0200)
commitd7d7a9ab7a7779567c59eec0d9b57b75b2763dd9
tree1e50a52e9f526351cffd72ce183788cbdfcd49c4
parent05428f66fc404455b89ebef7f07ed15fae1a5992
media: i2c: ds90ub953: Restructure clkout management

Separate clkout calculations and register writes into two functions:
ub953_calc_clkout_params and ub953_write_clkout_regs, and add a struct
ub953_clkout_data that is used to store the clkout parameters.

This simplifies the clkout management.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/ds90ub953.c