soc: rockchip: rk_camera: correct macro definition

Change-Id: Ib7bba62d4f25905e5e42d5f76092eddeb8806ee9
Signed-off-by: Zhang Yunlong <dalon.zhang@rock-chips.com>
This commit is contained in:
Zhang Yunlong
2018-03-20 11:10:08 +08:00
committed by Tao Huang
parent 830d9321e7
commit 01fc57fe3f
2 changed files with 5 additions and 4 deletions

View File

@@ -1018,12 +1018,12 @@ static int rk_sensor_pwrseq(struct device *dev,int powerup_sequence, int on, int
debug_printk( "/$$$$$$$$$$$$$$$$$$$$$$//n Here I am: %s:%i-------%s()\n", __FILE__, __LINE__,__FUNCTION__);
for (i=0; i<8; i++) {
for (i = 0; i < SENSOR_PWRSEQ_CNT; i++) {
if (on == 1)
powerup_type = SENSOR_PWRSEQ_GET(powerup_sequence, i);
else
powerup_type = SENSOR_PWRSEQ_GET(powerup_sequence, 7 - i);
powerup_type = SENSOR_PWRSEQ_GET(powerup_sequence, SENSOR_PWRSEQ_CNT - 1 - i);
switch (powerup_type)
{

View File

@@ -326,9 +326,10 @@
#define SENSOR_PWRSEQ_PWRDN 0x06
#define SENSOR_PWRSEQ_CLKIN 0x07
#define SENSOR_PWRSEQ_END 0x0F
#define SENSOR_PWRSEQ_CNT 0x07
#define SENSOR_PWRSEQ_SET(type, idx) (type << (idx * 4))
#define SENSOR_PWRSEQ_GET(seq, idx) ((seq >> (idx * 4)) & 0x0f)
#define SENSOR_PWRSEQ_SET(type, idx) (type << ((idx) * 4))
#define SENSOR_PWRSEQ_GET(seq, idx) ((seq >> ((idx) * 4)) & 0x0f)
#define sensor_PWRSEQ_DEFAULT \
(SENSOR_PWRSEQ_SET(SENSOR_PWRSEQ_PWR, 0) |\