Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp3471665pxb; Mon, 30 Aug 2021 03:09:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxummKPIvp2tyDFfoepPEMxZjVAslAVo1fkw79Y3lUJSbR9SSiAaAzpHwpFziokcRye/NU X-Received: by 2002:a17:906:8258:: with SMTP id f24mr24343283ejx.375.1630318176464; Mon, 30 Aug 2021 03:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630318176; cv=none; d=google.com; s=arc-20160816; b=0rwODPMBuQflwCuwUAFIbAf9fTiaYn2dtj3+veBEKdY4xM/XW9BgLNdASVviR8Dg++ r6n1DTbQKCfdt7gdtYJX0UK75xpcAV3JcJ9blYSn1boGrxT8ohS3tddoAiNdUC8baBOQ wsXIpEf/xK4Znb7VAX2ZWrrM7L8NvT+xvPJ4M6mUwrvJtjT/VuQRdN5JEKug6dnSW9yk qbiR/OC1SNsfGen8idHEnHE4KU0lqjkQHxzKIuifGKdnNZsGHnx8MDafcaXgPfVv1KiZ VvmKpcNo00acN+rFsl/Ew/kGJDHoMvX1apch1+OmLzynmL7Ez0ldza6+yUShZ27dpV/d HSRg== 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=7evdQPGrebIDLUs8rkFHqODhz1vo/x2fsKhGJ/SFMLU=; b=gdAXkImUo5ID14VGVGigkMLv9dPzFs2d2PqNcj7XYXirjSHxQoIWS9Tzq447o4GTrR p/BHyQ9cWDHljJfiY8DzMRo9InSmk76DTAyT7oIZV1tQRNqtC9YarzitTpr29EZJeGHj EEAhNbunXdZ1vpqbrjqQ0Af+G6Ho1oKNVSiRw6w2VhwlbTmwtSRks2XU8iWxkP8a7nvv LQGE79CiZBLSJ4qeYgzrRXVSJawBVxa7iLOn5bCKoCcuugOhjMvcdHpoQAwrNDNtaLyT Oer9PvyjLIktTF8o62o5qifhqSbJQtQgvFmy95OWyjqAi1pPo+EuVuXQSaAQ64B5oBMb +R6Q== 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 j3si11180382edq.311.2021.08.30.03.09.10; Mon, 30 Aug 2021 03:09:36 -0700 (PDT) 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 S236299AbhH3KIM (ORCPT + 99 others); Mon, 30 Aug 2021 06:08:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:53242 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236284AbhH3KIJ (ORCPT ); Mon, 30 Aug 2021 06:08:09 -0400 Received: from jic23-huawei (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 02DF2610A8; Mon, 30 Aug 2021 10:07:13 +0000 (UTC) Date: Mon, 30 Aug 2021 11:10:26 +0100 From: Jonathan Cameron To: Miquel Raynal Cc: Lars-Peter Clausen , Thomas Petazzoni , linux-iio@vger.kernel.org, Subject: Re: [PATCH 04/16] iio: adc: max1027: Lower conversion time Message-ID: <20210830111026.2952addf@jic23-huawei> In-Reply-To: <20210818111139.330636-5-miquel.raynal@bootlin.com> References: <20210818111139.330636-1-miquel.raynal@bootlin.com> <20210818111139.330636-5-miquel.raynal@bootlin.com> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; 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 Wed, 18 Aug 2021 13:11:27 +0200 Miquel Raynal wrote: > When only a few channels are requested, the core will request all of > them as long as ->available_scan_masks is present, thus reducing the > impact of any driver side optimization to avoid converting the unneeded > channels. > > Do not share this bitmap with the core, which is optional anyway. As mentioned in previous patch - do share it with the core, but update it to include the masks you now support. As a side note, you should have done this in previous patch anyway given that patch is effectively a noop with out it. (assuming it was a good thing to do at all which I'm not sure it is!) Jonathan > > Signed-off-by: Miquel Raynal > --- > drivers/iio/adc/max1027.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c > index 8ab660f596b5..d79dabf20567 100644 > --- a/drivers/iio/adc/max1027.c > +++ b/drivers/iio/adc/max1027.c > @@ -457,7 +457,6 @@ static int max1027_probe(struct spi_device *spi) > indio_dev->modes = INDIO_DIRECT_MODE; > indio_dev->channels = st->info->channels; > indio_dev->num_channels = st->info->num_channels; > - indio_dev->available_scan_masks = st->info->available_scan_masks; > > st->buffer = devm_kmalloc_array(&indio_dev->dev, > indio_dev->num_channels, 2,