]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/sound/soc.h
ARM: shmobile: Use shmobile_init_late() on r8a7790 DT-only
[karo-tx-linux.git] / include / sound / soc.h
index f7f32c03bf9168e204d918531cccd6d4adaab1c6..ed9e2d7e5fdc531cd8a8cb846fcc2204f01131db 100644 (file)
@@ -452,6 +452,9 @@ int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage);
 #ifdef CONFIG_GPIOLIB
 int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
                        struct snd_soc_jack_gpio *gpios);
+int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
+                           struct snd_soc_jack *jack,
+                           int count, struct snd_soc_jack_gpio *gpios);
 void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
                        struct snd_soc_jack_gpio *gpios);
 #else
@@ -461,6 +464,14 @@ static inline int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
        return 0;
 }
 
+static inline int snd_soc_jack_add_gpiods(struct device *gpiod_dev,
+                                         struct snd_soc_jack *jack,
+                                         int count,
+                                         struct snd_soc_jack_gpio *gpios)
+{
+       return 0;
+}
+
 static inline void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
                                           struct snd_soc_jack_gpio *gpios)
 {
@@ -587,8 +598,12 @@ struct snd_soc_jack_zone {
 /**
  * struct snd_soc_jack_gpio - Describes a gpio pin for jack detection
  *
- * @gpio:         gpio number
- * @name:         gpio name
+ * @gpio:         legacy gpio number
+ * @idx:          gpio descriptor index within the function of the GPIO
+ *                consumer device
+ * @gpiod_dev     GPIO consumer device
+ * @name:         gpio name. Also as connection ID for the GPIO consumer
+ *                device function name lookup
  * @report:       value to report when jack detected
  * @invert:       report presence in low state
  * @debouce_time: debouce time in ms
@@ -599,6 +614,8 @@ struct snd_soc_jack_zone {
  */
 struct snd_soc_jack_gpio {
        unsigned int gpio;
+       unsigned int idx;
+       struct device *gpiod_dev;
        const char *name;
        int report;
        int invert;
@@ -607,6 +624,7 @@ struct snd_soc_jack_gpio {
 
        struct snd_soc_jack *jack;
        struct delayed_work work;
+       struct gpio_desc *desc;
 
        void *data;
        int (*jack_status_check)(void *data);