drivers/reset/reset-imx8mp-audiomix.c
Source file repositories/reference/linux-study-clean/drivers/reset/reset-imx8mp-audiomix.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/reset/reset-imx8mp-audiomix.c- Extension
.c- Size
- 6397 bytes
- Lines
- 244
- Domain
- Driver Families
- Bucket
- drivers/reset
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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
dt-bindings/reset/fsl,imx8ulp-sim-lpav.hdt-bindings/reset/imx8mp-reset-audiomix.hlinux/auxiliary_bus.hlinux/bits.hlinux/device.hlinux/io.hlinux/module.hlinux/of.hlinux/of_address.hlinux/regmap.hlinux/reset-controller.h
Detected Declarations
struct imx8mp_reset_mapstruct imx8mp_reset_infostruct imx8mp_audiomix_resetfunction imx8mp_audiomix_updatefunction imx8mp_audiomix_reset_assertfunction imx8mp_audiomix_reset_deassertfunction imx8mp_audiomix_reset_iounmapfunction imx8mp_audiomix_reset_get_regmapfunction imx8mp_audiomix_reset_probe
Annotated Snippet
struct imx8mp_reset_map {
unsigned int offset;
unsigned int mask;
bool active_low;
};
struct imx8mp_reset_info {
const struct imx8mp_reset_map *map;
int num_lines;
};
static const struct imx8mp_reset_map imx8mp_reset_map[] = {
[IMX8MP_AUDIOMIX_EARC_RESET] = {
.offset = IMX8MP_AUDIOMIX_EARC_RESET_OFFSET,
.mask = BIT(0),
.active_low = true,
},
[IMX8MP_AUDIOMIX_EARC_PHY_RESET] = {
.offset = IMX8MP_AUDIOMIX_EARC_RESET_OFFSET,
.mask = BIT(1),
.active_low = true,
},
[IMX8MP_AUDIOMIX_DSP_RUNSTALL] = {
.offset = IMX8MP_AUDIOMIX_DSP_RUNSTALL_OFFSET,
.mask = BIT(5),
.active_low = false,
},
};
static const struct imx8mp_reset_info imx8mp_reset_info = {
.map = imx8mp_reset_map,
.num_lines = ARRAY_SIZE(imx8mp_reset_map),
};
static const struct imx8mp_reset_map imx8ulp_reset_map[] = {
[IMX8ULP_SIM_LPAV_HIFI4_DSP_DBG_RST] = {
.offset = IMX8ULP_SIM_LPAV_SYSCTRL0_OFFSET,
.mask = BIT(25),
.active_low = false,
},
[IMX8ULP_SIM_LPAV_HIFI4_DSP_RST] = {
.offset = IMX8ULP_SIM_LPAV_SYSCTRL0_OFFSET,
.mask = BIT(16),
.active_low = false,
},
[IMX8ULP_SIM_LPAV_HIFI4_DSP_STALL] = {
.offset = IMX8ULP_SIM_LPAV_SYSCTRL0_OFFSET,
.mask = BIT(13),
.active_low = false,
},
[IMX8ULP_SIM_LPAV_DSI_RST_BYTE_N] = {
.offset = IMX8ULP_SIM_LPAV_SYSCTRL0_OFFSET,
.mask = BIT(5),
.active_low = true,
},
[IMX8ULP_SIM_LPAV_DSI_RST_ESC_N] = {
.offset = IMX8ULP_SIM_LPAV_SYSCTRL0_OFFSET,
.mask = BIT(4),
.active_low = true,
},
[IMX8ULP_SIM_LPAV_DSI_RST_DPI_N] = {
.offset = IMX8ULP_SIM_LPAV_SYSCTRL0_OFFSET,
.mask = BIT(3),
.active_low = true,
},
};
static const struct imx8mp_reset_info imx8ulp_reset_info = {
.map = imx8ulp_reset_map,
.num_lines = ARRAY_SIZE(imx8ulp_reset_map),
};
struct imx8mp_audiomix_reset {
struct reset_controller_dev rcdev;
struct regmap *regmap;
const struct imx8mp_reset_map *map;
};
static struct imx8mp_audiomix_reset *to_imx8mp_audiomix_reset(struct reset_controller_dev *rcdev)
{
return container_of(rcdev, struct imx8mp_audiomix_reset, rcdev);
}
static int imx8mp_audiomix_update(struct reset_controller_dev *rcdev,
unsigned long id, bool assert)
{
struct imx8mp_audiomix_reset *priv = to_imx8mp_audiomix_reset(rcdev);
const struct imx8mp_reset_map *reset_map = priv->map;
unsigned int mask, offset, active_low, val;
Annotation
- Immediate include surface: `dt-bindings/reset/fsl,imx8ulp-sim-lpav.h`, `dt-bindings/reset/imx8mp-reset-audiomix.h`, `linux/auxiliary_bus.h`, `linux/bits.h`, `linux/device.h`, `linux/io.h`, `linux/module.h`, `linux/of.h`.
- Detected declarations: `struct imx8mp_reset_map`, `struct imx8mp_reset_info`, `struct imx8mp_audiomix_reset`, `function imx8mp_audiomix_update`, `function imx8mp_audiomix_reset_assert`, `function imx8mp_audiomix_reset_deassert`, `function imx8mp_audiomix_reset_iounmap`, `function imx8mp_audiomix_reset_get_regmap`, `function imx8mp_audiomix_reset_probe`.
- Atlas domain: Driver Families / drivers/reset.
- Implementation status: source 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.