static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
 {
-       struct snd_soc_codec *codec = codec_dai->codec;
-       struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec);
+       struct snd_soc_component *component = codec_dai->component;
+       struct max98927_priv *max98927 = snd_soc_component_get_drvdata(component);
        unsigned int mode = 0;
        unsigned int format = 0;
        bool use_pdm = false;
        unsigned int invert = 0;
 
-       dev_dbg(codec->dev, "%s: fmt 0x%08X\n", __func__, fmt);
+       dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt);
 
        switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
        case SND_SOC_DAIFMT_CBS_CFS:
                mode = MAX98927_PCM_MASTER_MODE_MASTER;
                break;
        default:
-               dev_err(codec->dev, "DAI clock mode unsupported\n");
+               dev_err(component->dev, "DAI clock mode unsupported\n");
                return -EINVAL;
        }
 
                invert = MAX98927_PCM_MODE_CFG_PCM_BCLKEDGE;
                break;
        default:
-               dev_err(codec->dev, "DAI invert mode unsupported\n");
+               dev_err(component->dev, "DAI invert mode unsupported\n");
                return -EINVAL;
        }
 
 static int max98927_set_clock(struct max98927_priv *max98927,
        struct snd_pcm_hw_params *params)
 {
-       struct snd_soc_codec *codec = max98927->codec;
+       struct snd_soc_component *component = max98927->component;
        /* BCLK/LRCLK ratio calculation */
        int blr_clk_ratio = params_channels(params) * max98927->ch_size;
        int value;
                                break;
                }
                if (i == ARRAY_SIZE(rate_table)) {
-                       dev_err(codec->dev, "failed to find proper clock rate.\n");
+                       dev_err(component->dev, "failed to find proper clock rate.\n");
                        return -EINVAL;
                }
                regmap_update_bits(max98927->regmap,
                /* BCLK configuration */
                value = max98927_get_bclk_sel(blr_clk_ratio);
                if (!value) {
-                       dev_err(codec->dev, "format unsupported %d\n",
+                       dev_err(component->dev, "format unsupported %d\n",
                                params_format(params));
                        return -EINVAL;
                }
        struct snd_pcm_hw_params *params,
        struct snd_soc_dai *dai)
 {
-       struct snd_soc_codec *codec = dai->codec;
-       struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec);
+       struct snd_soc_component *component = dai->component;
+       struct max98927_priv *max98927 = snd_soc_component_get_drvdata(component);
        unsigned int sampling_rate = 0;
        unsigned int chan_sz = 0;
 
                chan_sz = MAX98927_PCM_MODE_CFG_CHANSZ_32;
                break;
        default:
-               dev_err(codec->dev, "format unsupported %d\n",
+               dev_err(component->dev, "format unsupported %d\n",
                        params_format(params));
                goto err;
        }
                MAX98927_R0020_PCM_MODE_CFG,
                MAX98927_PCM_MODE_CFG_CHANSZ_MASK, chan_sz);
 
