summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/tvp5150.c
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2019-04-02 10:50:24 +0200
committerMarco Felsch <m.felsch@pengutronix.de>2020-03-06 15:50:58 +0100
commit818c7a29eb379034bf0f85ff6a6b8c1b7203d17e (patch)
tree9fb80ce60393d47c8beb619f6a77757e74803cef /drivers/media/i2c/tvp5150.c
parent5f83f035804c43629e36860242fb5c0d6b6dc0eb (diff)
downloadlinux-0-day-818c7a29eb379034bf0f85ff6a6b8c1b7203d17e.tar.gz
linux-0-day-818c7a29eb379034bf0f85ff6a6b8c1b7203d17e.tar.xz
media: tvp5150: make debug output more readablev5.6/topic/tvp5150.12-media
The debug output for tvp5150_selmux() isn't really intuitive. Register values are printed decimal formatted and the input/output driver states are printed as enum. Even more the "normal" output enum mapps to zero so a active output will printing output=0 and a inactive output=1. Change this by brinting the register values hex formatted and the states as more readable string. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'drivers/media/i2c/tvp5150.c')
-rw-r--r--drivers/media/i2c/tvp5150.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index 46d58a900d38d..25d670002d648 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -302,9 +302,12 @@ static void tvp5150_selmux(struct v4l2_subdev *sd)
break;
}
- dev_dbg_lvl(sd->dev, 1, debug, "Selecting video route: route input=%i, output=%i => tvp5150 input=%i, opmode=%i\n",
- decoder->input, decoder->output,
- input, opmode);
+ dev_dbg_lvl(sd->dev, 1, debug,
+ "Selecting video route: route input=%s, output=%s => tvp5150 input=0x%02x, opmode=0x%02x\n",
+ decoder->input == 0 ? "aip1a" :
+ decoder->input == 2 ? "aip1b" : "svideo",
+ decoder->output == 0 ? "normal" : "black-frame-gen",
+ input, opmode);
regmap_write(decoder->regmap, TVP5150_OP_MODE_CTL, opmode);
regmap_write(decoder->regmap, TVP5150_VD_IN_SRC_SEL_1, input);