From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750876AbeAOVcb (ORCPT + 1 other); Mon, 15 Jan 2018 16:32:31 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:41302 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750732AbeAOVc3 (ORCPT ); Mon, 15 Jan 2018 16:32:29 -0500 X-Google-Smtp-Source: ACJfBotzMvshL8B1K6Gvy0YvJO1fX8FystqxNjq24+aY4wJt1S8TwvBmc+AzV71gTn6GvInqwUN75A== Date: Mon, 15 Jan 2018 13:32:21 -0800 From: Nicolin Chen To: "Maciej S. Szmigiero" Cc: timur@tabi.org, broonie@kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, alsa-devel@alsa-project.org, lgirdwood@gmail.com, fabio.estevam@nxp.com, caleb@crome.org, arnaud.mouiche@invoxia.com, lukma@denx.de, kernel@pengutronix.de Subject: Re: [PATCH v3 16/17] ASoC: fsl_ssi: Move DT related code to a separate probe() Message-ID: <20180115213221.GA10868@Asurada> References: <1515990087-11598-1-git-send-email-nicoleotsuka@gmail.com> <1515990087-11598-17-git-send-email-nicoleotsuka@gmail.com> <0be4b57d-cb28-896a-3d97-f36316a351c5@maciej.szmigiero.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0be4b57d-cb28-896a-3d97-f36316a351c5@maciej.szmigiero.name> User-Agent: Mutt/1.5.22 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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