-       dev_dbg(codec->dev, "format supported %d",
+       dev_dbg(component->dev, "format supported %d",
                params_format(params));
 
        /* sampling rate configuration */
                sampling_rate = MAX98927_PCM_SR_SET1_SR_48000;
                break;
        default:
-               dev_err(codec->dev, "rate %d not supported\n",
+               dev_err(component->dev, "rate %d not supported\n",
                        params_rate(params));
                goto err;
        }
        unsigned int tx_mask, unsigned int rx_mask,
        int slots, int slot_width)
 {
-       struct snd_soc_codec *codec = dai->codec;
-       struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec);
+       struct snd_soc_component *component = dai->component;
+       struct max98927_priv *max98927 = snd_soc_component_get_drvdata(component);
        int bsel = 0;
        unsigned int chan_sz = 0;
 
        /* BCLK configuration */
        bsel = max98927_get_bclk_sel(slots * slot_width);
        if (bsel == 0) {
-               dev_err(codec->dev, "BCLK %d not supported\n",
+               dev_err(component->dev, "BCLK %d not supported\n",
                        slots * slot_width);
                return -EINVAL;
        }
                chan_sz = MAX98927_PCM_MODE_CFG_CHANSZ_32;
                break;
        default:
-               dev_err(codec->dev, "format unsupported %d\n",
+               dev_err(component->dev, "format unsupported %d\n",
                        slot_width);
                return -EINVAL;
        }
 static int max98927_dai_set_sysclk(struct snd_soc_dai *dai,
        int clk_id, unsigned int freq, int dir)
 {
-       struct snd_soc_codec *codec = dai->codec;
-       struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec);
+       struct snd_soc_component *component = dai->component;
+       struct max98927_priv *max98927 = snd_soc_component_get_drvdata(component);
 
        max98927->sysclk = freq;
        return 0;
 static int max98927_dac_event(struct snd_soc_dapm_widget *w,
        struct snd_kcontrol *kcontrol, int event)
 {
-       struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
-       struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec);
+       struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
+       struct max98927_priv *max98927 = snd_soc_component_get_drvdata(component);
 
        switch (event) {
        case SND_SOC_DAPM_PRE_PMU:
        }
 };
 
-static int max98927_probe(struct snd_soc_codec *codec)
+static int max98927_probe(struct snd_soc_component *component)
 {
-       struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec);
+       struct max98927_priv *max98927 = snd_soc_component_get_drvdata(component);
 
-       max98927->codec = codec;
+       max98927->component = component;
 
        /* Software Reset */
        regmap_write(max98927->regmap,
        SET_SYSTEM_SLEEP_PM_OPS(max98927_suspend, max98927_resume)
 };
 
-static const struct snd_soc_codec_driver soc_codec_dev_max98927 = {
-       .probe = max98927_probe,
-       .component_driver = {
-               .controls = max98927_snd_controls,
-               .num_controls = ARRAY_SIZE(max98927_snd_controls),
-               .dapm_widgets = max98927_dapm_widgets,
-               .num_dapm_widgets = ARRAY_SIZE(max98927_dapm_widgets),
-               .dapm_routes = max98927_audio_map,
-               .num_dapm_routes = ARRAY_SIZE(max98927_audio_map),
-       },
+static const struct snd_soc_component_driver soc_component_dev_max98927 = {
+       .probe                  = max98927_probe,
+       .controls               = max98927_snd_controls,
+       .num_controls           = ARRAY_SIZE(max98927_snd_controls),
+       .dapm_widgets           = max98927_dapm_widgets,
+       .num_dapm_widgets       = ARRAY_SIZE(max98927_dapm_widgets),
+       .dapm_routes            = max98927_audio_map,
+       .num_dapm_routes        = ARRAY_SIZE(max98927_audio_map),
+       .idle_bias_on           = 1,
+       .use_pmdown_time        = 1,
+       .endianness             = 1,
+       .non_legacy_dai_naming  = 1,
 };
 
 static const struct regmap_config max98927_regmap = {
        max98927_slot_config(i2c, max98927);
 
        /* codec registeration */
-       ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_max98927,
+       ret = devm_snd_soc_register_component(&i2c->dev,
+               &soc_component_dev_max98927,
                max98927_dai, ARRAY_SIZE(max98927_dai));
        if (ret < 0)
-               dev_err(&i2c->dev, "Failed to register codec: %d\n", ret);
+               dev_err(&i2c->dev, "Failed to register component: %d\n", ret);
 
        return ret;
 }
 
-static int max98927_i2c_remove(struct i2c_client *client)
-{
-       snd_soc_unregister_codec(&client->dev);
-       return 0;
-}
-
 static const struct i2c_device_id max98927_i2c_id[] = {
        { "max98927", 0},
        { },
                .pm = &max98927_pm,
        },
        .probe  = max98927_i2c_probe,
-       .remove = max98927_i2c_remove,
        .id_table = max98927_i2c_id,
 };