Add the ability to get the clock for each clock input pin of the chip and enable MCLK2 since that is expected to be a permanently enabled 32kHz clock.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -8,6 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | #ifndef MADERA_CORE_H |
| 9 | 9 | #define MADERA_CORE_H |
| 10 | 10 | |
| 11 | +#include <linux/clk.h> | |
| 11 | 12 | #include <linux/gpio/consumer.h> |
| 12 | 13 | #include <linux/interrupt.h> |
| 13 | 14 | #include <linux/mfd/madera/pdata.h> |
| @@ -29,6 +30,13 @@ enum madera_type { · 15 unmodified lines | ||
| 29 | 30 | CS42L92 = 9, |
| 30 | 31 | }; |
| 31 | 32 | |
| 33 | +enum { | |
| 34 | + MADERA_MCLK1, | |
| 35 | + MADERA_MCLK2, | |
| 36 | + MADERA_MCLK3, | |
| 37 | + MADERA_NUM_MCLK | |
| 38 | +}; | |
| 39 | + | |
| 32 | 40 | #define MADERA_MAX_CORE_SUPPLIES 2 |
| 33 | 41 | #define MADERA_MAX_GPIOS 40 |
| 34 | 42 | |
| @@ -155,6 +163,7 @@ struct snd_soc_dapm_context; · 120 unmodified lines | ||
| 155 | 163 | * @irq_dev: the irqchip child driver device |
| 156 | 164 | * @irq_data: pointer to irqchip data for the child irqchip driver |
| 157 | 165 | * @irq: host irq number from SPI or I2C configuration |
| 166 | + * @mclk: Structure holding clock supplies | |
| 158 | 167 | * @out_clamp: indicates output clamp state for each analogue output |
| 159 | 168 | * @out_shorted: indicates short circuit state for each analogue output |
| 160 | 169 | * @hp_ena: bitflags of enable state for the headphone outputs |
| @@ -184,6 +193,8 @@ struct madera { · 23 unmodified lines | ||
| 184 | 193 | struct regmap_irq_chip_data *irq_data; |
| 185 | 194 | int irq; |
| 186 | 195 | |
| 196 | + struct clk_bulk_data mclk[MADERA_NUM_MCLK]; | |
| 197 | + | |
| 187 | 198 | unsigned int num_micbias; |
| 188 | 199 | unsigned int num_childbias[MADERA_MAX_MICBIAS]; |
| 189 | 200 | |