@@ -736,6 +799,20 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
}
i2s->bclk_ratio = 64;
+ i2s->pinctrl = devm_pinctrl_get(&pdev->dev);
+ if (IS_ERR(i2s->pinctrl)) {
+ dev_err(&pdev->dev, "failed to find i2s pinctrl\n");
+ } else { > + i2s->bclk_on = pinctrl_lookup_state(i2s->pinctrl, "bclk_on");
+ if (!IS_ERR_OR_NULL(i2s->bclk_on)) {
+ i2s->bclk_off = pinctrl_lookup_state(i2s->pinctrl, "bclk_off");
+ if (IS_ERR_OR_NULL(i2s->bclk_off)) {
+ dev_err(&pdev->dev, "failed to find i2s bclk_off\n");
+ goto err_clk;
+ }
+ }
+ i2s_pinctrl_select_bclk_off(i2s);
+ }
dev_set_drvdata(&pdev->dev, i2s);