media: cec-notifier: also search for HDMI devices on I2C
authorJohan Fjeldtvedt <johfjeld@cisco.com>
Tue, 2 Mar 2021 11:50:56 +0000 (12:50 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Mar 2021 10:59:44 +0000 (11:59 +0100)
commit71bb1b99a24f9653bdccaad2c25d007ba524074a
tree909d3151fe97a998b097608945586ec4defb5039
parent9c39be40c0155c43343f53e3a439290c0fec5542
media: cec-notifier: also search for HDMI devices on I2C

Currently the cec_notifier_parse_hdmi_phandle function can only be used
if the HDMI device associated with the CEC device is a platform device.
Extend the function to cover I2C devices as well, as there do exist
some I2C HDMI devices which don't handle CEC internally and need an
external CEC adapter.

[hverkuil: add missing linux/i2c.h header]
[hverkuil: only attempt to find the i2c device if CONFIG_I2C is set]

Signed-off-by: Johan Fjeldtvedt <johfjeld@cisco.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/cec/core/cec-notifier.c