diff options
-rw-r--r-- | sound/soc/codecs/cs4271.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 96c309777208..aef4965750c7 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c | |||
@@ -612,22 +612,6 @@ static struct snd_soc_codec_driver soc_codec_dev_cs4271 = { | |||
612 | .num_dapm_routes = ARRAY_SIZE(cs4271_dapm_routes), | 612 | .num_dapm_routes = ARRAY_SIZE(cs4271_dapm_routes), |
613 | }; | 613 | }; |
614 | 614 | ||
615 | #if defined(CONFIG_SPI_MASTER) | ||
616 | |||
617 | static const struct regmap_config cs4271_spi_regmap = { | ||
618 | .reg_bits = 16, | ||
619 | .val_bits = 8, | ||
620 | .max_register = CS4271_LASTREG, | ||
621 | .read_flag_mask = 0x21, | ||
622 | .write_flag_mask = 0x20, | ||
623 | |||
624 | .reg_defaults = cs4271_reg_defaults, | ||
625 | .num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults), | ||
626 | .cache_type = REGCACHE_RBTREE, | ||
627 | |||
628 | .volatile_reg = cs4271_volatile_reg, | ||
629 | }; | ||
630 | |||
631 | static int cs4271_common_probe(struct device *dev, | 615 | static int cs4271_common_probe(struct device *dev, |
632 | struct cs4271_private **c) | 616 | struct cs4271_private **c) |
633 | { | 617 | { |
@@ -658,6 +642,22 @@ static int cs4271_common_probe(struct device *dev, | |||
658 | return 0; | 642 | return 0; |
659 | } | 643 | } |
660 | 644 | ||
645 | #if defined(CONFIG_SPI_MASTER) | ||
646 | |||
647 | static const struct regmap_config cs4271_spi_regmap = { | ||
648 | .reg_bits = 16, | ||
649 | .val_bits = 8, | ||
650 | .max_register = CS4271_LASTREG, | ||
651 | .read_flag_mask = 0x21, | ||
652 | .write_flag_mask = 0x20, | ||
653 | |||
654 | .reg_defaults = cs4271_reg_defaults, | ||
655 | .num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults), | ||
656 | .cache_type = REGCACHE_RBTREE, | ||
657 | |||
658 | .volatile_reg = cs4271_volatile_reg, | ||
659 | }; | ||
660 | |||
661 | static int cs4271_spi_probe(struct spi_device *spi) | 661 | static int cs4271_spi_probe(struct spi_device *spi) |
662 | { | 662 | { |
663 | struct cs4271_private *cs4271; | 663 | struct cs4271_private *cs4271; |