Hi,

On Tuesday 01 March 2011 10:47 AM, Taneja, Archit wrote:
Hi,

On Monday 28 February 2011 06:21 PM, Valkeinen, Tomi wrote:
On Mon, 2011-02-28 at 02:47 -0600, Taneja, Archit wrote:
Introduce functions which request and release VC's. This will be used in panel
drivers in their probes.

omap_dsi_request_vc() takes in the pointer to the omap_dss_device, the VC_ID
parameter which goes into the header of the DSI packets, and returns a Virtual
channel number (or virtual channel register set) which it can use.

omap_dsi_releae_vc() takes the omap_dss_device pointer and frees all VCs which
were used by that device.

Initialisation of VC parameters is done in dsi_init().

Signed-off-by: Archit Taneja<[email protected]>
<snip>


   }

+int omap_dsi_request_vc(struct omap_dss_device *dssdev, int vc_id, int 
*channel)
+{
+       int p = dsi.num_vc_used;
+
+       if (p>= 4) {
+               DSSERR("cannot get VC for display %s", dssdev->name);
+               return -EINVAL;

Should we return -EINAVL when all VCs are used? Could we put -EBUSY or -ENOSPC instead?

+       }
+
+       dsi.vc[p].dssdev = dssdev;
+       dsi.vc[p].vc_id = vc_id;
+       *channel = p;
+
+       dsi.num_vc_used += 1;
+
+       return 0;
+}
+EXPORT_SYMBOL(omap_dsi_request_vc);
+

<snip>

Archit
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to