]> Git Repo - J-linux.git/commitdiff
Merge tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
authorLinus Torvalds <[email protected]>
Thu, 6 Aug 2020 21:27:31 +0000 (14:27 -0700)
committerLinus Torvalds <[email protected]>
Thu, 6 Aug 2020 21:27:31 +0000 (14:27 -0700)
Pull sound updates from Takashi Iwai:
 "This became wide and scattered updates all over the sound tree as
  diffstat shows: lots of (still ongoing) refactoring works in ASoC,
  fixes and cleanups caught by static analysis, inclusive term
  conversions as well as lots of new drivers. Below are highlights:

  ASoC core:
   - API cleanups and conversions to the unified mute_stream() call
   - Simplify I/O helper functions
   - Use helper macros to retrieve RTD from substreams

  ASoC drivers:
   - Lots of fixes and cleanups in Intel ASoC drivers
   - Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S,
     Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards,
     nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries
     boards, TI J721e EVM

  ALSA core:
   - Minor code refacotring for SG-buffer handling

  HD-audio:
   - Generalization of mute-LED handling with LED classdev
   - Intel silent stream support for HDMI
   - Device-specific fixes: CA0132, Loongson-3

  Others:
   - Usual USB- and HD-audio quirks for various devices
   - Fixes for echoaudio DMA position handling
   - Various documents and trivial fixes for sparse warnings
   - Conversion to adopt inclusive terms"

* tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (479 commits)
  ALSA: pci: delete repeated words in comments
  ALSA: isa: delete repeated words in comments
  ALSA: hda/tegra: Add 100us dma stop delay
  ALSA: hda: Add dma stop delay variable
  ASoC: hda/tegra: Set buffer alignment to 128 bytes
  ALSA: seq: oss: Serialize ioctls
  ALSA: hda/hdmi: Add quirk to force connectivity
  ALSA: usb-audio: add startech usb audio dock name
  ALSA: usb-audio: Add support for Lenovo ThinkStation P620
  Revert "ALSA: hda: call runtime_allow() for all hda controllers"
  ALSA: hda/ca0132 - Fix AE-5 microphone selection commands.
  ALSA: hda/ca0132 - Add new quirk ID for Recon3D.
  ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
  ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops
  ALSA: docs: fix typo
  ALSA: doc: use correct config variable name
  ASoC: core: Two step component registration
  ASoC: core: Simplify snd_soc_component_initialize declaration
  ASoC: core: Relocate and expose snd_soc_component_initialize
  ASoC: sh: Replace 'select' DMADEVICES 'with depends on'
  ...

1  2 
Documentation/devicetree/bindings/vendor-prefixes.yaml
drivers/gpu/drm/bridge/sii902x.c
drivers/gpu/drm/exynos/exynos_hdmi.c
drivers/gpu/drm/i2c/tda998x_drv.c
drivers/gpu/drm/mediatek/mtk_hdmi.c
drivers/spi/spi-lantiq-ssc.c
sound/soc/codecs/cros_ec_codec.c
sound/usb/endpoint.c

index 936dad22b47eb605a811faa049fe8576181b0adb,147afcfe81fed89287f6b95fd0d9ac284a838027..403c17a3ff9b7abfbb7b6474720eab3d7aba2bdc
@@@ -20,17 -20,13 +20,17 @@@ patternProperties
    "^(keypad|m25p|max8952|max8997|max8998|mpmc),.*": true
    "^(pinctrl-single|#pinctrl-single|PowerPC),.*": true
    "^(pl022|pxa-mmc|rcar_sound|rotary-encoder|s5m8767|sdhci),.*": true
