Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp1927766ioo; Mon, 23 May 2022 06:29:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMQ4ffxRUsGlSTtZ8QmMeYmPhih/45rq1Y+Zkt/TVuYo6kT90/iPynWSmpV8PlGuiPvC+t X-Received: by 2002:a63:350c:0:b0:3c6:bf88:1509 with SMTP id c12-20020a63350c000000b003c6bf881509mr19935634pga.144.1653312565375; Mon, 23 May 2022 06:29:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653312565; cv=none; d=google.com; s=arc-20160816; b=qxZwRzHUcvbe8oW4tHV8/Q50ftH5f8QQwFsddG2sSqUabn9JCRMYtFrINCmiUEXTj2 B2xyV83qKF3oWfaxub9oOgzdO/4NctWPgHzbp9tMZDKGX9D8Akmtkq4LA0lJkL+6CBgh z3QzF63U5mdmyNuYEQ1XAH5GtjvtV3zEKnv3FqdnOwFrkHkAIn0BAlTgz7fns2/8Rsd0 HiZN8W5jlrTBJqomefMhb2tHUdrrjVf72yC5ES8tTjCx4jwjALrZRhaP8pdBPyaMRRgO gncakhSRQYiyIKoCJYgJx3w80Axbamm40daUK/eOxuQxA4IzO+LXjA9m81HyN/65pztz HuAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Y0zd19VxuIMnHIWldL0SvNH4q5k0pFVaTC04lTgZ7QY=; b=cl1B+mVgX9tM4fyCBO1gZpp3XN0yYdUMeNN2bnxQjdLCMnRzuMWxN36BKa1WEsHCm7 QflOX8HweJgbR8QEKJ7/l09TWKQFORrDBV5wbjuFEQuGvqdrWvvLYLa3X3ze0qBD0o3Y U0ni082tnUwG/ALgBAVRsbZjf/iENaLnmWQuRak3Iz3UXnm06m9DtKxECyKe9Nl+WvNw R9rGy8qscM+1fxwLrQjYQ9pmVWA60EgpSR0izj8KlMHPEw9A0xZ0a2FgVBEM26FfMvWc zH0dVICZN/NuT5pbZLXvWsNEccejpMrx5/iVwaTJ+Na+i9iakBaG6tLsEelDRzeJFNmj xb5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmfXRMOC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id v35-20020a631523000000b003ab358a4d44si10065453pgl.199.2022.05.23.06.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 06:29:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GmfXRMOC; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3799635ABD; Mon, 23 May 2022 06:28:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236245AbiEWN1b (ORCPT + 99 others); Mon, 23 May 2022 09:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236232AbiEWN12 (ORCPT ); Mon, 23 May 2022 09:27:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBDE2205DE; Mon, 23 May 2022 06:27:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E433E6090A; Mon, 23 May 2022 13:27:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78DBCC385AA; Mon, 23 May 2022 13:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653312440; bh=Fermaw7N8qoNQ4T1a2iSIeEbX8O6G2yVSE7iwmWudss=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GmfXRMOC2Jq8CtoOUwJM1VavjbnVJHeeB2gILExxly8MAmqfZhHJ/Wbnr31lmZuc+ wRYq40jnFTKkb3zYRyUxxTQUQpqVs0a4kIHq63BCjYQUhRuBoy2D6eH6z/Ej1AeGaF 6BHiHODEZcD3AZyIAhNjlzgE3lnY71oyD36cxdomuHb6WNEHvv+UwAU5NDRummaDEW +1m1ydammfOJGvtM/NL8NcetPtsFcmCYvZ/GqSfMLzANNIFU2QjyFAT4mLNN8rukP1 R+yTG4FRygSuXoQk/3MI2kt0CQzuRlLunp4sIopod04gQGVl4fnjUfZwZsxvpK4tNf Yf5X984hpF2/w== Date: Mon, 23 May 2022 14:27:15 +0100 From: Mark Brown To: Oleksij Rempel Cc: Shawn Guo , Sascha Hauer , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, NXP Linux Team , Fabio Estevam Subject: Re: [PATCH v1] spi: imx: mx51-ecspi: fix clk polarity and phase configuration for CS > 4 Message-ID: References: <20220523073143.778664-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dE31JipDzIkqI+Sx" Content-Disposition: inline In-Reply-To: <20220523073143.778664-1-o.rempel@pengutronix.de> X-Cookie: Sales tax applies. X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 --dE31JipDzIkqI+Sx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 23, 2022 at 09:31:43AM +0200, Oleksij Rempel wrote: > - /* set chip select to use */ > - ctrl |= MX51_ECSPI_CTRL_CS(spi->chip_select); > + if (spi->cs_gpiod) { > + chip_select = 0; What if someone mixed GPIO and regular chip selects and 0 is one of the in use chip selects? Ideally we should check for an unused chip select here, though the current change is still an improvement since we'll at least only write in the chip select field. --dE31JipDzIkqI+Sx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmKLi7IACgkQJNaLcl1U h9CxGQf9H/g5UyTrEeUzmcTSlNIAMnppIbjCjex9k6S57Xm+hDke4Pu3hHQmxRe7 gBeCNC2A6VJWqPTY0L1M7atQO/FAOpMMoUjCkw7w/aM1Oz42j6HL20euo7HL/lud olVB7SeBhWwQMriA0M5QUiDkxFi5Zx5xb3vCWPdPqdHf3T1nu45Y8vPGdv0cWGbT ogcKA5d0UYF4RCH24yAe1r2nRCWQerheg8MxgcY5rP0uFJZABL2aAvUKk/iydXEN pUEPXVdcfv+rrf82Sz1Zz8Y+hmDe0F6OqWz40xT+Dbhdoo9KEkHtmkSnxD2EZFLR VQmADajaeyoUXMUtQFbO3gLDs1TzBQ== =KLbp -----END PGP SIGNATURE----- --dE31JipDzIkqI+Sx--