Commit 16597c27 authored by Kieran Bingham's avatar Kieran Bingham Committed by Mauro Carvalho Chehab

media: i2c: adv748x: Remove PAGE_WAIT

The ADV748X_PAGE_WAIT is a fake page to insert arbitrary delays in the
register tables.

Its only usage was removed, so we can remove the handling and simplify
the code.
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent ac105ab2
...@@ -218,20 +218,13 @@ static int adv748x_write_regs(struct adv748x_state *state, ...@@ -218,20 +218,13 @@ static int adv748x_write_regs(struct adv748x_state *state,
{ {
int ret; int ret;
while (regs->page != ADV748X_PAGE_EOR) { for (; regs->page != ADV748X_PAGE_EOR; regs++) {
if (regs->page == ADV748X_PAGE_WAIT) { ret = adv748x_write(state, regs->page, regs->reg, regs->value);
msleep(regs->value); if (ret < 0) {
} else { adv_err(state, "Error regs page: 0x%02x reg: 0x%02x\n",
ret = adv748x_write(state, regs->page, regs->reg, regs->page, regs->reg);
regs->value); return ret;
if (ret < 0) {
adv_err(state,
"Error regs page: 0x%02x reg: 0x%02x\n",
regs->page, regs->reg);
return ret;
}
} }
regs++;
} }
return 0; return 0;
......
...@@ -39,7 +39,6 @@ enum adv748x_page { ...@@ -39,7 +39,6 @@ enum adv748x_page {
ADV748X_PAGE_MAX, ADV748X_PAGE_MAX,
/* Fake pages for register sequences */ /* Fake pages for register sequences */
ADV748X_PAGE_WAIT, /* Wait x msec */
ADV748X_PAGE_EOR, /* End Mark */ ADV748X_PAGE_EOR, /* End Mark */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment