Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp334433imm; Tue, 15 May 2018 02:21:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpfiGbJ9SLi+s63y55g5g3BAzrx9PGX2JMyFFd2xE7lN537TK2EkNPwhUY6jO46tq9dKVPo X-Received: by 2002:aa7:864d:: with SMTP id a13-v6mr11299932pfo.199.1526376097092; Tue, 15 May 2018 02:21:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526376097; cv=none; d=google.com; s=arc-20160816; b=ss0gStO6RaLcK2UedFb4IOOCdg/jmNi7/8dgsajuy6XimZTDMo4jbkDbnWn5ZU3B1U nlnafC4kMynesyR1WzXLqdOPALclP+Yj2VVAWKB4xURvsKn+naclf8cjZiBjAfrqsWIP uq9mK4l3NEfT7dzQX37x2LF/SDqUDngLfPtMH3jErZxymixoJxFqbO3MH9TrCxrsjKtj AGkSwt6Db2UeWr+OuggUCxoybImuhrg8tfPMSIbwjs1s0E/uS6FgftENsm6r+HaAdBZD V2zzAweq/HjUNNFcEFRuFuLmOXgSHYZtZe65qV1fXy5MOo3CVwixkUdclR0O5Yea7OIc t4VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:to:from:subject:message-id :arc-authentication-results; bh=mqFQC7/BnRbuLf6OpRg7UhuDqu1Av0cwLXurKOQpzac=; b=DzJ/5CLMa93ZgE1EaEnu+vl1vsKNHUxDUGyHOKltajMcC9JKXoTKgS4+2/0MCxI6ci QrAAJJYst31aBrHKIR0xWPFOZpjW4dv9U2MLmOWeYVPDNv7mTrZHnvvBW99y0If9G425 D5PoY2cwO3cVEF8nM7XH8GIAWJTJD3B/5bgQRU1qlOYBYYqsHutB9jndXw1gKNFZq0kG Ws/LfdGuNcG4G88OmO1KdEuDa1pgS0XpjXFaQjzm5Wscy427Pdt/tHbK0jt29o1EHsQj Hs2vNNzcwKEQcclKxWJqEiQ74k+COyVodhwEE4D/oMkeriEFIPlQJNMSkvRYlB83lbHw mhaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r6-v6si11673297pfi.147.2018.05.15.02.21.22; Tue, 15 May 2018 02:21:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752614AbeEOJVP (ORCPT + 99 others); Tue, 15 May 2018 05:21:15 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:63196 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752226AbeEOJVN (ORCPT ); Tue, 15 May 2018 05:21:13 -0400 X-IronPort-AV: E=Sophos;i="5.49,403,1520924400"; d="scan'208";a="14192677" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 15 May 2018 02:21:12 -0700 Received: from m19893 (10.10.76.4) by chn-sv-exch04.mchp-main.com (10.10.76.105) with Microsoft SMTP Server id 14.3.352.0; Tue, 15 May 2018 02:21:11 -0700 Message-ID: Subject: Re: [PATCH v3 5/6] spi: at91-usart: add driver for at91-usart as spi From: Radu Pirea To: Andy Shevchenko , devicetree , "open list:SERIAL DRIVERS" , Linux Kernel Mailing List , linux-arm Mailing List , linux-spi , Mark Rutland , "Rob Herring" , Lee Jones , "Greg Kroah-Hartman" , Jiri Slaby , Richard Genoud , , Nicolas Ferre , Mark Brown Date: Tue, 15 May 2018 12:22:24 +0300 In-Reply-To: References: <20180511103822.31698-1-radu.pirea@microchip.com> <20180511103822.31698-6-radu.pirea@microchip.com> <5a3930b867cf8c279953d08c5d5dd1d93113a43b.camel@microchip.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-05-14 at 20:38 +0300, Andy Shevchenko wrote: > First of all, do not remove mailing lists from Cc and people if you > are not sure they do not need your stuff. > Sorry. My mistake. > On Mon, May 14, 2018 at 11:11 AM, Radu Pirea > wrote: > > On Sun, 2018-05-13 at 16:33 +0300, Andy Shevchenko wrote: > > > On Fri, May 11, 2018 at 1:38 PM, Radu Pirea > > .com > > > > wrote: > > > > +static void at91_usart_spi_cleanup(struct spi_device *spi) > > > > +{ > > > > + struct at91_usart_spi_device *ausd = spi- > > > > >controller_state; > > > > + > > > > + if (!ausd) > > > > + return; > > > > > > Is it even possible? > > > > Theoretically yes. > > I would like to know real circumstances when it might happen. That check was used in debug stage of driver. I will remove. > > > > > > > Anyway the code below will work fine even if it's the case. > > > > > > > + > > > > + spi->controller_state = NULL; > > > > + kfree(ausd); > > > > +} > > > The question is, why you didn't utilize what SPI core provides > > > you? > > > > I tried, but it did not work the way I expected. > > So, what is not going as expected in "SPI core takes care of CSs" > case? > Did you use oscilloscope for that? Yes, I used and CSs was not asserted. Anyway, I will will try again. >