aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_micfil.c
diff options
context:
space:
mode:
authorSascha Hauer2022-04-14 18:22:32 +0200
committerMark Brown2022-04-19 12:06:12 +0100
commitbd2cffd10d79eb9280cb8f5b7cb441f206c1e6ac (patch)
tree383a0ba8c730304f50e27cfda17e1c0ae5bcce32 /sound/soc/fsl/fsl_micfil.c
parent3ff84e3dd180c368981b2d58ed50f17a47471828 (diff)
ASoC: fsl_micfil: do not define SHIFT/MASK for single bits
No need to have defines for the mask of single bits. Also shift is unused. Drop all these unnecessary defines. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220414162249.3934543-5-s.hauer@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/fsl/fsl_micfil.c')
-rw-r--r--sound/soc/fsl/fsl_micfil.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 5353474d0ff2..878d24fde358 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -170,7 +170,7 @@ static int fsl_micfil_reset(struct device *dev)
ret = regmap_update_bits(micfil->regmap,
REG_MICFIL_CTRL1,
- MICFIL_CTRL1_MDIS_MASK,
+ MICFIL_CTRL1_MDIS,
0);
if (ret) {
dev_err(dev, "failed to clear MDIS bit %d\n", ret);
@@ -179,7 +179,7 @@ static int fsl_micfil_reset(struct device *dev)
ret = regmap_update_bits(micfil->regmap,
REG_MICFIL_CTRL1,
- MICFIL_CTRL1_SRES_MASK,
+ MICFIL_CTRL1_SRES,
MICFIL_CTRL1_SRES);
if (ret) {
dev_err(dev, "failed to reset MICFIL: %d\n", ret);
@@ -253,7 +253,7 @@ static int fsl_micfil_trigger(struct snd_pcm_substream *substream, int cmd,
/* Enable the module */
ret = regmap_update_bits(micfil->regmap, REG_MICFIL_CTRL1,
- MICFIL_CTRL1_PDMIEN_MASK,
+ MICFIL_CTRL1_PDMIEN,
MICFIL_CTRL1_PDMIEN);
if (ret) {
dev_err(dev, "failed to enable the module\n");
@@ -266,7 +266,7 @@ static int fsl_micfil_trigger(struct snd_pcm_substream *substream, int cmd,
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
/* Disable the module */
ret = regmap_update_bits(micfil->regmap, REG_MICFIL_CTRL1,
- MICFIL_CTRL1_PDMIEN_MASK,
+ MICFIL_CTRL1_PDMIEN,
0);
if (ret) {
dev_err(dev, "failed to enable the module\n");
@@ -332,7 +332,7 @@ static int fsl_micfil_hw_params(struct snd_pcm_substream *substream,
/* 1. Disable the module */
ret = regmap_update_bits(micfil->regmap, REG_MICFIL_CTRL1,
- MICFIL_CTRL1_PDMIEN_MASK, 0);
+ MICFIL_CTRL1_PDMIEN, 0);
if (ret) {
dev_err(dev, "failed to disable the module\n");
return ret;
@@ -593,16 +593,16 @@ static irqreturn_t micfil_err_isr(int irq, void *devid)
regmap_read(micfil->regmap, REG_MICFIL_STAT, &stat_reg);
- if (stat_reg & MICFIL_STAT_BSY_FIL_MASK)
+ if (stat_reg & MICFIL_STAT_BSY_FIL)
dev_dbg(&pdev->dev, "isr: Decimation Filter is running\n");
- if (stat_reg & MICFIL_STAT_FIR_RDY_MASK)
+ if (stat_reg & MICFIL_STAT_FIR_RDY)
dev_dbg(&pdev->dev, "isr: FIR Filter Data ready\n");
- if (stat_reg & MICFIL_STAT_LOWFREQF_MASK) {
+ if (stat_reg & MICFIL_STAT_LOWFREQF) {
dev_dbg(&pdev->dev, "isr: ipg_clk_app is too low\n");
regmap_write_bits(micfil->regmap, REG_MICFIL_STAT,
- MICFIL_STAT_LOWFREQF_MASK, 1);
+ MICFIL_STAT_LOWFREQF, 1);
}
return IRQ_HANDLED;