Lines Matching full:fcp

3  * rcar-fcp.c  --  R-Car Frame Compression Processor Driver
20 #include <media/rcar-fcp.h>
35 * rcar_fcp_get - Find and acquire a reference to an FCP instance
36 * @np: Device node of the FCP instance
38 * Search the list of registered FCP instances for the instance corresponding to
41 * Return a pointer to the FCP instance, or an ERR_PTR if the instance can't be
46 struct rcar_fcp_device *fcp; in rcar_fcp_get() local
50 list_for_each_entry(fcp, &fcp_devices, list) { in rcar_fcp_get()
51 if (fcp->dev->of_node != np) in rcar_fcp_get()
54 get_device(fcp->dev); in rcar_fcp_get()
58 fcp = ERR_PTR(-EPROBE_DEFER); in rcar_fcp_get()
62 return fcp; in rcar_fcp_get()
67 * rcar_fcp_put - Release a reference to an FCP instance
68 * @fcp: The FCP instance
70 * Release the FCP instance acquired by a call to rcar_fcp_get().
72 void rcar_fcp_put(struct rcar_fcp_device *fcp) in rcar_fcp_put() argument
74 if (fcp) in rcar_fcp_put()
75 put_device(fcp->dev); in rcar_fcp_put()
79 struct device *rcar_fcp_get_device(struct rcar_fcp_device *fcp) in rcar_fcp_get_device() argument
81 return fcp->dev; in rcar_fcp_get_device()
86 * rcar_fcp_enable - Enable an FCP
87 * @fcp: The FCP instance
89 * Before any memory access through an FCP is performed by a module, the FCP
92 * call when no more memory transfer can occur through the FCP.
97 int rcar_fcp_enable(struct rcar_fcp_device *fcp) in rcar_fcp_enable() argument
99 if (!fcp) in rcar_fcp_enable()
102 return pm_runtime_resume_and_get(fcp->dev); in rcar_fcp_enable()
107 * rcar_fcp_disable - Disable an FCP
108 * @fcp: The FCP instance
111 * reference counted a disable call may not disable the FCP synchronously.
113 void rcar_fcp_disable(struct rcar_fcp_device *fcp) in rcar_fcp_disable() argument
115 if (fcp) in rcar_fcp_disable()
116 pm_runtime_put(fcp->dev); in rcar_fcp_disable()
126 struct rcar_fcp_device *fcp; in rcar_fcp_probe() local
128 fcp = devm_kzalloc(&pdev->dev, sizeof(*fcp), GFP_KERNEL); in rcar_fcp_probe()
129 if (fcp == NULL) in rcar_fcp_probe()
132 fcp->dev = &pdev->dev; in rcar_fcp_probe()
134 dma_set_max_seg_size(fcp->dev, UINT_MAX); in rcar_fcp_probe()
139 list_add_tail(&fcp->list, &fcp_devices); in rcar_fcp_probe()
142 platform_set_drvdata(pdev, fcp); in rcar_fcp_probe()
149 struct rcar_fcp_device *fcp = platform_get_drvdata(pdev); in rcar_fcp_remove() local
152 list_del(&fcp->list); in rcar_fcp_remove()
169 .name = "rcar-fcp",
177 MODULE_ALIAS("rcar-fcp");
179 MODULE_DESCRIPTION("Renesas FCP Driver");