From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 534CBC10F07 for ; Fri, 1 Dec 2023 23:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4WhJZ+qTS14TZfYTCoLEFYA5gHf6/fix9ksRR3ziftM=; b=s5cdBeBlvZHRTH mgq6hQr/ywUFC1Xr7xwUOHYOUuzGZQA7r9YJk8Bo51093gz+sBis+PFRDcaTagtByZH2bSlj6aps8 n3H2hfoNiUR23nz/zkcSjzPXlD5mcCQdk9Pv2mHX0OABWds5KYSPLxCflvDKOOWxKIUWZ62wlPh7s d6j0KH6gAFkvkl2ZwbVM2N9tAABAiUG4GYt+LnWE4maPA3ChM1nWR14fWRtHw0sRi5ELyXmamcSYp KCABPVqibHcGQR+ZvubRgoUU7jgGgW3yw4c1RRtD0XcHuVBrt3JHLBAk/ZACgQvp/sDd5GEo18EG0 ex+1tIaWeRu/1lji8nTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r9CgT-00Eodh-2Q; Fri, 01 Dec 2023 23:12:33 +0000 Received: from mail-qk1-x72b.google.com ([2607:f8b0:4864:20::72b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r9CgR-00Eoci-0P for linux-arm-kernel@lists.infradead.org; Fri, 01 Dec 2023 23:12:32 +0000 Received: by mail-qk1-x72b.google.com with SMTP id af79cd13be357-77d63b733e4so145697685a.2 for ; Fri, 01 Dec 2023 15:12:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hefring-com.20230601.gappssmtp.com; s=20230601; t=1701472349; x=1702077149; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=a50PSVMEXWIrlF9Tli8fOmbsqWneSFikUwGhyJPwIGY=; b=wUowAKpeCN9iuUUpEzQe8IZT5dMhF1V2UD/6ftrXah3BdVjaMMjaCCC8/mZXdz+f7W j84VcI40y9ERiynh4MqjPPVHiOoSIIYMJn/uMVI6TiUqTH7FbYIhS1pk/LdTPexrHdX5 nceGdAWv/Ku1b6LqSkxX4V5Z/fG9kXfYgdsHy92YzRJb290ZhR65x1Q042gqGu6Ywzo4 g3Z2LIgFY4Wt2rcJxxMCOcAFvmteK/oh2dsbd9fLQ0n1bCCWoELOvYI/41bq7ahjMcmO 4SvC70CsIkC2CZ8iNzlHMBSLl9Lf0g7DwKn3la7sNG12YZthypV98BQli5cx7MiP8Exg DmlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701472349; x=1702077149; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=a50PSVMEXWIrlF9Tli8fOmbsqWneSFikUwGhyJPwIGY=; b=t0JHBDPzkVXXdmmk9ZyaBcVyyGcHVPU1N7glZ/9/U0GJQcwa/CbEPX/CGqfwQlgU7/ VLAkWNdRxgldTX1gtzPLPEMdXbJWbNNovUkJjmCTKsoGFVRZXoZJL9vw0Rl4s47xR0BO lli6XS+HTCfPcdtKxLqh8nZCfT8EqBYgdzCXI4wLvT6TcSDch/gtJ2sqjSiJD26+PH2w NCbhR7X8PBqFvuA5vHBAiy/gRNQ0ns93pFP2vzQPOTc/yYdTcQNbmxLCItjzBOn0qJXZ zR1xPl/ehEPYCz3kWGhYzWqHbSmk/zIsAfj7MMubVnkvXd5iYNjW0lZ9Ewf5ym/7AugZ Zxww== X-Gm-Message-State: AOJu0YzTDNn6FH9+2Hk4GKK1REOy0eMXks2otjOgim+GNl0QAnpXEH5Z cs6tWtb69hf/48C8i+nHIWlmRg== X-Google-Smtp-Source: AGHT+IF3Z3/RzfTwbCTpw0iP7Wf8/w6zwvmRXwU6DVH7OKN9elzjeew+laW1/G83KjRpnw/aIrbT5g== X-Received: by 2002:a05:620a:8209:b0:77d:9fde:23e2 with SMTP id ow9-20020a05620a820900b0077d9fde23e2mr343467qkn.20.1701472349734; Fri, 01 Dec 2023 15:12:29 -0800 (PST) Received: from dell-precision-5540 ([50.212.55.89]) by smtp.gmail.com with ESMTPSA id bq42-20020a05620a46aa00b0077d6443ae82sm1910778qkb.83.2023.12.01.15.12.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 15:12:29 -0800 (PST) Date: Fri, 1 Dec 2023 18:11:36 -0500 From: Ben Wolsieffer To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Maxime Coquelin , Alexandre Torgue , Alain Volmat Subject: Re: [PATCH] spi: stm32: enable controller before asserting CS Message-ID: References: <20231201214014.2539031-1-ben.wolsieffer@hefring.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231201_151231_517674_0EC344F8 X-CRM114-Status: GOOD ( 20.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Dec 01, 2023 at 09:50:33PM +0000, Mark Brown wrote: > On Fri, Dec 01, 2023 at 04:40:14PM -0500, Ben Wolsieffer wrote: > > This feels like it'd be a good fit for moving to runtime PM - that way > we avoid bouncing the controller on and off between messages which is > probably better anyway. The driver already does pinctrl management for > the device there. Yes, that probably makes sense. There are a few bits that can only be configured while the controller is disabled, but it doesn't look like that applies to any of the ones set in stm32_spi_prepare_msg(). I'm a little hesitant to make big changes to the driver since I can only test them on an STM32F7 though. > It also occurs to me that this isn't going to work for devices which > chip select inverted - for them we can't stop driving chip select at all > since they need it held high when idle. There aren't that many such > devices and it'd loose us the PM which is rather awkward... I guess > that's an incremental issue with a more invasive fix though. The driver only supports GPIO chip select rather than native, so I don't think this is a problem. Also, I don't think there's any difference between inverted or uninverted here. They both either need to be driven all the time or have pull-up/downs. Ben _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel