Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b18fec9f authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32',...

Merge remote-tracking branches 'asoc/topic/const', 'asoc/topic/cs35l32', 'asoc/topic/cs4265' and 'asoc/topic/cs42l52' into asoc-next
Loading
Loading
Loading
Loading
+9 −48
Original line number Diff line number Diff line
@@ -74,33 +74,8 @@ static const struct reg_default cs35l32_reg_defaults[] = {
static bool cs35l32_readable_register(struct device *dev, unsigned int reg)
{
	switch (reg) {
	case CS35L32_DEVID_AB:
	case CS35L32_DEVID_CD:
	case CS35L32_DEVID_E:
	case CS35L32_FAB_ID:
	case CS35L32_REV_ID:
	case CS35L32_PWRCTL1:
	case CS35L32_PWRCTL2:
	case CS35L32_CLK_CTL:
	case CS35L32_BATT_THRESHOLD:
	case CS35L32_VMON:
	case CS35L32_BST_CPCP_CTL:
	case CS35L32_IMON_SCALING:
	case CS35L32_AUDIO_LED_MNGR:
	case CS35L32_ADSP_CTL:
	case CS35L32_CLASSD_CTL:
	case CS35L32_PROTECT_CTL:
	case CS35L32_INT_MASK_1:
	case CS35L32_INT_MASK_2:
	case CS35L32_INT_MASK_3:
	case CS35L32_INT_STATUS_1:
	case CS35L32_INT_STATUS_2:
	case CS35L32_INT_STATUS_3:
	case CS35L32_LED_STATUS:
	case CS35L32_FLASH_MODE:
	case CS35L32_MOVIE_MODE:
	case CS35L32_FLASH_TIMER:
	case CS35L32_FLASH_INHIBIT:
	case CS35L32_DEVID_AB ... CS35L32_AUDIO_LED_MNGR:
	case CS35L32_ADSP_CTL ... CS35L32_FLASH_INHIBIT:
		return true;
	default:
		return false;
@@ -110,15 +85,8 @@ static bool cs35l32_readable_register(struct device *dev, unsigned int reg)
static bool cs35l32_volatile_register(struct device *dev, unsigned int reg)
{
	switch (reg) {
	case CS35L32_DEVID_AB:
	case CS35L32_DEVID_CD:
	case CS35L32_DEVID_E:
	case CS35L32_FAB_ID:
	case CS35L32_REV_ID:
	case CS35L32_INT_STATUS_1:
	case CS35L32_INT_STATUS_2:
	case CS35L32_INT_STATUS_3:
	case CS35L32_LED_STATUS:
	case CS35L32_DEVID_AB ... CS35L32_REV_ID:
	case CS35L32_INT_STATUS_1 ... CS35L32_LED_STATUS:
		return true;
	default:
		return false;
@@ -128,10 +96,7 @@ static bool cs35l32_volatile_register(struct device *dev, unsigned int reg)
static bool cs35l32_precious_register(struct device *dev, unsigned int reg)
{
	switch (reg) {
	case CS35L32_INT_STATUS_1:
	case CS35L32_INT_STATUS_2:
	case CS35L32_INT_STATUS_3:
	case CS35L32_LED_STATUS:
	case CS35L32_INT_STATUS_1 ... CS35L32_LED_STATUS:
		return true;
	default:
		return false;
@@ -441,7 +406,6 @@ static int cs35l32_i2c_probe(struct i2c_client *i2c_client,
	if (IS_ERR(cs35l32->reset_gpio))
		return PTR_ERR(cs35l32->reset_gpio);

	if (cs35l32->reset_gpio)
	gpiod_set_value_cansleep(cs35l32->reset_gpio, 1);

	/* initialize codec */
@@ -536,7 +500,6 @@ static int cs35l32_i2c_remove(struct i2c_client *i2c_client)
	snd_soc_unregister_codec(&i2c_client->dev);

	/* Hold down reset */
	if (cs35l32->reset_gpio)
	gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);

	return 0;
@@ -551,7 +514,6 @@ static int cs35l32_runtime_suspend(struct device *dev)
	regcache_mark_dirty(cs35l32->regmap);

	/* Hold down reset */
	if (cs35l32->reset_gpio)
	gpiod_set_value_cansleep(cs35l32->reset_gpio, 0);

	/* remove power */
@@ -575,7 +537,6 @@ static int cs35l32_runtime_resume(struct device *dev)
		return ret;
	}

	if (cs35l32->reset_gpio)
	gpiod_set_value_cansleep(cs35l32->reset_gpio, 1);

	regcache_cache_only(cs35l32->regmap, false);
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ struct cs35l32_platform_data {
#define CS35L32_GAIN_MGR_MASK		0x08
#define CS35L32_ADSP_SHARE_MASK		0x08
#define CS35L32_ADSP_DATACFG_MASK	0x30
#define CS35L32_SDOUT_3ST		0x80
#define CS35L32_SDOUT_3ST		0x08
#define CS35L32_BATT_REC_MASK		0x0E
#define CS35L32_BATT_THRESH_MASK	0x30

+1 −17
Original line number Diff line number Diff line
@@ -60,23 +60,7 @@ static const struct reg_default cs4265_reg_defaults[] = {
static bool cs4265_readable_register(struct device *dev, unsigned int reg)
{
	switch (reg) {
	case CS4265_PWRCTL:
	case CS4265_DAC_CTL:
	case CS4265_ADC_CTL:
	case CS4265_MCLK_FREQ:
	case CS4265_SIG_SEL:
	case CS4265_CHB_PGA_CTL:
	case CS4265_CHA_PGA_CTL:
	case CS4265_ADC_CTL2:
	case CS4265_DAC_CHA_VOL:
	case CS4265_DAC_CHB_VOL:
	case CS4265_DAC_CTL2:
	case CS4265_SPDIF_CTL1:
	case CS4265_SPDIF_CTL2:
	case CS4265_INT_MASK:
	case CS4265_STATUS_MODE_MSB:
	case CS4265_STATUS_MODE_LSB:
	case CS4265_CHIP_ID:
	case CS4265_CHIP_ID ... CS4265_SPDIF_CTL2:
		return true;
	default:
		return false;
+2 −53
Original line number Diff line number Diff line
@@ -110,58 +110,7 @@ static const struct reg_default cs42l52_reg_defaults[] = {
static bool cs42l52_readable_register(struct device *dev, unsigned int reg)
{
	switch (reg) {
	case CS42L52_CHIP:
	case CS42L52_PWRCTL1:
	case CS42L52_PWRCTL2:
	case CS42L52_PWRCTL3:
	case CS42L52_CLK_CTL:
	case CS42L52_IFACE_CTL1:
	case CS42L52_IFACE_CTL2:
	case CS42L52_ADC_PGA_A:
	case CS42L52_ADC_PGA_B:
	case CS42L52_ANALOG_HPF_CTL:
	case CS42L52_ADC_HPF_FREQ:
	case CS42L52_ADC_MISC_CTL:
	case CS42L52_PB_CTL1:
	case CS42L52_MISC_CTL:
	case CS42L52_PB_CTL2:
	case CS42L52_MICA_CTL:
	case CS42L52_MICB_CTL:
	case CS42L52_PGAA_CTL:
	case CS42L52_PGAB_CTL:
	case CS42L52_PASSTHRUA_VOL:
	case CS42L52_PASSTHRUB_VOL:
	case CS42L52_ADCA_VOL:
	case CS42L52_ADCB_VOL:
	case CS42L52_ADCA_MIXER_VOL:
	case CS42L52_ADCB_MIXER_VOL:
	case CS42L52_PCMA_MIXER_VOL:
	case CS42L52_PCMB_MIXER_VOL:
	case CS42L52_BEEP_FREQ:
	case CS42L52_BEEP_VOL:
	case CS42L52_BEEP_TONE_CTL:
	case CS42L52_TONE_CTL:
	case CS42L52_MASTERA_VOL:
	case CS42L52_MASTERB_VOL:
	case CS42L52_HPA_VOL:
	case CS42L52_HPB_VOL:
	case CS42L52_SPKA_VOL:
	case CS42L52_SPKB_VOL:
	case CS42L52_ADC_PCM_MIXER:
	case CS42L52_LIMITER_CTL1:
	case CS42L52_LIMITER_CTL2:
	case CS42L52_LIMITER_AT_RATE:
	case CS42L52_ALC_CTL:
	case CS42L52_ALC_RATE:
	case CS42L52_ALC_THRESHOLD:
	case CS42L52_NOISE_GATE_CTL:
	case CS42L52_CLK_STATUS:
	case CS42L52_BATT_COMPEN:
	case CS42L52_BATT_LEVEL:
	case CS42L52_SPK_STATUS:
	case CS42L52_TEM_CTL:
	case CS42L52_THE_FOLDBACK:
	case CS42L52_CHARGE_PUMP:
	case CS42L52_CHIP ... CS42L52_CHARGE_PUMP:
		return true;
	default:
		return false;
@@ -919,7 +868,7 @@ static int cs42l52_set_bias_level(struct snd_soc_codec *codec,
			SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_U20_3LE | \
			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_U24_LE)

static struct snd_soc_dai_ops cs42l52_ops = {
static const struct snd_soc_dai_ops cs42l52_ops = {
	.hw_params	= cs42l52_pcm_hw_params,
	.digital_mute	= cs42l52_digital_mute,
	.set_fmt	= cs42l52_set_fmt,
+1 −1
Original line number Diff line number Diff line
@@ -989,7 +989,7 @@ static int cs42l56_set_bias_level(struct snd_soc_codec *codec,
			SNDRV_PCM_FMTBIT_S32_LE)


static struct snd_soc_dai_ops cs42l56_ops = {
static const struct snd_soc_dai_ops cs42l56_ops = {
	.hw_params	= cs42l56_pcm_hw_params,
	.digital_mute	= cs42l56_digital_mute,
	.set_fmt	= cs42l56_set_dai_fmt,
Loading