-   "^(simple-audio-card|simple-graph-card|st-plgpio|st-spics|ts),.*": true
+   "^(simple-audio-card|st-plgpio|st-spics|ts),.*": true
  
    # Keep list in alphabetical order.
 +  "^70mai,.*":
 +    description: 70mai Co., Ltd.
    "^abilis,.*":
      description: Abilis Systems
    "^abracon,.*":
      description: Abracon Corporation
 +  "^acer,.*":
 +    description: Acer Inc.
    "^acme,.*":
      description: Acme Systems srl
    "^actions,.*":
      description: Microsemi Corporation
    "^msi,.*":
      description: Micro-Star International Co. Ltd.
 +  "^mstar,.*":
 +    description: MStar Semiconductor, Inc. (acquired by MediaTek Inc.)
    "^mti,.*":
      description: Imagination Technologies Ltd. (formerly MIPS Technologies Inc.)
    "^multi-inno,.*":
      description: Spreadtrum Communications Inc.
    "^sst,.*":
      description: Silicon Storage Technology, Inc.
 +  "^sstar,.*":
 +    description: Xiamen Xingchen(SigmaStar) Technology Co., Ltd. (formerly part of MStar Semiconductor, Inc.)
    "^st,.*":
      description: STMicroelectronics
    "^starry,.*":
      description: Three Five Corp
    "^thine,.*":
      description: THine Electronics, Inc.
 +  "^thingyjp,.*":
 +    description: thingy.jp
    "^ti,.*":
      description: Texas Instruments
    "^tianma,.*":
      description: Xiaomi Technology Co., Ltd.
    "^xillybus,.*":
      description: Xillybus Ltd.
 +  "^xingbangda,.*":
 +    description: Shenzhen Xingbangda Display Technology Co., Ltd
    "^xinpeng,.*":
      description: Shenzhen Xinpeng Technology Co., Ltd
    "^xlnx,.*":
      description: Shenzhen Xunlong Software CO.,Limited
    "^xylon,.*":
      description: Xylon
 +  "^ylm,.*":
 +    description: Shenzhen Yangliming Electronic Technology Co., Ltd.
    "^yna,.*":
      description: YSH & ATIL
    "^yones-toptech,.*":
