drivers/gpu/host1x/mipi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/host1x/mipi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/host1x/mipi.c- Extension
.c- Size
- 5146 bytes
- Lines
- 196
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/io.hlinux/iopoll.hlinux/module.hlinux/of.hlinux/of_platform.hlinux/platform_device.hlinux/slab.hlinux/tegra-mipi-cal.h
Detected Declarations
function tegra_mipi_enablefunction tegra_mipi_disablefunction tegra_mipi_start_calibrationfunction tegra_mipi_finish_calibrationfunction tegra_mipi_requestfunction tegra_mipi_remove_providerfunction devm_tegra_mipi_add_providerexport tegra_mipi_enableexport tegra_mipi_disableexport tegra_mipi_start_calibrationexport tegra_mipi_finish_calibrationexport tegra_mipi_requestexport tegra_mipi_freeexport devm_tegra_mipi_add_provider
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 NVIDIA Corporation
* Copyright (C) 2025 Svyatoslav Ryhel <clamor95@gmail.com>
*/
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/tegra-mipi-cal.h>
/* only need to support one provider */
static struct {
struct device_node *np;
const struct tegra_mipi_ops *ops;
} provider;
/**
* tegra_mipi_enable - Enable the Tegra MIPI calibration device.
* @device: Handle to the Tegra MIPI calibration device.
*
* This calls the enable sequence for the Tegra MIPI calibration device.
*
* Returns 0 on success or a negative error code on failure.
*/
int tegra_mipi_enable(struct tegra_mipi_device *device)
{
if (device->ops->enable)
return device->ops->enable(device);
return 0;
}
EXPORT_SYMBOL(tegra_mipi_enable);
/**
* tegra_mipi_disable - Disable the Tegra MIPI calibration device.
* @device: Handle to the Tegra MIPI calibration device.
*
* This calls the disable sequence for the Tegra MIPI calibration device.
*
* Returns 0 on success or a negative error code on failure.
*/
int tegra_mipi_disable(struct tegra_mipi_device *device)
{
if (device->ops->disable)
return device->ops->disable(device);
return 0;
}
EXPORT_SYMBOL(tegra_mipi_disable);
/**
* tegra_mipi_start_calibration - Start the Tegra MIPI calibration sequence.
* @device: Handle to the Tegra MIPI calibration device.
*
* This initiates the calibration of CSI/DSI interfaces via the Tegra MIPI
* calibration device.
*
* Returns 0 on success or a negative error code on failure.
*/
int tegra_mipi_start_calibration(struct tegra_mipi_device *device)
{
if (device->ops->start_calibration)
return device->ops->start_calibration(device);
return 0;
}
EXPORT_SYMBOL(tegra_mipi_start_calibration);
/**
* tegra_mipi_finish_calibration - Finish the Tegra MIPI calibration sequence.
* @device: Handle to the Tegra MIPI calibration device.
*
* This completes the calibration of CSI/DSI interfaces via the Tegra MIPI
* calibration device.
*
* Returns 0 on success or a negative error code on failure.
*/
int tegra_mipi_finish_calibration(struct tegra_mipi_device *device)
{
if (device->ops->finish_calibration)
return device->ops->finish_calibration(device);
return 0;
}
Annotation
- Immediate include surface: `linux/clk.h`, `linux/io.h`, `linux/iopoll.h`, `linux/module.h`, `linux/of.h`, `linux/of_platform.h`, `linux/platform_device.h`, `linux/slab.h`.
- Detected declarations: `function tegra_mipi_enable`, `function tegra_mipi_disable`, `function tegra_mipi_start_calibration`, `function tegra_mipi_finish_calibration`, `function tegra_mipi_request`, `function tegra_mipi_remove_provider`, `function devm_tegra_mipi_add_provider`, `export tegra_mipi_enable`, `export tegra_mipi_disable`, `export tegra_mipi_start_calibration`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.