summaryrefslogtreecommitdiff
path: root/rust/helpers/pci.c
diff options
context:
space:
mode:
authorNuno Sá <nuno.sa@analog.com>2025-07-01 15:32:01 +0100
committerLee Jones <lee@kernel.org>2025-07-01 21:50:50 +0100
commit1a4eabf662543c62ae1e71a26d1c8e6643c66388 (patch)
tree9aaa8298a255350b06fbabdccc61bb7058fff1fa /rust/helpers/pci.c
parente65e2b0d0f7e75c40f426e0f3e0a1bb6faff93e6 (diff)
mfd: adp5585: Refactor how regmap defaults are handled
The only thing changing between variants is the regmap default registers. Hence, instead of having a regmap configuration for every variant (duplicating lots of fields), add a chip info type of structure with a regmap ID to identify which defaults to use and populate regmap_config at runtime given a template plus the id. Also note that between variants, the defaults can be the same which means the chip info structure can be used in more than one compatible. This will also make it simpler adding new chips with more variants. Also note that the chip info structures are deliberately not const as they will also contain lots of members that are the same between the different devices variants and so we will fill those at runtime. Signed-off-by: Nuno Sá <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20250701-dev-adp5589-fw-v7-6-b1fcfe9e9826@analog.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'rust/helpers/pci.c')
0 files changed, 0 insertions, 0 deletions