Merge remote-tracking branch 'asoc/topic/dapm-pin' into asoc-next
authorMark Brown <broonie@kernel.org>
Mon, 12 Dec 2016 15:52:45 +0000 (15:52 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 12 Dec 2016 15:52:45 +0000 (15:52 +0000)
1  2 
include/sound/soc.h

diff --combined include/sound/soc.h
index 13cc64e5bb7786ecdd14b1ce5b373e0cb13ad012,a26c651cb1ee88fa2696a19ca572b23b00d75347..ad671b359609d8d13a4f059acc0a746073218336
@@@ -782,8 -782,6 +782,8 @@@ struct snd_soc_component_driver 
  
        int (*probe)(struct snd_soc_component *);
        void (*remove)(struct snd_soc_component *);
 +      int (*suspend)(struct snd_soc_component *);
 +      int (*resume)(struct snd_soc_component *);
  
        /* DT */
        int (*of_xlate_dai_name)(struct snd_soc_component *component,
@@@ -809,11 -807,9 +809,11 @@@ struct snd_soc_component 
  
        unsigned int ignore_pmdown_time:1; /* pmdown_time is ignored at stop */
        unsigned int registered_as_component:1;
 +      unsigned int auxiliary:1; /* for auxiliary component of the card */
 +      unsigned int suspended:1; /* is in suspend PM state */
  
        struct list_head list;
 -      struct list_head list_aux; /* for auxiliary component of the card */
 +      struct list_head card_list;
  
        struct snd_soc_dai_driver *dai_drv;
        int num_dai;
  
        int (*probe)(struct snd_soc_component *);
        void (*remove)(struct snd_soc_component *);
 +      int (*suspend)(struct snd_soc_component *);
 +      int (*resume)(struct snd_soc_component *);
  
        /* machine specific init */
        int (*init)(struct snd_soc_component *component);
@@@ -874,9 -868,11 +874,9 @@@ struct snd_soc_codec 
        const struct snd_soc_codec_driver *driver;
  
        struct list_head list;
 -      struct list_head card_list;
  
        /* runtime */
        unsigned int cache_bypass:1; /* Suppress access to the cache */
 -      unsigned int suspended:1; /* Codec is in suspend PM state */
        unsigned int cache_init:1; /* codec cache has been initialized */
  
        /* codec IO */
@@@ -1152,6 -1148,7 +1152,6 @@@ struct snd_soc_card 
         */
        struct snd_soc_aux_dev *aux_dev;
        int num_aux_devs;
 -      struct list_head aux_comp_list;
  
        const struct snd_kcontrol_new *controls;
        int num_controls;
        struct work_struct deferred_resume_work;
  
        /* lists of probed devices belonging to this card */
 -      struct list_head codec_dev_list;
 +      struct list_head component_dev_list;
  
        struct list_head widgets;
        struct list_head paths;
@@@ -1222,6 -1219,7 +1222,6 @@@ struct snd_soc_pcm_runtime 
        struct snd_soc_platform *platform;
        struct snd_soc_dai *codec_dai;
        struct snd_soc_dai *cpu_dai;
 -      struct snd_soc_component *component; /* Only valid for AUX dev rtds */
  
        struct snd_soc_dai **codec_dais;
        unsigned int num_codecs;
@@@ -1543,10 -1541,11 +1543,10 @@@ static inline void *snd_soc_platform_ge
  
  static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
  {
 -      INIT_LIST_HEAD(&card->codec_dev_list);
        INIT_LIST_HEAD(&card->widgets);
        INIT_LIST_HEAD(&card->paths);
        INIT_LIST_HEAD(&card->dapm_list);
 -      INIT_LIST_HEAD(&card->aux_comp_list);
 +      INIT_LIST_HEAD(&card->component_dev_list);
  }
  
  static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
@@@ -1698,4 -1697,24 +1698,24 @@@ static inline void snd_soc_dapm_mutex_u
        mutex_unlock(&dapm->card->dapm_mutex);
  }
  
+ int snd_soc_component_enable_pin(struct snd_soc_component *component,
+                                const char *pin);
+ int snd_soc_component_enable_pin_unlocked(struct snd_soc_component *component,
+                                         const char *pin);
+ int snd_soc_component_disable_pin(struct snd_soc_component *component,
+                                 const char *pin);
+ int snd_soc_component_disable_pin_unlocked(struct snd_soc_component *component,
+                                          const char *pin);
+ int snd_soc_component_nc_pin(struct snd_soc_component *component,
+                            const char *pin);
+ int snd_soc_component_nc_pin_unlocked(struct snd_soc_component *component,
+                                     const char *pin);
+ int snd_soc_component_get_pin_status(struct snd_soc_component *component,
+                                    const char *pin);
+ int snd_soc_component_force_enable_pin(struct snd_soc_component *component,
+                                      const char *pin);
+ int snd_soc_component_force_enable_pin_unlocked(
+                                       struct snd_soc_component *component,
+                                       const char *pin);
  #endif