diff options
author | Jacopo Mondi <jacopo+renesas@jmondi.org> | 2018-09-17 14:30:54 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-10-04 21:47:56 +0300 |
commit | eccf442ce156ec2b4e06b1239d5fdcb0c732f63f (patch) | |
tree | 27fdff81a8f2fbf360ad9769e1caae13c7ff0f29 /drivers/media/i2c/adv748x/adv748x.h | |
parent | bf7464a7a81717518b0fc46b1af6dc9d9bf4ec90 (diff) | |
download | linux-eccf442ce156ec2b4e06b1239d5fdcb0c732f63f.tar.xz |
media: i2c: adv748x: Support probing a single output
Currently the adv748x driver will fail to probe unless both of its
output endpoints (TXA and TXB) are connected.
Make the driver support probing provided that there is at least one
input, and one output connected and protect the clean-up function from
accessing un-initialized fields.
Following patches will fix other uses of un-initialized TXs in the driver,
such as power management functions.
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c/adv748x/adv748x.h')
-rw-r--r-- | drivers/media/i2c/adv748x/adv748x.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h index c9016acaba34..c5ed862d1efd 100644 --- a/drivers/media/i2c/adv748x/adv748x.h +++ b/drivers/media/i2c/adv748x/adv748x.h @@ -78,6 +78,7 @@ struct adv748x_csi2 { struct adv748x_state *state; struct v4l2_mbus_framefmt format; unsigned int page; + unsigned int port; struct media_pad pads[ADV748X_CSI2_NR_PADS]; struct v4l2_ctrl_handler ctrl_hdl; @@ -87,6 +88,7 @@ struct adv748x_csi2 { #define notifier_to_csi2(n) container_of(n, struct adv748x_csi2, notifier) #define adv748x_sd_to_csi2(sd) container_of(sd, struct adv748x_csi2, sd) +#define is_tx_enabled(_tx) ((_tx)->state->endpoints[(_tx)->port] != NULL) enum adv748x_hdmi_pads { ADV748X_HDMI_SINK, |