From 4113bc07ed670e450537e92bb91f2cd1da15ffd1 Mon Sep 17 00:00:00 2001 From: Varshit B Pandya Date: Mon, 31 May 2021 16:49:41 +0530 Subject: [PATCH] drivers/intel/mipi_camera: Add macros to increase code readability This will be used to pass information to driver through ACPI in devicetree. Example https://review.coreboot.org/c/coreboot/+/52013 register "clk_panel.clks[0].clknum" = "IMGCLKOUT_3" register "clk_panel.clks[0].freq" = "FREQ_19_2_MHZ" TEST=Add these macros in devicetree, build and check static.c for consistency Signed-off-by: Varshit B Pandya Change-Id: Ia4137e09c934bf06857ceedb933e616bed5070dd Reviewed-on: https://review.coreboot.org/c/coreboot/+/55097 Reviewed-by: Maulik V Vaghela Reviewed-by: Subrata Banik Reviewed-by: Paul Menzel Reviewed-by: Rizwan Qureshi Tested-by: build bot (Jenkins) --- src/drivers/intel/mipi_camera/chip.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/drivers/intel/mipi_camera/chip.h b/src/drivers/intel/mipi_camera/chip.h index 64942b6536..35a90bd67c 100644 --- a/src/drivers/intel/mipi_camera/chip.h +++ b/src/drivers/intel/mipi_camera/chip.h @@ -14,6 +14,14 @@ #define MAX_GPIO_CONFIGS 4 #define MAX_PWR_OPS 5 #define MAX_GUARDED_RESOURCES 10 +#define IMGCLKOUT_0 0 +#define IMGCLKOUT_1 1 +#define IMGCLKOUT_2 2 +#define IMGCLKOUT_3 3 +#define IMGCLKOUT_4 4 +#define IMGCLKOUT_5 5 +#define FREQ_24_MHZ 0 +#define FREQ_19_2_MHZ 1 #define SEQ_OPS_CLK_ENABLE(ind, delay) \ { .type = IMGCLK, .index = (ind), .action = ENABLE, .delay_ms = (delay) }