summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2019-04-02 10:50:24 +0200
committerMarco Felsch <m.felsch@pengutronix.de>2019-08-19 16:09:11 +0200
commit8d1638cd77ed0e8d1a266af96c45cc0acb31cb0d (patch)
tree8819bec3c64720d5d3e3c0b1e353a98ff5acf125
parent71a47fb26828ef563ac7178abfee4a09352fbe34 (diff)
downloadlinux-0-day-mfe/media/i2c/tvp5150.8.tar.gz
media: tvp5150: make debug output more readablemfe/media/i2c/tvp5150.8
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>
-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 c81d8fd..f49f7ea 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -300,9 +300,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);