MLK-14548: video: fb: hdmi: Allow reset pin deferral
authorCristina Ciocan <cristina-mihaela.ciocan@nxp.com>
Thu, 20 Apr 2017 10:32:43 +0000 (13:32 +0300)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:22:02 +0000 (15:22 -0500)
The HDMI transmitter Sil902x driver displays a warning when it cannot
reset the device before any other instruction, but carries on without
exiting the probe() function.

If the needed reset pin is not yet available because the pinctrl
controllers are not set up and the reset fails with deferral error, try
to acquire the pin later on in order to allow proper initialization of the
Sil902 HDMI transmitter.

Signed-off-by: Cristina Ciocan <cristina-mihaela.ciocan@nxp.com>
drivers/video/fbdev/mxc/mxsfb_sii902x.c

index 97c46b6..c3c4a18 100644 (file)
@@ -398,6 +398,8 @@ static int sii902x_probe(struct i2c_client *client,
        ret = device_reset(&sii902x.client->dev);
        if (ret)
                dev_warn(&sii902x.client->dev, "No reset pin found\n");
+       if (ret == -EPROBE_DEFER)
+               return ret;
 
        /* Set 902x in hardware TPI mode on and jump out of D3 state */
        if (i2c_smbus_write_byte_data(sii902x.client, 0xc7, 0x00) < 0) {