mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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) |\
|
||||
|
||||
Reference in New Issue
Block a user