Re: [PATCH v3 16/17] ASoC: fsl_ssi: Move DT related code to a separate probe()

From: Nicolin Chen
Date: Mon Jan 15 2018 - 16:32:40 EST


On Mon, Jan 15, 2018 at 10:16:39PM +0100, Maciej S. Szmigiero wrote:

> > /* Check if being used in AC97 mode */
> > sprop = of_get_property(np, "fsl,mode", NULL);
> > - if (sprop) {
> > - if (!strcmp(sprop, "ac97-slave"))
> > - ssi->dai_fmt = FSLSSI_AC97_DAIFMT;
> > + if (sprop && !strcmp(sprop, "ac97-slave")) {
> > + ssi->dai_fmt = FSLSSI_AC97_DAIFMT;
> > +
> > + ret = of_property_read_u32(np, "cell-index", &ssi->card_idx);
> > + if (ret) {
> > + dev_err(dev, "failed to get SSI index property\n");
> > + return -EINVAL;
> > + }
> > + strcpy(ssi->card_name, "ac97-codec");
> > }
> >
> > /* Select DMA or FIQ */
> > ssi->use_dma = !of_property_read_bool(np, "fsl,fiq-stream-filter");
> >
> > + /* In synchronous mode, STCK and STFS ports are used by RX as well */
> > + if (!of_find_property(np, "fsl,ssi-asynchronous", NULL))
> > + ssi->synchronous = true;
>
> You are setting ssi->synchronous in the AC'97 mode here, the old code
> didn't do that (see the next patch hunk below).

Will modify this part. Thanks