Post Go back to editing

ADV7282-M Linux Driver Select Input Issues

Hello

I'm using the https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/media/i2c/adv7180.c driver with an ADV7282-M. This is a slightly modified version of the mainline Driver under https://github.com/torvalds/linux/blob/master/drivers/media/i2c/adv7180.c.

One of the modifications is that is switches to ADV7182_INPUT_CVBS_AIN1 after Init. This works fine, but seems to often cause video too dark/bright issues. See: https://ez.analog.com/video/f/q-a/553149/adv7281-m-image-too-dark-or-too-bright-and-analog-noise/448078

Commenting this switch to first input logic https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/media/i2c/adv7180.c#L1343-L1353 fixed the video too dark/bright issue. Next I tried to find the root cause.

The root cause seems to be the following register writes: https://github.com/raspberrypi/linux/blob/rpi-5.15.y/drivers/media/i2c/adv7180.c#L1116-L1120 I tried to find these registers in the ADV7180/7182/7280/7282 Datasheets but didn't find them.

Where are these registers from? I'm happy to provide a PR to fix this as soon as I understand where these registers are coming from..