Lines Matching +full:module +full:- +full:instance
1 // SPDX-License-Identifier: GPL-2.0+
3 * rcar-fcp.c -- R-Car Frame Compression Processor Driver
11 #include <linux/dma-mapping.h>
13 #include <linux/module.h>
20 #include <media/rcar-fcp.h>
30 /* -----------------------------------------------------------------------------
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
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()
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().
75 put_device(fcp->dev); in rcar_fcp_put()
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
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
116 pm_runtime_put(fcp->dev); in rcar_fcp_disable()
120 /* -----------------------------------------------------------------------------
128 fcp = devm_kzalloc(&pdev->dev, sizeof(*fcp), GFP_KERNEL); in rcar_fcp_probe()
130 return -ENOMEM; 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()
136 pm_runtime_enable(&pdev->dev); in rcar_fcp_probe()
139 list_add_tail(&fcp->list, &fcp_devices); in rcar_fcp_probe()
152 list_del(&fcp->list); in rcar_fcp_remove()
155 pm_runtime_disable(&pdev->dev); in rcar_fcp_remove()
169 .name = "rcar-fcp",
177 MODULE_ALIAS("rcar-fcp");