if (ret)
                return ret;
 
-       snd_soc_component_write(component, AIC32X4_RESET, 0x01);
-
        if (aic32x4->setup)
                aic32x4_setup_gpios(component);
 
                return ret;
        }
 
+       if (gpio_is_valid(aic32x4->rstn_gpio)) {
+               ndelay(10);
+               gpio_set_value_cansleep(aic32x4->rstn_gpio, 1);
+               mdelay(1);
+       }
+
+       ret = regmap_write(regmap, AIC32X4_RESET, 0x01);
+       if (ret)
+               goto err_disable_regulators;
+
        ret = devm_snd_soc_register_component(dev,
                        &soc_component_dev_aic32x4, &aic32x4_dai, 1);
        if (ret) {
                goto err_disable_regulators;
        }
 
-       if (gpio_is_valid(aic32x4->rstn_gpio)) {
-               ndelay(10);
-               gpio_set_value_cansleep(aic32x4->rstn_gpio, 1);
-               mdelay(1);
-       }
-
        ret = aic32x4_register_clocks(dev, aic32x4->mclk_name);
        if (ret)
                goto err_disable_regulators;