summaryrefslogtreecommitdiff
path: root/drivers/media/platform/atmel/atmel-isc.h
diff options
context:
space:
mode:
authorEugen Hristev <eugen.hristev@microchip.com>2021-04-13 12:56:59 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-06-08 12:17:54 +0200
commitf84bc784fa614ae9dba9fb79af2b8f143248c112 (patch)
treec5314d6de623df77615d4bb2e1770ffe27317944 /drivers/media/platform/atmel/atmel-isc.h
parent269b4dd3e8b34edec44c5bb0016ee96353638618 (diff)
media: atmel: atmel-isc: specialize gamma table into product specific
Separate the gamma table from the isc base file into the specific sama5d2 product file. Add a pointer to the gamma table and entries count inside the platform driver specific struct. [hverkuil: made isc_sama5d2_gamma_table static] Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/atmel/atmel-isc.h')
-rw-r--r--drivers/media/platform/atmel/atmel-isc.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/platform/atmel/atmel-isc.h b/drivers/media/platform/atmel/atmel-isc.h
index fab8eca58d93..f1df47a4655b 100644
--- a/drivers/media/platform/atmel/atmel-isc.h
+++ b/drivers/media/platform/atmel/atmel-isc.h
@@ -187,6 +187,10 @@ struct isc_ctrls {
*
* @current_subdev: current subdevice: the sensor
* @subdev_entities: list of subdevice entitites
+ *
+ * @gamma_table: pointer to the table with gamma values, has
+ * gamma_max sets of GAMMA_ENTRIES entries each
+ * @gamma_max: maximum number of sets of inside the gamma_table
*/
struct isc_device {
struct regmap *regmap;
@@ -245,16 +249,17 @@ struct isc_device {
struct v4l2_ctrl *gr_off_ctrl;
struct v4l2_ctrl *gb_off_ctrl;
};
-};
-#define GAMMA_MAX 2
#define GAMMA_ENTRIES 64
+ /* pointer to the defined gamma table */
+ const u32 (*gamma_table)[GAMMA_ENTRIES];
+ u32 gamma_max;
+};
#define ATMEL_ISC_NAME "atmel-isc"
extern struct isc_format formats_list[];
extern const struct isc_format controller_formats[];
-extern const u32 isc_gamma_table[GAMMA_MAX + 1][GAMMA_ENTRIES];
extern const struct regmap_config isc_regmap_config;
extern const struct v4l2_async_notifier_operations isc_async_ops;