index 19d8ae59ea035589ab5906f30dcb16dfba5c7bb8,c751baf3d064f7ba8dbd6fd156e2f14482598c8d..33fd33f953ec465b70b077f5ea832eef3606a6d8
@@@ -360,7 -360,7 +360,7 @@@ static void sii902x_bridge_mode_set(str
  
        buf[0] = pixel_clock_10kHz & 0xff;
        buf[1] = pixel_clock_10kHz >> 8;
 -      buf[2] = adj->vrefresh;
 +      buf[2] = drm_mode_vrefresh(adj);
        buf[3] = 0x00;
        buf[4] = adj->hdisplay;
        buf[5] = adj->hdisplay >> 8;
@@@ -672,8 -672,8 +672,8 @@@ static void sii902x_audio_shutdown(stru
        clk_disable_unprepare(sii902x->audio.mclk);
  }
  
- static int sii902x_audio_digital_mute(struct device *dev,
-                                     void *data, bool enable)
+ static int sii902x_audio_mute(struct device *dev, void *data,
+                             bool enable, int direction)
  {
        struct sii902x *sii902x = dev_get_drvdata(dev);
  
@@@ -724,9 -724,10 +724,10 @@@ static int sii902x_audio_get_dai_id(str
  static const struct hdmi_codec_ops sii902x_audio_codec_ops = {
        .hw_params = sii902x_audio_hw_params,
        .audio_shutdown = sii902x_audio_shutdown,
-       .digital_mute = sii902x_audio_digital_mute,
+       .mute_stream = sii902x_audio_mute,
        .get_eld = sii902x_audio_get_eld,
        .get_dai_id = sii902x_audio_get_dai_id,
+       .no_capture_mute = 1,
  };
  
  static int sii902x_audio_codec_init(struct sii902x *sii902x,
index 8c3f5b21eff44bbc89c3460debf694c9ed4d0ca5,68d7b1ce1b7cf3122ba805f2eb10c8ccb29ceb1a..c5ba32fca5f36d60a29342861be54efec40e4995
@@@ -921,8 -921,7 +921,8 @@@ static int hdmi_mode_valid(struct drm_c
  
        DRM_DEV_DEBUG_KMS(hdata->dev,
                          "xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n",
 -                        mode->hdisplay, mode->vdisplay, mode->vrefresh,
 +                        mode->hdisplay, mode->vdisplay,
 +                        drm_mode_vrefresh(mode),
                          (mode->flags & DRM_MODE_FLAG_INTERLACE) ? true :
                          false, mode->clock * 1000);
  
@@@ -1021,7 -1020,7 +1021,7 @@@ static bool hdmi_mode_fixup(struct drm_
                        DRM_DEV_DEBUG_KMS(dev->dev,
                                          "Adjusted Mode: [%d]x[%d] [%d]Hz\n",
                                          m->hdisplay, m->vdisplay,
 -                                        m->vrefresh);
 +                                        drm_mode_vrefresh(m));
  
                        drm_mode_copy(adjusted_mode, m);
                        break;
@@@ -1605,7 -1604,8 +1605,8 @@@ static int hdmi_audio_hw_params(struct 
        return 0;
  }
  
- static int hdmi_audio_digital_mute(struct device *dev, void *data, bool mute)
+ static int hdmi_audio_mute(struct device *dev, void *data,
+                          bool mute, int direction)
  {
        struct hdmi_context *hdata = dev_get_drvdata(dev);
  
@@@ -1635,8 -1635,9 +1636,9 @@@ static int hdmi_audio_get_eld(struct de
  static const struct hdmi_codec_ops audio_codec_ops = {
        .hw_params = hdmi_audio_hw_params,
        .audio_shutdown = hdmi_audio_shutdown,
-       .digital_mute = hdmi_audio_digital_mute,
+       .mute_stream = hdmi_audio_mute,
        .get_eld = hdmi_audio_get_eld,
+       .no_capture_mute = 1,
  };
  
  static int hdmi_register_audio_device(struct hdmi_context *hdata)
index 50fd119a52763402a608c1782de84c4342954787,3010a4536da3505e9fd056390af01db89e9b1d5f..b7ec6c374fbda29784b4622b505fc97a39f06d62
@@@ -1133,8 -1133,8 +1133,8 @@@ static void tda998x_audio_shutdown(stru
        mutex_unlock(&priv->audio_mutex);
  }
  
- static int tda998x_audio_digital_mute(struct device *dev, void *data,
-                                     bool enable)
+ static int tda998x_audio_mute_stream(struct device *dev, void *data,
+                                    bool enable, int direction)
  {
        struct tda998x_priv *priv = dev_get_drvdata(dev);
  
@@@ -1162,8 -1162,9 +1162,9 @@@ static int tda998x_audio_get_eld(struc
  static const struct hdmi_codec_ops audio_codec_ops = {
        .hw_params = tda998x_audio_hw_params,
        .audio_shutdown = tda998x_audio_shutdown,
-       .digital_mute = tda998x_audio_digital_mute,
+       .mute_stream = tda998x_audio_mute_stream,
        .get_eld = tda998x_audio_get_eld,
+       .no_capture_mute = 1,
  };
  
  static int tda998x_audio_codec_init(struct tda998x_priv *priv,
@@@ -1379,7 -1380,6 +1380,7 @@@ static void tda998x_bridge_detach(struc
  }
  
  static enum drm_mode_status tda998x_bridge_mode_valid(struct drm_bridge *bridge,
 +                                   const struct drm_display_info *info,
                                     const struct drm_display_mode *mode)
  {
        /* TDA19988 dotclock can go up to 165MHz */
index 95591262ac36cc989724d9dc15e9bcb42e45a50b,1b2fb9f35daf85ecef155d3db7c19d01efb567da..f2e9b429960b98954fa3540d43f842995c7f87bb
@@@ -1254,7 -1254,7 +1254,7 @@@ static int mtk_hdmi_conn_mode_valid(str
        struct drm_bridge *next_bridge;
  
        dev_dbg(hdmi->dev, "xres=%d, yres=%d, refresh=%d, intl=%d clock=%d\n",
 -              mode->hdisplay, mode->vdisplay, mode->vrefresh,
 +              mode->hdisplay, mode->vdisplay, drm_mode_vrefresh(mode),
                !!(mode->flags & DRM_MODE_FLAG_INTERLACE), mode->clock * 1000);
  
        next_bridge = drm_bridge_get_next_bridge(&hdmi->bridge);
@@@ -1643,7 -1643,8 +1643,8 @@@ static void mtk_hdmi_audio_shutdown(str
  }
  
  static int
- mtk_hdmi_audio_digital_mute(struct device *dev, void *data, bool enable)
+ mtk_hdmi_audio_mute(struct device *dev, void *data,
+                   bool enable, int direction)
  {
        struct mtk_hdmi *hdmi = dev_get_drvdata(dev);
  
@@@ -1684,9 -1685,10 +1685,10 @@@ static const struct hdmi_codec_ops mtk_
        .hw_params = mtk_hdmi_audio_hw_params,
        .audio_startup = mtk_hdmi_audio_startup,
        .audio_shutdown = mtk_hdmi_audio_shutdown,
-       .digital_mute = mtk_hdmi_audio_digital_mute,
+       .mute_stream = mtk_hdmi_audio_mute,
        .get_eld = mtk_hdmi_audio_get_eld,
        .hook_plugged_cb = mtk_hdmi_audio_hook_plugged_cb,
+       .no_capture_mute = 1,
  };
  
  static int mtk_hdmi_register_audio_driver(struct device *dev)
index dccef1dcea329f82b4535116ab7cd3e171926728,a12a5d0cfebf1520ad34df54b01eba0a4ed54a95..3cbecb2d8fc098c27f47cdf7bc72abfd6a408d4f
@@@ -15,6 -15,7 +15,6 @@@
  #include <linux/completion.h>
  #include <linux/spinlock.h>
  #include <linux/err.h>
 -#include <linux/gpio.h>
  #include <linux/pm_runtime.h>
  #include <linux/spi/spi.h>
  
@@@ -49,6 -50,8 +49,6 @@@
  #define LTQ_SPI_RXCNT         0x84
  #define LTQ_SPI_DMACON                0xec
  #define LTQ_SPI_IRNEN         0xf4
 -#define LTQ_SPI_IRNICR                0xf8
 -#define LTQ_SPI_IRNCR         0xfc
  
  #define LTQ_SPI_CLC_SMC_S     16      /* Clock divider for sleep mode */
  #define LTQ_SPI_CLC_SMC_M     (0xFF << LTQ_SPI_CLC_SMC_S)
@@@ -58,7 -61,9 +58,7 @@@
  #define LTQ_SPI_CLC_DISR      BIT(0)  /* Disable request bit */
  
  #define LTQ_SPI_ID_TXFS_S     24      /* Implemented TX FIFO size */
 -#define LTQ_SPI_ID_TXFS_M     (0x3F << LTQ_SPI_ID_TXFS_S)
  #define LTQ_SPI_ID_RXFS_S     16      /* Implemented RX FIFO size */
 -#define LTQ_SPI_ID_RXFS_M     (0x3F << LTQ_SPI_ID_RXFS_S)
  #define LTQ_SPI_ID_MOD_S      8       /* Module ID */
  #define LTQ_SPI_ID_MOD_M      (0xff << LTQ_SPI_ID_MOD_S)
  #define LTQ_SPI_ID_CFG_S      5       /* DMA interface support */
                                         LTQ_SPI_WHBSTATE_CLRTUE)
  
  #define LTQ_SPI_RXFCON_RXFITL_S       8       /* FIFO interrupt trigger level */
 -#define LTQ_SPI_RXFCON_RXFITL_M       (0x3F << LTQ_SPI_RXFCON_RXFITL_S)
  #define LTQ_SPI_RXFCON_RXFLU  BIT(1)  /* FIFO flush */
  #define LTQ_SPI_RXFCON_RXFEN  BIT(0)  /* FIFO enable */
  
  #define LTQ_SPI_TXFCON_TXFITL_S       8       /* FIFO interrupt trigger level */
 -#define LTQ_SPI_TXFCON_TXFITL_M       (0x3F << LTQ_SPI_TXFCON_TXFITL_S)
  #define LTQ_SPI_TXFCON_TXFLU  BIT(1)  /* FIFO flush */
  #define LTQ_SPI_TXFCON_TXFEN  BIT(0)  /* FIFO enable */
  
  #define LTQ_SPI_FSTAT_RXFFL_S 0
 -#define LTQ_SPI_FSTAT_RXFFL_M (0x3f << LTQ_SPI_FSTAT_RXFFL_S)
  #define LTQ_SPI_FSTAT_TXFFL_S 8
 -#define LTQ_SPI_FSTAT_TXFFL_M (0x3f << LTQ_SPI_FSTAT_TXFFL_S)
  
  #define LTQ_SPI_GPOCON_ISCSBN_S       8
  #define LTQ_SPI_GPOCON_INVOUTN_S      0
  #define LTQ_SPI_IRNEN_T_XRX   BIT(0)  /* Receive end interrupt request */
  #define LTQ_SPI_IRNEN_ALL     0x1F
  
 +struct lantiq_ssc_spi;
 +
  struct lantiq_ssc_hwcfg {
 -      unsigned int irnen_r;
 -      unsigned int irnen_t;
 +      int (*cfg_irq)(struct platform_device *pdev, struct lantiq_ssc_spi *spi);
 +      unsigned int    irnen_r;
 +      unsigned int    irnen_t;
 +      unsigned int    irncr;
 +      unsigned int    irnicr;
 +      bool            irq_ack;
 +      u32             fifo_size_mask;
  };
  
  struct lantiq_ssc_spi {
        unsigned int                    tx_fifo_size;
        unsigned int                    rx_fifo_size;
        unsigned int                    base_cs;
 +      unsigned int                    fdx_tx_level;
  };
  
  static u32 lantiq_ssc_readl(const struct lantiq_ssc_spi *spi, u32 reg)
@@@ -208,18 -209,16 +208,18 @@@ static void lantiq_ssc_maskl(const stru
  
  static unsigned int tx_fifo_level(const struct lantiq_ssc_spi *spi)
  {
 +      const struct lantiq_ssc_hwcfg *hwcfg = spi->hwcfg;
        u32 fstat = lantiq_ssc_readl(spi, LTQ_SPI_FSTAT);
  
 -      return (fstat & LTQ_SPI_FSTAT_TXFFL_M) >> LTQ_SPI_FSTAT_TXFFL_S;
 +      return (fstat >> LTQ_SPI_FSTAT_TXFFL_S) & hwcfg->fifo_size_mask;
  }
  
  static unsigned int rx_fifo_level(const struct lantiq_ssc_spi *spi)
  {
 +      const struct lantiq_ssc_hwcfg *hwcfg = spi->hwcfg;
        u32 fstat = lantiq_ssc_readl(spi, LTQ_SPI_FSTAT);
  
 -      return fstat & LTQ_SPI_FSTAT_RXFFL_M;
 +      return (fstat >> LTQ_SPI_FSTAT_RXFFL_S) & hwcfg->fifo_size_mask;
  }
  
  static unsigned int tx_fifo_free(const struct lantiq_ssc_spi *spi)
@@@ -392,7 -391,7 +392,7 @@@ static int lantiq_ssc_setup(struct spi_
        u32 gpocon;
  
        /* GPIOs are used for CS */
 -      if (gpio_is_valid(spidev->cs_gpio))
 +      if (spidev->cs_gpiod)
                return 0;
  
        dev_dbg(spi->dev, "using internal chipselect %u\n", cs);
@@@ -482,7 -481,6 +482,7 @@@ static void tx_fifo_write(struct lantiq
        u32 data;
        unsigned int tx_free = tx_fifo_free(spi);
  
 +      spi->fdx_tx_level = 0;
        while (spi->tx_todo && tx_free) {
                switch (spi->bits_per_word) {
                case 2 ... 8:
  
                lantiq_ssc_writel(spi, data, LTQ_SPI_TB);
                tx_free--;
 +              spi->fdx_tx_level++;
        }
  }
  
@@@ -523,13 -520,6 +523,13 @@@ static void rx_fifo_read_full_duplex(st
        u32 data;
        unsigned int rx_fill = rx_fifo_level(spi);
  
 +      /*
 +       * Wait until all expected data to be shifted in.
 +       * Otherwise, rx overrun may occur.
 +       */
 +      while (rx_fill != spi->fdx_tx_level)
 +              rx_fill = rx_fifo_level(spi);
 +
        while (rx_fill) {
                data = lantiq_ssc_readl(spi, LTQ_SPI_RB);
  
@@@ -623,13 -613,6 +623,13 @@@ static void rx_request(struct lantiq_ss
  static irqreturn_t lantiq_ssc_xmit_interrupt(int irq, void *data)
  {
        struct lantiq_ssc_spi *spi = data;
 +      const struct lantiq_ssc_hwcfg *hwcfg = spi->hwcfg;
 +      u32 val = lantiq_ssc_readl(spi, hwcfg->irncr);
 +      unsigned long flags;
 +
 +      spin_lock_irqsave(&spi->lock, flags);
 +      if (hwcfg->irq_ack)
 +              lantiq_ssc_writel(spi, val, hwcfg->irncr);
  
        if (spi->tx) {
                if (spi->rx && spi->rx_todo)
                }
        }
  
 +      spin_unlock_irqrestore(&spi->lock, flags);
        return IRQ_HANDLED;
  
  completed:
        queue_work(spi->wq, &spi->work);
 +      spin_unlock_irqrestore(&spi->lock, flags);
  
        return IRQ_HANDLED;
  }
  static irqreturn_t lantiq_ssc_err_interrupt(int irq, void *data)
  {
        struct lantiq_ssc_spi *spi = data;
 +      const struct lantiq_ssc_hwcfg *hwcfg = spi->hwcfg;
        u32 stat = lantiq_ssc_readl(spi, LTQ_SPI_STAT);
 +      u32 val = lantiq_ssc_readl(spi, hwcfg->irncr);
 +      unsigned long flags;
  
        if (!(stat & LTQ_SPI_STAT_ERRORS))
                return IRQ_NONE;
  
 +      spin_lock_irqsave(&spi->lock, flags);
 +      if (hwcfg->irq_ack)
 +              lantiq_ssc_writel(spi, val, hwcfg->irncr);
 +
        if (stat & LTQ_SPI_STAT_RUE)
                dev_err(spi->dev, "receive underflow error\n");
        if (stat & LTQ_SPI_STAT_TUE)
        if (spi->master->cur_msg)
                spi->master->cur_msg->status = -EIO;
        queue_work(spi->wq, &spi->work);
 +      spin_unlock_irqrestore(&spi->lock, flags);
 +
 +      return IRQ_HANDLED;
 +}
 +
 +static irqreturn_t intel_lgm_ssc_isr(int irq, void *data)
 +{
 +      struct lantiq_ssc_spi *spi = data;
 +      const struct lantiq_ssc_hwcfg *hwcfg = spi->hwcfg;
 +      u32 val = lantiq_ssc_readl(spi, hwcfg->irncr);
 +
 +      if (!(val & LTQ_SPI_IRNEN_ALL))
 +              return IRQ_NONE;
 +
 +      if (val & LTQ_SPI_IRNEN_E)
 +              return lantiq_ssc_err_interrupt(irq, data);
 +
 +      if ((val & hwcfg->irnen_t) || (val & hwcfg->irnen_r))
 +              return lantiq_ssc_xmit_interrupt(irq, data);
  
        return IRQ_HANDLED;
  }
@@@ -820,84 -775,20 +820,84 @@@ static int lantiq_ssc_transfer_one(stru
        return transfer_start(spi, spidev, t);
  }
  
 +static int intel_lgm_cfg_irq(struct platform_device *pdev, struct lantiq_ssc_spi *spi)
 +{
 +      int irq;
 +
 +      irq = platform_get_irq(pdev, 0);
 +      if (irq < 0)
 +              return irq;
 +
 +      return devm_request_irq(&pdev->dev, irq, intel_lgm_ssc_isr, 0, "spi", spi);
 +}
 +
 +static int lantiq_cfg_irq(struct platform_device *pdev, struct lantiq_ssc_spi *spi)
 +{
 +      int irq, err;
 +
 +      irq = platform_get_irq_byname(pdev, LTQ_SPI_RX_IRQ_NAME);
 +      if (irq < 0)
 +              return irq;
 +
 +      err = devm_request_irq(&pdev->dev, irq, lantiq_ssc_xmit_interrupt,
 +                             0, LTQ_SPI_RX_IRQ_NAME, spi);
 +      if (err)
 +              return err;
 +
 +      irq = platform_get_irq_byname(pdev, LTQ_SPI_TX_IRQ_NAME);
 +      if (irq < 0)
 +              return irq;
 +
 +      err = devm_request_irq(&pdev->dev, irq, lantiq_ssc_xmit_interrupt,
 +                             0, LTQ_SPI_TX_IRQ_NAME, spi);
 +
 +      if (err)
 +              return err;
 +
 +      irq = platform_get_irq_byname(pdev, LTQ_SPI_ERR_IRQ_NAME);
 +      if (irq < 0)
 +              return irq;
 +
 +      err = devm_request_irq(&pdev->dev, irq, lantiq_ssc_err_interrupt,
 +                             0, LTQ_SPI_ERR_IRQ_NAME, spi);
 +      return err;
 +}
 +
  static const struct lantiq_ssc_hwcfg lantiq_ssc_xway = {
 -      .irnen_r = LTQ_SPI_IRNEN_R_XWAY,
 -      .irnen_t = LTQ_SPI_IRNEN_T_XWAY,
 +      .cfg_irq        = lantiq_cfg_irq,
 +      .irnen_r        = LTQ_SPI_IRNEN_R_XWAY,
 +      .irnen_t        = LTQ_SPI_IRNEN_T_XWAY,
 +      .irnicr         = 0xF8,
 +      .irncr          = 0xFC,
 +      .fifo_size_mask = GENMASK(5, 0),
 +      .irq_ack        = false,
  };
  
  static const struct lantiq_ssc_hwcfg lantiq_ssc_xrx = {
 -      .irnen_r = LTQ_SPI_IRNEN_R_XRX,
 -      .irnen_t = LTQ_SPI_IRNEN_T_XRX,
 +      .cfg_irq        = lantiq_cfg_irq,
 +      .irnen_r        = LTQ_SPI_IRNEN_R_XRX,
 +      .irnen_t        = LTQ_SPI_IRNEN_T_XRX,
 +      .irnicr         = 0xF8,
 +      .irncr          = 0xFC,
 +      .fifo_size_mask = GENMASK(5, 0),
 +      .irq_ack        = false,
 +};
 +
 +static const struct lantiq_ssc_hwcfg intel_ssc_lgm = {
 +      .cfg_irq        = intel_lgm_cfg_irq,
 +      .irnen_r        = LTQ_SPI_IRNEN_R_XRX,
 +      .irnen_t        = LTQ_SPI_IRNEN_T_XRX,
 +      .irnicr         = 0xFC,
 +      .irncr          = 0xF8,
 +      .fifo_size_mask = GENMASK(7, 0),
 +      .irq_ack        = true,
  };
  
  static const struct of_device_id lantiq_ssc_match[] = {
        { .compatible = "lantiq,ase-spi", .data = &lantiq_ssc_xway, },
        { .compatible = "lantiq,falcon-spi", .data = &lantiq_ssc_xrx, },
        { .compatible = "lantiq,xrx100-spi", .data = &lantiq_ssc_xrx, },
 +      { .compatible = "intel,lgm-spi", .data = &intel_ssc_lgm, },
        {},
  };
  MODULE_DEVICE_TABLE(of, lantiq_ssc_match);
@@@ -909,9 -800,9 +909,9 @@@ static int lantiq_ssc_probe(struct plat
        struct lantiq_ssc_spi *spi;
        const struct lantiq_ssc_hwcfg *hwcfg;
        const struct of_device_id *match;
 -      int err, rx_irq, tx_irq, err_irq;
        u32 id, supports_dma, revision;
        unsigned int num_cs;
 +      int err;
  
        match = of_match_device(lantiq_ssc_match, dev);
        if (!match) {
        }
        hwcfg = match->data;
  
 -      rx_irq = platform_get_irq_byname(pdev, LTQ_SPI_RX_IRQ_NAME);
 -      if (rx_irq < 0)
 -              return -ENXIO;
 -
 -      tx_irq = platform_get_irq_byname(pdev, LTQ_SPI_TX_IRQ_NAME);
 -      if (tx_irq < 0)
 -              return -ENXIO;
 -
 -      err_irq = platform_get_irq_byname(pdev, LTQ_SPI_ERR_IRQ_NAME);
 -      if (err_irq < 0)
 -              return -ENXIO;
 -
        master = spi_alloc_master(dev, sizeof(struct lantiq_ssc_spi));
        if (!master)
                return -ENOMEM;
                goto err_master_put;
        }
  
 -      err = devm_request_irq(dev, rx_irq, lantiq_ssc_xmit_interrupt,
 -                             0, LTQ_SPI_RX_IRQ_NAME, spi);
 -      if (err)
 -              goto err_master_put;
 -
 -      err = devm_request_irq(dev, tx_irq, lantiq_ssc_xmit_interrupt,
 -                             0, LTQ_SPI_TX_IRQ_NAME, spi);
 -      if (err)
 -              goto err_master_put;
 -
 -      err = devm_request_irq(dev, err_irq, lantiq_ssc_err_interrupt,
 -                             0, LTQ_SPI_ERR_IRQ_NAME, spi);
 +      err = hwcfg->cfg_irq(pdev, spi);
        if (err)
                goto err_master_put;
  
  
        master->dev.of_node = pdev->dev.of_node;
        master->num_chipselect = num_cs;
 +      master->use_gpio_descriptors = true;
        master->setup = lantiq_ssc_setup;
        master->set_cs = lantiq_ssc_set_cs;
        master->handle_err = lantiq_ssc_handle_err;
        master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 8) |
                                     SPI_BPW_MASK(16) | SPI_BPW_MASK(32);
  
-       spi->wq = alloc_ordered_workqueue(dev_name(dev), 0);
+       spi->wq = alloc_ordered_workqueue(dev_name(dev), WQ_MEM_RECLAIM);
        if (!spi->wq) {
                err = -ENOMEM;
                goto err_clk_put;
        INIT_WORK(&spi->work, lantiq_ssc_bussy_work);
  
        id = lantiq_ssc_readl(spi, LTQ_SPI_ID);
 -      spi->tx_fifo_size = (id & LTQ_SPI_ID_TXFS_M) >> LTQ_SPI_ID_TXFS_S;
 -      spi->rx_fifo_size = (id & LTQ_SPI_ID_RXFS_M) >> LTQ_SPI_ID_RXFS_S;
 +      spi->tx_fifo_size = (id >> LTQ_SPI_ID_TXFS_S) & hwcfg->fifo_size_mask;
 +      spi->rx_fifo_size = (id >> LTQ_SPI_ID_RXFS_S) & hwcfg->fifo_size_mask;
        supports_dma = (id & LTQ_SPI_ID_CFG_M) >> LTQ_SPI_ID_CFG_S;
        revision = id & LTQ_SPI_ID_REV_M;
  
index ab009c7dfdf453f353f37a672bb4052d85201351,f23956cf4ed84bdd3137f90e8e3629e778b8a354..28f039adfa1388d884a069d3d02e74f9ba88bd5d
@@@ -103,6 -103,28 +103,6 @@@ error
        return ret;
  }
  
 -static int calculate_sha256(struct cros_ec_codec_priv *priv,
 -                          uint8_t *buf, uint32_t size, uint8_t *digest)
 -{
 -      struct sha256_state sctx;
 -
 -      sha256_init(&sctx);
 -      sha256_update(&sctx, buf, size);
 -      sha256_final(&sctx, digest);
 -
 -#ifdef DEBUG
 -      {
 -              char digest_str[65];
 -
 -              bin2hex(digest_str, digest, 32);
 -              digest_str[64] = 0;
 -              dev_dbg(priv->dev, "hash=%s\n", digest_str);
 -      }
 -#endif
 -
 -      return 0;
 -}
 -
  static int dmic_get_gain(struct snd_kcontrol *kcontrol,
                         struct snd_ctl_elem_value *ucontrol)
  {
@@@ -760,8 -782,9 +760,8 @@@ static int wov_hotword_model_put(struc
        if (IS_ERR(buf))
                return PTR_ERR(buf);
  
 -      ret = calculate_sha256(priv, buf, size, digest);
 -      if (ret)
 -              goto leave;
 +      sha256(buf, size, digest);
 +      dev_dbg(priv->dev, "hash=%*phN\n", SHA256_DIGEST_SIZE, digest);
  
        p.cmd = EC_CODEC_WOV_GET_LANG;
        ret = send_ec_host_command(priv->ec_device, EC_CMD_EC_CODEC_WOV,
@@@ -1030,11 -1053,13 +1030,13 @@@ static const struct of_device_id cros_e
  MODULE_DEVICE_TABLE(of, cros_ec_codec_of_match);
  #endif
  
+ #ifdef CONFIG_ACPI
  static const struct acpi_device_id cros_ec_codec_acpi_id[] = {
        { "GOOG0013", 0 },
        { }
  };
  MODULE_DEVICE_TABLE(acpi, cros_ec_codec_acpi_id);
+ #endif
  
  static struct platform_driver cros_ec_codec_platform_driver = {
        .driver = {
diff --combined sound/usb/endpoint.c
index 01468d6ee35659f3699847cd50f941b154464ce9,3a2b2a309a714064a4951031df1783abd2487677..5fbc8dd2f409ef33a8c540f6ab1a57df45e200d5
@@@ -335,7 -335,7 +335,7 @@@ static void queue_pending_output_urbs(s
        while (test_bit(EP_FLAG_RUNNING, &ep->flags)) {
  
                unsigned long flags;
 -              struct snd_usb_packet_info *uninitialized_var(packet);
 +              struct snd_usb_packet_info *packet;
                struct snd_urb_ctx *ctx = NULL;
                int err, i;
  
@@@ -615,9 -615,8 +615,8 @@@ static void release_urbs(struct snd_usb
        for (i = 0; i < ep->nurbs; i++)
                release_urb_ctx(&ep->urb[i]);
  
-       if (ep->syncbuf)
-               usb_free_coherent(ep->chip->dev, SYNC_URBS * 4,
-                                 ep->syncbuf, ep->sync_dma);
+       usb_free_coherent(ep->chip->dev, SYNC_URBS * 4,
+                         ep->syncbuf, ep->sync_dma);
  
        ep->syncbuf = NULL;
        ep->nurbs = 0;
This page took 0.119831 seconds and 4 git commands to generate.