diff options
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/cros_ec_commands.h | 94 | ||||
| -rw-r--r-- | include/linux/mfd/ingenic-tcu.h | 2 | ||||
| -rw-r--r-- | include/linux/mfd/madera/core.h | 7 | ||||
| -rw-r--r-- | include/linux/mfd/ti_am335x_tscadc.h | 4 | ||||
| -rw-r--r-- | include/linux/mfd/tmio.h | 2 |
5 files changed, 107 insertions, 2 deletions
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h index 9a9631f0559e..fc91082d4c35 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h | |||
| @@ -2791,6 +2791,100 @@ struct ec_response_battery_vendor_param { | |||
| 2791 | } __packed; | 2791 | } __packed; |
| 2792 | 2792 | ||
| 2793 | /*****************************************************************************/ | 2793 | /*****************************************************************************/ |
| 2794 | /* Commands for I2S recording on audio codec. */ | ||
| 2795 | |||
| 2796 | #define EC_CMD_CODEC_I2S 0x00BC | ||
| 2797 | |||
| 2798 | enum ec_codec_i2s_subcmd { | ||
| 2799 | EC_CODEC_SET_SAMPLE_DEPTH = 0x0, | ||
| 2800 | EC_CODEC_SET_GAIN = 0x1, | ||
| 2801 | EC_CODEC_GET_GAIN = 0x2, | ||
| 2802 | EC_CODEC_I2S_ENABLE = 0x3, | ||
| 2803 | EC_CODEC_I2S_SET_CONFIG = 0x4, | ||
| 2804 | EC_CODEC_I2S_SET_TDM_CONFIG = 0x5, | ||
| 2805 | EC_CODEC_I2S_SET_BCLK = 0x6, | ||
| 2806 | }; | ||
| 2807 | |||
| 2808 | enum ec_sample_depth_value { | ||
| 2809 | EC_CODEC_SAMPLE_DEPTH_16 = 0, | ||
| 2810 | EC_CODEC_SAMPLE_DEPTH_24 = 1, | ||
| 2811 | }; | ||
| 2812 | |||
| 2813 | enum ec_i2s_config { | ||
| 2814 | EC_DAI_FMT_I2S = 0, | ||
| 2815 | EC_DAI_FMT_RIGHT_J = 1, | ||
| 2816 | EC_DAI_FMT_LEFT_J = 2, | ||
| 2817 | EC_DAI_FMT_PCM_A = 3, | ||
| 2818 | EC_DAI_FMT_PCM_B = 4, | ||
| 2819 | EC_DAI_FMT_PCM_TDM = 5, | ||
| 2820 | }; | ||
| 2821 | |||
| 2822 | struct ec_param_codec_i2s { | ||
| 2823 | /* | ||
| 2824 | * enum ec_codec_i2s_subcmd | ||
| 2825 | */ | ||
| 2826 | uint8_t cmd; | ||
| 2827 | union { | ||
| 2828 | /* | ||
| 2829 | * EC_CODEC_SET_SAMPLE_DEPTH | ||
| 2830 | * Value should be one of ec_sample_depth_value. | ||
| 2831 | */ | ||
| 2832 | uint8_t depth; | ||
| 2833 | |||
| 2834 | /* | ||
| 2835 | * EC_CODEC_SET_GAIN | ||
| 2836 | * Value should be 0~43 for both channels. | ||
| 2837 | */ | ||
| 2838 | struct ec_param_codec_i2s_set_gain { | ||
| 2839 | uint8_t left; | ||
| 2840 | uint8_t right; | ||
| 2841 | } __packed gain; | ||
| 2842 | |||
| 2843 | /* | ||
| 2844 | * EC_CODEC_I2S_ENABLE | ||
| 2845 | * 1 to enable, 0 to disable. | ||
| 2846 | */ | ||
| 2847 | uint8_t i2s_enable; | ||
| 2848 | |||
| 2849 | /* | ||
| 2850 | * EC_CODEC_I2S_SET_COFNIG | ||
| 2851 | * Value should be one of ec_i2s_config. | ||
| 2852 | */ | ||
| 2853 | uint8_t i2s_config; | ||
| 2854 | |||
| 2855 | /* | ||
| 2856 | * EC_CODEC_I2S_SET_TDM_CONFIG | ||
| 2857 | * Value should be one of ec_i2s_config. | ||
| 2858 | */ | ||
| 2859 | struct ec_param_codec_i2s_tdm { | ||
| 2860 | /* | ||
| 2861 | * 0 to 496 | ||
| 2862 | */ | ||
| 2863 | int16_t ch0_delay; | ||
| 2864 | /* | ||
| 2865 | * -1 to 496 | ||
| 2866 | */ | ||
| 2867 | int16_t ch1_delay; | ||
| 2868 | uint8_t adjacent_to_ch0; | ||
| 2869 | uint8_t adjacent_to_ch1; | ||
| 2870 | } __packed tdm_param; | ||
| 2871 | |||
| 2872 | /* | ||
| 2873 | * EC_CODEC_I2S_SET_BCLK | ||
| 2874 | */ | ||
| 2875 | uint32_t bclk; | ||
| 2876 | }; | ||
| 2877 | } __packed; | ||
| 2878 | |||
| 2879 | /* | ||
| 2880 | * For subcommand EC_CODEC_GET_GAIN. | ||
| 2881 | */ | ||
| 2882 | struct ec_response_codec_gain { | ||
| 2883 | uint8_t left; | ||
| 2884 | uint8_t right; | ||
| 2885 | } __packed; | ||
| 2886 | |||
| 2887 | /*****************************************************************************/ | ||
| 2794 | /* System commands */ | 2888 | /* System commands */ |
| 2795 | 2889 | ||
| 2796 | /* | 2890 | /* |
diff --git a/include/linux/mfd/ingenic-tcu.h b/include/linux/mfd/ingenic-tcu.h index ab16ad283def..2083fa20821d 100644 --- a/include/linux/mfd/ingenic-tcu.h +++ b/include/linux/mfd/ingenic-tcu.h | |||
| @@ -41,7 +41,7 @@ | |||
| 41 | #define TCU_TCSR_PRESCALE_LSB 3 | 41 | #define TCU_TCSR_PRESCALE_LSB 3 |
| 42 | #define TCU_TCSR_PRESCALE_MASK 0x38 | 42 | #define TCU_TCSR_PRESCALE_MASK 0x38 |
| 43 | 43 | ||
| 44 | #define TCU_TCSR_PWM_SD BIT(9) /* 0: Shutdown abruptly 1: gracefully */ | 44 | #define TCU_TCSR_PWM_SD BIT(9) /* 0: Shutdown gracefully 1: abruptly */ |
| 45 | #define TCU_TCSR_PWM_INITL_HIGH BIT(8) /* Sets the initial output level */ | 45 | #define TCU_TCSR_PWM_INITL_HIGH BIT(8) /* Sets the initial output level */ |
| 46 | #define TCU_TCSR_PWM_EN BIT(7) /* PWM pin output enable */ | 46 | #define TCU_TCSR_PWM_EN BIT(7) /* PWM pin output enable */ |
| 47 | 47 | ||
diff --git a/include/linux/mfd/madera/core.h b/include/linux/mfd/madera/core.h index fe69c0f4398f..4d5d51a9c8a6 100644 --- a/include/linux/mfd/madera/core.h +++ b/include/linux/mfd/madera/core.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include <linux/gpio/consumer.h> | 15 | #include <linux/gpio/consumer.h> |
| 16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
| 17 | #include <linux/mfd/madera/pdata.h> | 17 | #include <linux/mfd/madera/pdata.h> |
| 18 | #include <linux/mutex.h> | ||
| 18 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
| 19 | #include <linux/regmap.h> | 20 | #include <linux/regmap.h> |
| 20 | #include <linux/regulator/consumer.h> | 21 | #include <linux/regulator/consumer.h> |
| @@ -37,6 +38,8 @@ enum madera_type { | |||
| 37 | 38 | ||
| 38 | #define MADERA_MAX_MICBIAS 4 | 39 | #define MADERA_MAX_MICBIAS 4 |
| 39 | 40 | ||
| 41 | #define MADERA_MAX_HP_OUTPUT 3 | ||
| 42 | |||
| 40 | /* Notifier events */ | 43 | /* Notifier events */ |
| 41 | #define MADERA_NOTIFY_VOICE_TRIGGER 0x1 | 44 | #define MADERA_NOTIFY_VOICE_TRIGGER 0x1 |
| 42 | #define MADERA_NOTIFY_HPDET 0x2 | 45 | #define MADERA_NOTIFY_HPDET 0x2 |
| @@ -183,6 +186,10 @@ struct madera { | |||
| 183 | unsigned int num_childbias[MADERA_MAX_MICBIAS]; | 186 | unsigned int num_childbias[MADERA_MAX_MICBIAS]; |
| 184 | 187 | ||
| 185 | struct snd_soc_dapm_context *dapm; | 188 | struct snd_soc_dapm_context *dapm; |
| 189 | struct mutex dapm_ptr_lock; | ||
| 190 | unsigned int hp_ena; | ||
| 191 | bool out_clamp[MADERA_MAX_HP_OUTPUT]; | ||
| 192 | bool out_shorted[MADERA_MAX_HP_OUTPUT]; | ||
| 186 | 193 | ||
| 187 | struct blocking_notifier_head notifier; | 194 | struct blocking_notifier_head notifier; |
| 188 | }; | 195 | }; |
diff --git a/include/linux/mfd/ti_am335x_tscadc.h b/include/linux/mfd/ti_am335x_tscadc.h index b9a53e013bff..483168403ae5 100644 --- a/include/linux/mfd/ti_am335x_tscadc.h +++ b/include/linux/mfd/ti_am335x_tscadc.h | |||
| @@ -78,6 +78,8 @@ | |||
| 78 | #define STEPCONFIG_YNN BIT(8) | 78 | #define STEPCONFIG_YNN BIT(8) |
| 79 | #define STEPCONFIG_XNP BIT(9) | 79 | #define STEPCONFIG_XNP BIT(9) |
| 80 | #define STEPCONFIG_YPN BIT(10) | 80 | #define STEPCONFIG_YPN BIT(10) |
| 81 | #define STEPCONFIG_RFP(val) ((val) << 12) | ||
| 82 | #define STEPCONFIG_RFP_VREFP (0x3 << 12) | ||
| 81 | #define STEPCONFIG_INM_MASK (0xF << 15) | 83 | #define STEPCONFIG_INM_MASK (0xF << 15) |
| 82 | #define STEPCONFIG_INM(val) ((val) << 15) | 84 | #define STEPCONFIG_INM(val) ((val) << 15) |
| 83 | #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) | 85 | #define STEPCONFIG_INM_ADCREFM STEPCONFIG_INM(8) |
| @@ -86,6 +88,8 @@ | |||
| 86 | #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) | 88 | #define STEPCONFIG_INP_AN4 STEPCONFIG_INP(4) |
| 87 | #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) | 89 | #define STEPCONFIG_INP_ADCREFM STEPCONFIG_INP(8) |
| 88 | #define STEPCONFIG_FIFO1 BIT(26) | 90 | #define STEPCONFIG_FIFO1 BIT(26) |
| 91 | #define STEPCONFIG_RFM(val) ((val) << 23) | ||
| 92 | #define STEPCONFIG_RFM_VREFN (0x3 << 23) | ||
| 89 | 93 | ||
| 90 | /* Delay register */ | 94 | /* Delay register */ |
| 91 | #define STEPDELAY_OPEN_MASK (0x3FFFF << 0) | 95 | #define STEPDELAY_OPEN_MASK (0x3FFFF << 0) |
diff --git a/include/linux/mfd/tmio.h b/include/linux/mfd/tmio.h index e2687a30e5a1..739b7bf37eaa 100644 --- a/include/linux/mfd/tmio.h +++ b/include/linux/mfd/tmio.h | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | /* Some controllers have a CBSY bit */ | 79 | /* Some controllers have a CBSY bit */ |
| 80 | #define TMIO_MMC_HAVE_CBSY BIT(11) | 80 | #define TMIO_MMC_HAVE_CBSY BIT(11) |
| 81 | 81 | ||
| 82 | /* Some controllers that support HS400 use use 4 taps while others use 8. */ | 82 | /* Some controllers that support HS400 use 4 taps while others use 8. */ |
| 83 | #define TMIO_MMC_HAVE_4TAP_HS400 BIT(13) | 83 | #define TMIO_MMC_HAVE_4TAP_HS400 BIT(13) |
| 84 | 84 | ||
| 85 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); | 85 | int tmio_core_mmc_enable(void __iomem *cnf, int shift, unsigned long base); |
