drivers/mfd/cs47l90-tables.c
Source file repositories/reference/linux-study-clean/drivers/mfd/cs47l90-tables.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/mfd/cs47l90-tables.c- Extension
.c- Size
- 131733 bytes
- Lines
- 2597
- Domain
- Driver Families
- Bucket
- drivers/mfd
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/module.hlinux/regmap.hlinux/mfd/madera/core.hlinux/mfd/madera/registers.hmadera.h
Detected Declarations
function cs47l90_patchfunction cs47l90_is_adsp_memoryfunction cs47l90_16bit_readable_registerfunction cs47l90_16bit_volatile_registerfunction cs47l90_32bit_readable_registerfunction cs47l90_32bit_volatile_registerexport cs47l90_patchexport cs47l90_16bit_spi_regmapexport cs47l90_16bit_i2c_regmapexport cs47l90_32bit_spi_regmapexport cs47l90_32bit_i2c_regmap
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-only
/*
* Regmap tables for CS47L90 codec
*
* Copyright (C) 2015-2017 Cirrus Logic
*/
#include <linux/device.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/mfd/madera/core.h>
#include <linux/mfd/madera/registers.h>
#include "madera.h"
static const struct reg_sequence cs47l90_reva_16_patch[] = {
{ 0x8A, 0x5555 },
{ 0x8A, 0xAAAA },
{ 0x4CF, 0x0700 },
{ 0x171, 0x0003 },
{ 0x101, 0x0444 },
{ 0x159, 0x0002 },
{ 0x120, 0x0444 },
{ 0x1D1, 0x0004 },
{ 0x1E0, 0xC084 },
{ 0x159, 0x0000 },
{ 0x120, 0x0404 },
{ 0x101, 0x0404 },
{ 0x171, 0x0002 },
{ 0x17A, 0x2906 },
{ 0x19A, 0x2906 },
{ 0x441, 0xC750 },
{ 0x340, 0x0001 },
{ 0x112, 0x0405 },
{ 0x124, 0x0C49 },
{ 0x1300, 0x050E },
{ 0x1302, 0x0101 },
{ 0x1380, 0x0425 },
{ 0x1381, 0xF6D8 },
{ 0x1382, 0x0632 },
{ 0x1383, 0xFEC8 },
{ 0x1390, 0x042F },
{ 0x1391, 0xF6CA },
{ 0x1392, 0x0637 },
{ 0x1393, 0xFEC8 },
{ 0x281, 0x0000 },
{ 0x282, 0x0000 },
{ 0x4EA, 0x0100 },
{ 0x8A, 0xCCCC },
{ 0x8A, 0x3333 },
};
int cs47l90_patch(struct madera *madera)
{
int ret;
ret = regmap_register_patch(madera->regmap,
cs47l90_reva_16_patch,
ARRAY_SIZE(cs47l90_reva_16_patch));
if (ret < 0) {
dev_err(madera->dev,
"Error in applying 16-bit patch: %d\n", ret);
return ret;
}
return 0;
}
EXPORT_SYMBOL_GPL(cs47l90_patch);
static const struct reg_default cs47l90_reg_default[] = {
{ 0x00000020, 0x0000 }, /* R32 (0x20) - Tone Generator 1 */
{ 0x00000021, 0x1000 }, /* R33 (0x21) - Tone Generator 2 */
{ 0x00000022, 0x0000 }, /* R34 (0x22) - Tone Generator 3 */
{ 0x00000023, 0x1000 }, /* R35 (0x23) - Tone Generator 4 */
{ 0x00000024, 0x0000 }, /* R36 (0x24) - Tone Generator 5 */
{ 0x00000030, 0x0000 }, /* R48 (0x30) - PWM Drive 1 */
{ 0x00000031, 0x0100 }, /* R49 (0x31) - PWM Drive 2 */
{ 0x00000032, 0x0100 }, /* R50 (0x32) - PWM Drive 3 */
{ 0x00000061, 0x01ff }, /* R97 (0x61) - Sample Rate Sequence Select 1 */
{ 0x00000062, 0x01ff }, /* R98 (0x62) - Sample Rate Sequence Select 2 */
{ 0x00000063, 0x01ff }, /* R99 (0x63) - Sample Rate Sequence Select 3 */
{ 0x00000064, 0x01ff }, /* R100 (0x64) - Sample Rate Sequence Select 4 */
{ 0x00000066, 0x01ff }, /* R102 (0x66) - Always On Triggers Sequence Select 1 */
{ 0x00000067, 0x01ff }, /* R103 (0x67) - Always On Triggers Sequence Select 2 */
{ 0x00000090, 0x0000 }, /* R144 (0x90) - Haptics Control 1 */
{ 0x00000091, 0x7fff }, /* R145 (0x91) - Haptics Control 2 */
{ 0x00000092, 0x0000 }, /* R146 (0x92) - Haptics phase 1 intensity */
{ 0x00000093, 0x0000 }, /* R147 (0x93) - Haptics phase 1 duration */
{ 0x00000094, 0x0000 }, /* R148 (0x94) - Haptics phase 2 intensity */
Annotation
- Immediate include surface: `linux/device.h`, `linux/module.h`, `linux/regmap.h`, `linux/mfd/madera/core.h`, `linux/mfd/madera/registers.h`, `madera.h`.
- Detected declarations: `function cs47l90_patch`, `function cs47l90_is_adsp_memory`, `function cs47l90_16bit_readable_register`, `function cs47l90_16bit_volatile_register`, `function cs47l90_32bit_readable_register`, `function cs47l90_32bit_volatile_register`, `export cs47l90_patch`, `export cs47l90_16bit_spi_regmap`, `export cs47l90_16bit_i2c_regmap`, `export cs47l90_32bit_spi_regmap`.
- Atlas domain: Driver Families / drivers/mfd.
- 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.