Commit b0115612 authored by Mark Brown's avatar Mark Brown

ASoC: atmel: one fix and one cleanup

Merge series from Claudiu Beznea <claudiu.beznea@microchip.com>:

Hi,

The series adds one fix for mchp-spdifrx and one cleanups for
mchp-spdifrx and mchp-spdifrx drivers.

Thank you,
Claudiu Beznea

Changes in v3:
- changed cover letter title s/few/one, s/cleanups/cleanup
- fix compilation error and warnings
- keep only patch 1/5 and patch 3/5 from previous version as the rest
  of them were integrated

Changes in v2:
- s/tag/tab in the title of patch 2/5

Claudiu Beznea (2):
  ASoC: mchp-spdifrx: disable end of block interrupt on failures
  ASoC: mchp-spdiftx: remove references to mchp_i2s_caps

 sound/soc/atmel/mchp-spdifrx.c | 9 ++++++---
 sound/soc/atmel/mchp-spdiftx.c | 8 --------
 2 files changed, 6 insertions(+), 11 deletions(-)

--
2.34.1
parents abed2baf 403fcb51
...@@ -288,15 +288,17 @@ static void mchp_spdifrx_isr_blockend_en(struct mchp_spdifrx_dev *dev) ...@@ -288,15 +288,17 @@ static void mchp_spdifrx_isr_blockend_en(struct mchp_spdifrx_dev *dev)
spin_unlock_irqrestore(&dev->blockend_lock, flags); spin_unlock_irqrestore(&dev->blockend_lock, flags);
} }
/* called from atomic context only */ /* called from atomic/non-atomic context */
static void mchp_spdifrx_isr_blockend_dis(struct mchp_spdifrx_dev *dev) static void mchp_spdifrx_isr_blockend_dis(struct mchp_spdifrx_dev *dev)
{ {
spin_lock(&dev->blockend_lock); unsigned long flags;
spin_lock_irqsave(&dev->blockend_lock, flags);
dev->blockend_refcount--; dev->blockend_refcount--;
/* don't enable BLOCKEND interrupt if it's already enabled */ /* don't enable BLOCKEND interrupt if it's already enabled */
if (dev->blockend_refcount == 0) if (dev->blockend_refcount == 0)
regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_BLOCKEND); regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_BLOCKEND);
spin_unlock(&dev->blockend_lock); spin_unlock_irqrestore(&dev->blockend_lock, flags);
} }
static irqreturn_t mchp_spdif_interrupt(int irq, void *dev_id) static irqreturn_t mchp_spdif_interrupt(int irq, void *dev_id)
...@@ -575,6 +577,7 @@ static int mchp_spdifrx_subcode_ch_get(struct mchp_spdifrx_dev *dev, ...@@ -575,6 +577,7 @@ static int mchp_spdifrx_subcode_ch_get(struct mchp_spdifrx_dev *dev,
if (ret <= 0) { if (ret <= 0) {
dev_dbg(dev->dev, "user data for channel %d timeout\n", dev_dbg(dev->dev, "user data for channel %d timeout\n",
channel); channel);
mchp_spdifrx_isr_blockend_dis(dev);
return ret; return ret;
} }
......
...@@ -196,7 +196,6 @@ struct mchp_spdiftx_dev { ...@@ -196,7 +196,6 @@ struct mchp_spdiftx_dev {
struct clk *pclk; struct clk *pclk;
struct clk *gclk; struct clk *gclk;
unsigned int fmt; unsigned int fmt;
const struct mchp_i2s_caps *caps;
int gclk_enabled:1; int gclk_enabled:1;
}; };
...@@ -765,8 +764,6 @@ MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids); ...@@ -765,8 +764,6 @@ MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids);
static int mchp_spdiftx_probe(struct platform_device *pdev) static int mchp_spdiftx_probe(struct platform_device *pdev)
{ {
struct device_node *np = pdev->dev.of_node;
const struct of_device_id *match;
struct mchp_spdiftx_dev *dev; struct mchp_spdiftx_dev *dev;
struct resource *mem; struct resource *mem;
struct regmap *regmap; struct regmap *regmap;
...@@ -780,11 +777,6 @@ static int mchp_spdiftx_probe(struct platform_device *pdev) ...@@ -780,11 +777,6 @@ static int mchp_spdiftx_probe(struct platform_device *pdev)
if (!dev) if (!dev)
return -ENOMEM; return -ENOMEM;
/* Get hardware capabilities. */
match = of_match_node(mchp_spdiftx_dt_ids, np);
if (match)
dev->caps = match->data;
/* Map I/O registers. */ /* Map I/O registers. */
base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem);
if (IS_ERR(base)) if (IS_ERR(base))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment