Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30333668rwd; Thu, 6 Jul 2023 04:33:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlHWUwXt9mCO639aOplV+7X6y9m30b5OelNOMrNDaSmuKKWZ90lN2FB0xoJTMdOHEbwf5BBV X-Received: by 2002:a92:d092:0:b0:345:ed70:9a80 with SMTP id h18-20020a92d092000000b00345ed709a80mr1797760ilh.14.1688643237804; Thu, 06 Jul 2023 04:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688643237; cv=none; d=google.com; s=arc-20160816; b=HB0uXdmKPYoy0NDSqL7T7BO6mhZaHGnN+UH/uqgpTjHjLs6BWtREVd7B9JPcSv4NR9 WerbS9jiqulCmsEdk7JKI1FuZK3/TJt/ovPnbZ7fcSoZFMsn3mnQnPW6YumAZKRO4mtn Fo8T1uKXpvfParGAuV+Q4kL4xaPpZMskGwv2zqFnGdYbU3aPElooglU19iCRpMGA4RiD mpeS5nfn0d3KLy219K+JxBRZB1LGDSOSMOwEXe1a4VeoZ/biKwo/VHhYNZImPrCCN5o4 yhdzYk6WG6Kv6tkgRZl66Vay+wdBXgpjrM9rVhveZviKQO4uxlCaCK+U9miZFph/7pZT XQRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=G84Dw5Ig2Kfn04ePqxCMIByfKhRpoEBfGjJKCC/CPmY=; fh=i7e4MupgioN3KEFm8dV4z9mYBZMQvnwKWgepG952Ivo=; b=G/RtXCctA+a3p6fgm+4mF9DbA9OtfA1ZqyDf7VLVVuTh0j9qUjRaFGzhsOQEDLK/Zp 7onMZbnJEFZCW7AU4akKeEq8CeUYsUT1H+94cDRBtRYF7pJtdtcq+0O1iWcWbWsX5Usi Nk9VtJh1eXI4de/UKmKJTTqwAUMJXBYr6iORT5Frm4dCtxp4Km0D/tyx9D2EJHw1+ytK p2l4hEK7afI9XTHp8kltNyvxAPT+/iL5dul8fL/ZzFtsIJZ9BRiROKPQg9UQ202pJBRN w++39PUMeT8E0BRkSWlnb7h43ei755qam0h/kFPN+KcxQ1QxiFWK2L086OtUsQTqLHxN Oigg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=lpWMMMk4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b64-20020a633443000000b0054294720d51si93506pga.386.2023.07.06.04.33.45; Thu, 06 Jul 2023 04:33:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=lpWMMMk4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231482AbjGFLIO (ORCPT + 99 others); Thu, 6 Jul 2023 07:08:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229654AbjGFLIM (ORCPT ); Thu, 6 Jul 2023 07:08:12 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4D24DC for ; Thu, 6 Jul 2023 04:08:11 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-5344d45bfb0so24506a12.1 for ; Thu, 06 Jul 2023 04:08:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688641691; x=1691233691; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=G84Dw5Ig2Kfn04ePqxCMIByfKhRpoEBfGjJKCC/CPmY=; b=lpWMMMk4+M0UTvc4sZgFla6gp1hZlkV4OKhMXVYtfsGRR5RgjYLg8+nN57lnngqdDr roBBzjzs1kupP1nDWffXYGrAJSCQTf0NzR+moyuBLb05NGn+eACyWiSj7VHaR+70lUUj FBp+UVssD1OqIRFeOoQEnEaJaYnSqWz+ABco3/EWzVtaZtkc9Y3TuoHzObw1MtKte6qw LPt0Pd0oMmqXx8yXG0tsAUaYYL5E1WMWnf4grrV7EshAJjOb3mjlcau7K9mR1lGGB/Oy ISDa/m3wtaENvJrpUL6WXLSPEDRhI51vdn050i5eU/m6Xz0p88291mqwWp3J1DuV0SJe rh5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688641691; x=1691233691; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G84Dw5Ig2Kfn04ePqxCMIByfKhRpoEBfGjJKCC/CPmY=; b=DTvjWnIFM+51vPnnKQDQ5iFDL1So2sC+QzipPRDyfv6ON5Jpkbehb/kXe+gCYOS95q S8mljatr1Ns0vTW71z/K04GgAxC3zNfD43d99hyc7nBSHcNJxasAt0DLo6xcsCh+VjYj bOdbMyilTP6kizGdLpcgcst6QE2YrL9Behcu3Qlx5Chcrw/8AJaBZMd5NqPrhxVbQc30 LYHUC8TMeChjrAbC+bXDLomdNuRhsSHoLK1ZfIPTd4YeWUba22amLgj525InNCMhkSfh 8bOwofqdfSvC8EckN3404aQtnd772SjLAscXbSW14piIBsazB2AQqplzItJhBFGSLb2L PRZw== X-Gm-Message-State: ABy/qLbqFjF0Vkpfb4CseJJJDOKuaoANV5CAz8o+ZpYwrNRO/YUfPpDf wUbSs+x39jfMuDJF2LYawGA8za1ghloEaGtt5Yw= X-Received: by 2002:a05:6a00:2d06:b0:66d:d03e:3493 with SMTP id fa6-20020a056a002d0600b0066dd03e3493mr1751099pfb.2.1688641691084; Thu, 06 Jul 2023 04:08:11 -0700 (PDT) MIME-Version: 1.0 References: <1652963808-14515-1-git-send-email-shengjiu.wang@nxp.com> <20230706084706.bzwsbi3zisx5m5rl@fatal.se> In-Reply-To: <20230706084706.bzwsbi3zisx5m5rl@fatal.se> From: Fabio Estevam Date: Thu, 6 Jul 2023 08:08:00 -0300 Message-ID: Subject: Re: [PATCH] ASoC: fsl_sai: Enable MCTL_MCLK_EN bit for master mode To: Andreas Henriksson Cc: Shengjiu Wang , Nicolin Chen , Xiubo Li , Shengjiu Wang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Linux-ALSA , linuxppc-dev , linux-kernel , =?UTF-8?Q?Hans_S=C3=B6derlund?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andreas, On Thu, Jul 6, 2023 at 5:47=E2=80=AFAM Andreas Henriksson wrote: > We've been working on an i.MX8MP where MCLK needs to be input and found > that this enables the MCLK as output despite not having set the > `fsl,sai-mclk-direction-output;` devicetree property in our DT. > Reverting the patch fixes the issues for us. > > I have to say that the code comment made me a bit confused, but once > I found the commit message I understood why this code existed. > If this is really i.MX8MM specific maybe mention that in the code > comment and please make the code actually only trigger on i.MX8MM. > It seems to me like these all fulfill the current criteria: > imx7ulp, imx8mq, imx8mm, imx8mp, imx8ulp, imx93 > > Should I report this in bugzilla.kernel.org ? Should we do a fix like this? --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -1453,7 +1453,7 @@ static int fsl_sai_probe(struct platform_device *pdev= ) /* Select MCLK direction */ if (sai->mclk_direction_output && - sai->soc_data->max_register >=3D FSL_SAI_MCTL) { + sai->soc_data->max_register >=3D FSL_SAI_MCTL && sai->mclk_direction_output) { regmap_update_bits(sai->regmap, FSL_SAI_MCTL, FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_= EN); }