Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357042
b: refs/heads/master
c: a2fea0d
h: refs/heads/master
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Dec 21, 2012
1 parent 95506b8 commit 901b9a5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cd65a645a4f5e456607067734f9a11385c9dce7b
refs/heads/master: a2fea0dfddf95b7f1e7adb3630c7d07a92cfb09b
28 changes: 28 additions & 0 deletions trunk/drivers/media/platform/s5p-fimc/mipi-csis.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,30 @@ static int s5pcsis_clk_get(struct csis_state *state)
return -ENXIO;
}

static void dump_regs(struct csis_state *state, const char *label)
{
struct {
u32 offset;
const char * const name;
} registers[] = {
{ 0x00, "CTRL" },
{ 0x04, "DPHYCTRL" },
{ 0x08, "CONFIG" },
{ 0x0c, "DPHYSTS" },
{ 0x10, "INTMSK" },
{ 0x2c, "RESOL" },
{ 0x38, "SDW_CONFIG" },
};
u32 i;

v4l2_info(&state->sd, "--- %s ---\n", label);

for (i = 0; i < ARRAY_SIZE(registers); i++) {
u32 cfg = s5pcsis_read(state, registers[i].offset);
v4l2_info(&state->sd, "%10s: 0x%08x\n", registers[i].name, cfg);
}
}

static void s5pcsis_start_stream(struct csis_state *state)
{
s5pcsis_reset(state);
Expand Down Expand Up @@ -583,7 +607,11 @@ static int s5pcsis_log_status(struct v4l2_subdev *sd)
{
struct csis_state *state = sd_to_csis_state(sd);

mutex_lock(&state->lock);
s5pcsis_log_counters(state, true);
if (debug && (state->flags & ST_POWERED))
dump_regs(state, __func__);
mutex_unlock(&state->lock);
return 0;
}

Expand Down

0 comments on commit 901b9a5

Please sign in to comment.