xref: /linux/drivers/media/platform/dreamchip/rppx1/rppx1_cac.c (revision f4cdf7ca9a1fdcca413157df19753f388a5a224e)
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (C) 2026 Renesas Electronics Corp.
4  * Copyright (C) 2026 Ideas on Board Oy
5  * Copyright (C) 2026 Ragnatech AB
6  */
7 
8 #include "rpp_module.h"
9 
10 #define CAC_VERSION_REG			0x0000
11 #define CAC_CTRL_REG			0x0004
12 #define CAC_COUNT_START_REG		0x0008
13 #define CAC_A_REG			0x000c
14 #define CAC_B_REG			0x0010
15 #define CAC_C_REG			0x0014
16 #define CAC_X_NORM_REG			0x0018
17 #define CAC_Y_NORM_REG			0x001c
18 
19 static int rppx1_cac_probe(struct rpp_module *mod)
20 {
21 	/* Version check. */
22 	if (rpp_module_read(mod, CAC_VERSION_REG) != 3)
23 		return -EINVAL;
24 
25 	return 0;
26 }
27 
28 const struct rpp_module_ops rppx1_cac_ops = {
29 	.probe = rppx1_cac_probe,
30 };
31