[alsa-devel] [PATCH 3/3] ASoC: fsl_ssi: remove register defaults
Timur Tabi
timur at tabi.org
Sun Jan 17 01:10:53 CET 2016
Maciej S. Szmigiero wrote:
> +static const struct regmap_config fsl_ssi_regconfig_imx21 = {
> + .max_register = CCSR_SSI_SRMSK,
> + .reg_bits = 32,
> + .val_bits = 32,
> + .reg_stride = 4,
> + .val_format_endian = REGMAP_ENDIAN_NATIVE,
> + .num_reg_defaults_raw = CCSR_SSI_SRMSK / 4 + 1,
> + .readable_reg = fsl_ssi_readable_reg,
> + .volatile_reg = fsl_ssi_volatile_reg,
> + .precious_reg = fsl_ssi_precious_reg,
> + .writeable_reg = fsl_ssi_writeable_reg,
> + .cache_type = REGCACHE_RBTREE,
> +};
> +
> static const struct regmap_config fsl_ssi_regconfig = {
> .max_register = CCSR_SSI_SACCDIS,
> .reg_bits = 32,
> .val_bits = 32,
> .reg_stride = 4,
> .val_format_endian = REGMAP_ENDIAN_NATIVE,
> - .reg_defaults = fsl_ssi_reg_defaults,
> - .num_reg_defaults = ARRAY_SIZE(fsl_ssi_reg_defaults),
> + .num_reg_defaults_raw = CCSR_SSI_SACCDIS / 4 + 1,
> .readable_reg = fsl_ssi_readable_reg,
> .volatile_reg = fsl_ssi_volatile_reg,
> .precious_reg = fsl_ssi_precious_reg,
Is this really necessary? Why do we need separate register configs for
one specific SOC? There are already too many "if
(some_stupid_imx_variant)" blocks in this driver.
More information about the Alsa-devel
mailing list