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 X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2DE1C432BE for ; Mon, 30 Aug 2021 10:07:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 89FDD610A2 for ; Mon, 30 Aug 2021 10:07:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235604AbhH3KIN (ORCPT ); Mon, 30 Aug 2021 06:08:13 -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,