diff options
author | Marco Felsch <m.felsch@pengutronix.de> | 2020-03-12 11:31:56 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-03-12 16:42:40 +0100 |
commit | 430f35b734e6851d72bc66cc140f045999b30dec (patch) | |
tree | 6622cae612e588fecce289c48d820bb3085da413 /drivers | |
parent | baf178219478c217d8e9727a31971e32d3ff2b70 (diff) | |
download | linux-430f35b734e6851d72bc66cc140f045999b30dec.tar.bz2 |
media: tvp5150: make debug output more readable
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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/i2c/tvp5150.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index edf0c695bbee..eb39cf5ea089 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); |