Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2446758pxb; Sun, 24 Jan 2021 07:16:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyxjjxG8+LSH/tRhSz1N3TlGmX6kphPDpMT+lbpcZkbv8wLM1zetpjCHcsotdXgqp0u+50N X-Received: by 2002:a17:906:b047:: with SMTP id bj7mr824643ejb.335.1611501402777; Sun, 24 Jan 2021 07:16:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611501402; cv=none; d=google.com; s=arc-20160816; b=y+RgXlyYMCZOFMWlflbbkbT81vZmfAPkZ8uItt6xbq2wZdNpedLGbAjV49wk9OoHKo sgmP2d6vAQAv9nRkHV8qsCKhlbOk/y4ePE1f7E2cHuXIfJmXlyeWxT1hY15HaPnFJLQY xQec+Wz7q+/vvtZs2zyvuf3yEyGNPHavH2D8SKB6NPA7xcUsjsJiso75C5eq3XCx9pN2 c2P3icw20SWPSooFg9uZreUYiz1ABL3BefX5lYbhIzDtHdRGlGj9XClT0DyaY4GYHWfU GD9B4hNx/X2y3Z5fbmYnmZlePESPDuUe45tIzPHFWxVos3bbybPWeMO/ZRuJvwgd6bys FdZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=1yL8TLGwSwrdrZ+BH3zvIUKkk/6R7EdaCPJ0fQAQ/PU=; b=lcpxRF7NJR8y8akyLMqa+arDwHrkfAbHTDbWOs/3mEPCTBTxCUbWYxhrQxoBkG2IfA XWgoZFvb3j6IyozdMabGkF9u8Hsnn8inT+qUrb+OaxcbD4uLpXq0kDqdsh4W00GhvTo2 9mNE1vqO+Xw97pegb16/nweliCkwCPWetY2N9dZTzmzm8kNu4jesMIR/3EGcCRuIU/Wb mAw/16zcwFKdEQ9KpCVl9z1BkNhn0OpcqJ+LyJKxlsE5XoJ0j5pCAJg03fdXx2VvQblq AvM9qOgasPa6axg+lNchsOxHOc917ISqAL2N2aPrEC3L6GY7+FIvB56tfmKHkl4K04MS tuNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k14si6390136edj.608.2021.01.24.07.16.19; Sun, 24 Jan 2021 07:16:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726795AbhAXPOX (ORCPT + 99 others); Sun, 24 Jan 2021 10:14:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:34580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726324AbhAXPNb (ORCPT ); Sun, 24 Jan 2021 10:13:31 -0500 Received: from archlinux (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 40A9822B43; Sun, 24 Jan 2021 15:12:47 +0000 (UTC) Date: Sun, 24 Jan 2021 15:12:42 +0000 From: Jonathan Cameron To: Dan Murphy Cc: , , , Subject: Re: [PATCH 2/2] iio:adc:ti-ads124s08: Fix packet read from the ADC Message-ID: <20210124151242.285ce9c6@archlinux> In-Reply-To: <20210121191431.12057-2-dmurphy@ti.com> References: <20210121191431.12057-1-dmurphy@ti.com> <20210121191431.12057-2-dmurphy@ti.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Jan 2021 13:14:31 -0600 Dan Murphy wrote: > Fix the spi_transfer array in the reading of the data from the ADC. > > Fixes: ("e717f8c6dfec iio: adc: Add the TI ads124s08 ADC code") > Signed-off-by: Dan Murphy I'm not really following the changes below.. > --- > drivers/iio/adc/ti-ads124s08.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/iio/adc/ti-ads124s08.c b/drivers/iio/adc/ti-ads124s08.c > index f05d4e0e1c9d..023d81c7e8da 100644 > --- a/drivers/iio/adc/ti-ads124s08.c > +++ b/drivers/iio/adc/ti-ads124s08.c > @@ -201,12 +201,10 @@ static int ads124s_read(struct iio_dev *indio_dev, unsigned int chan) > struct spi_transfer t[] = { > { > .tx_buf = &priv->data[0], > - .len = 4, > - .cs_change = 1, We should still need to provide a length for this transfer. > }, { > - .tx_buf = &priv->data[1], > .rx_buf = &priv->data[1], > .len = 4, > + .cs_change = 1, That's unusual... cs_change being set on the last transfer means the opposite of what it does for earlier transfers. https://elixir.bootlin.com/linux/latest/source/include/linux/spi/spi.h#L905 Or is the intent here to provide a performance hint that the device doesn't care if the cs line goes inactive before stating a new set of transfers? If so add a comment to say that perhaps. > }, > }; >