diff options
author | Varshit B Pandya <varshit.b.pandya@intel.corp-partner.google.com> | 2021-05-31 16:49:41 +0530 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2021-06-01 21:36:59 +0000 |
commit | 4113bc07ed670e450537e92bb91f2cd1da15ffd1 (patch) | |
tree | e54f565804763e9d42bd1213fcd5bd2f95127e78 /src | |
parent | faebe8e46ac5707ecee3fbd3c2d8efb3d3be4436 (diff) |
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 <varshit.b.pandya@intel.corp-partner.google.com>
Change-Id: Ia4137e09c934bf06857ceedb933e616bed5070dd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55097
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/intel/mipi_camera/chip.h | 8 |
1 files changed, 8 insertions, 0 deletions
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) } |