Received: by 2002:ab2:5c0e:0:b0:1ef:a325:1205 with SMTP id i14csp4508lqk; Wed, 13 Mar 2024 14:28:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWk0Juz9WUr4djM8IAp4PGO7uwwAQQWc0GYXC89IUN3eE34/c103u2hp89Dwwp8G/bDO2F710boiiLGe9A2NBgI43dEUtFy9l4LT1TT8A== X-Google-Smtp-Source: AGHT+IE6e+V6wCJcdz8LhjBMa4DiSCUNOv7sptPZ1Z1EgGWFFtwzlSQsxVz6eMkrKHVOKNrxAoaH X-Received: by 2002:a05:6808:220e:b0:3c2:5779:2568 with SMTP id bd14-20020a056808220e00b003c257792568mr1102471oib.7.1710365327414; Wed, 13 Mar 2024 14:28:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710365327; cv=pass; d=google.com; s=arc-20160816; b=m3oZ4YOgoNBNUIUwdpGYKL7a0E43SZN8/vWQ/2dvz8t78zAEXXeuFNXQd2jek3rFdz 5uAZA1ZbgHOBTKj+ugllLOpOpQtdlc7kMAFhcghZNMU21WP6HCpDBQmfUQCFminA+oph bmrPsfiHNfUEXFz4s8f8Fk45xOyS09de546VKzf1D80hGKa2Vwx43ccXbMFmakWmie1E zWar49nUR2fSxC8gWXDNUSsE0X7WBGsOfx0X+fptHotAt3bo5sk7I9+IZrDdefS1LTbs 9ljgpSwA0jnuzu0kFZNQQiOXdm7d9xiuvumYUW1DdyxUul6vpgpW2b2r4YcCDYYtnl0m vNmw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:date:from:dkim-signature; bh=0wUCdfTlBp/YfXMcGHoinplBi1n5Hc9gQtnu97VJ3AM=; fh=MtSqu59Y69MJeAQeAe5GYVtWKV9ym9GavCrl3oOZ6Po=; b=HVlMFpBOXe0W9yB0fp/LPmVM85x8KIcFuhR23aQKy6dDKXB8SZQdGf4dcrbnBWCpeG p1tK0WzGlGWC5Zy3Yep8NXNMW1WwQUxDSHvpzqerXfSOADeqLQOmz+WHVVhSzHDgoAnF fx04faj95NZfGOG74qKvE0rtz2G1lNU3rL68+CGk5vkYV0NDlq5xRNPHtTCOSWWmFV1U LytRv/2xT1f7kGtPn5FcL9Ib+6DHbRdhLfBaLI+A869xkRasT+3h6tmQJGiIMWRLAu+C oe1erqcO6+dZ+rZZ60N10WDMfhD54F7GrK+HHbaNXf1I2HhD2UZ84dk42we8QkiE0dfw B5fA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BcLw5MmA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-102533-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x18-20020a05622a001200b0042f201ccd72si15980qtw.551.2024.03.13.14.28.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 14:28:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102533-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BcLw5MmA; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-102533-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7D1D31C22C65 for ; Wed, 13 Mar 2024 21:28:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B95453E2D; Wed, 13 Mar 2024 21:28:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BcLw5MmA" Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BFFF51C33; Wed, 13 Mar 2024 21:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710365298; cv=none; b=IhVKNTEY31PNKVDzx6TzWe1ho0nAh+wVPUrMM3922ndEBYQGnB/08GLk9n0oDmHHIcprnXJZdl/z6/mD4iAg1zb7Zmn3unhfwtgxzGFqd0J3OJWnHEMUa1CsFIXjdst+xEwr5fIoCz49DgrhcwhEAsdbafP8IfG+QgDvunaWwco= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710365298; c=relaxed/simple; bh=BCSQ3+Avo31GBuSK1eBVxjpyATy24CW2Pg0XWqSmcNo=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pnqvwz4JeLOijmfKpI52JC9sx7Y3XiW7lGf1OWV8LyK13rQVw4KwYRLD9qDIgsuVzoJTh6exRdVcM9TdIl+eSo6FRroEDpmL2BVcg0T57z4TB/Mz19mXqKAqDFcXoi1Dn90+NkZvmMgloCxnTa+j/Ja+itZMRtP9V1yiGW2h18M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BcLw5MmA; arc=none smtp.client-ip=209.85.167.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-512bde3d197so354667e87.0; Wed, 13 Mar 2024 14:28:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710365295; x=1710970095; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=0wUCdfTlBp/YfXMcGHoinplBi1n5Hc9gQtnu97VJ3AM=; b=BcLw5MmAh81z2EwWlbUNZQlm+uSlh3dlD9IUnRv25j4WsbiQOmd5C0BVa6MqdM7SF5 b1W6Bats8zJp+oxt/Ome21l5TSW0UOpq9jvesYutTJEBvoeuWkZe4HptphuPkhPUtlw8 NsNuGLq3Eg7p8mBbrUoKHrLveSsxvGmON+jAhGdk55DRhqnwSP+lwta4q808kmoRXTsW vqPMQ9azSJyhWls7UINXRgz7d6o97PhwfLLY83Lp3XfuDieF1Fy8uKY8+LlWbSqLF+bR it8cfQ1q5ORlk1BRh1GS1fevkfPQYJ2GlLT5WnFMUn0pc72juGNS0N7MfSBMmB3M+hMH 3Ikg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710365295; x=1710970095; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0wUCdfTlBp/YfXMcGHoinplBi1n5Hc9gQtnu97VJ3AM=; b=cO9q6+I1EnqVfP1PgHHEOkIi/TJvDELxnCIArIdkYRdWddz5q7AF/c6WS/jWvTWCZM D+jh2s2SPZR0TUqB53fzAzEpIPpEwt6NN+aDkJBXwVqffoApzsbzODX4WFiEB2RMZxHk ftuFvbyRUC8uVmr6unRF0TVfiT3+AtuK/dGuyJQ7AJ0mPjr6PxDtzMKmCFsWxsRWhTJl gC3jh0oE7o23OPdbAv3JjcGt8FCO8f9laxj6/avvsDGguQLKVWMdMdUchmvmdK83k2W3 11d9fcLv6qWrBf6OutXudkwQuj7vN/wwW9Dl19WgDkb/x9PXYf8YMgTnBXg05hI5dLj+ mtwQ== X-Forwarded-Encrypted: i=1; AJvYcCVrR33uOGiB3sZpSSvF3D6m5LLw/sJw7DAbDjPgaOf5z0iA/SEx3Uq+mT/8cuDkaQ/AdHpgOSi61/H4dEa7Ud9qe353Bce32tFuhQysJerzQ/yzUYnCbZZFkkLnFv4IdJQBTZa5uI3/ X-Gm-Message-State: AOJu0YwpQCtNCKBlxhipcN9pdGlKUDXTTEKNSSmSEiqcyOdxP+3Khlky tORE0MvFGOMwexmhOm21k6eahq+jL6IG34gdpNt9InoizvXO9UKRxyCHoSey1xRTMMA1 X-Received: by 2002:ac2:58e5:0:b0:513:9e44:c68c with SMTP id v5-20020ac258e5000000b005139e44c68cmr7559056lfo.6.1710365294951; Wed, 13 Mar 2024 14:28:14 -0700 (PDT) Received: from vamoiridPC ([2a04:ee41:82:7577:fa35:157e:1a40:3463]) by smtp.gmail.com with ESMTPSA id h11-20020a1709062dcb00b00a4662df0319sm31379eji.65.2024.03.13.14.28.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 14:28:14 -0700 (PDT) From: Vasileios Amoiridis X-Google-Original-From: Vasileios Amoiridis Date: Wed, 13 Mar 2024 22:28:12 +0100 To: Andy Shevchenko Cc: Vasileios Amoiridis , jic23@kernel.org, lars@metafoo.de, ang.iglesiasg@gmail.com, mazziesaccount@gmail.com, ak@it-klinger.de, petre.rodan@subdimension.ro, linus.walleij@linaro.org, phil@raspberrypi.com, 579lpy@gmail.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/6] iio: pressure: add SCALE and RAW values for channels Message-ID: <20240313212812.GE1938985@vamoiridPC> References: <20240313174007.1934983-1-vassilisamir@gmail.com> <20240313174007.1934983-4-vassilisamir@gmail.com> <20240313195110.GB1938985@vamoiridPC> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Mar 13, 2024 at 10:04:05PM +0200, Andy Shevchenko wrote: > On Wed, Mar 13, 2024 at 08:51:10PM +0100, Vasileios Amoiridis wrote: > > On Wed, Mar 13, 2024 at 09:03:08PM +0200, Andy Shevchenko wrote: > > > On Wed, Mar 13, 2024 at 06:40:04PM +0100, Vasileios Amoiridis wrote: > > > > Add extra IIO_CHAN_INFO_SCALE and IIO_CHAN_INFO_RAW in order to be > > > > able to calculate the processed value with standard userspace IIO > > > > tools. Can be used for triggered buffers as well. > > ... > > > > > + case IIO_CHAN_INFO_RAW: > > > > + switch (chan->type) { > > > > + case IIO_HUMIDITYRELATIVE: > > > > + *val = data->chip_info->read_humid(data); > > > > + ret = IIO_VAL_INT; > > > > + break; > > > > + case IIO_PRESSURE: > > > > + *val = data->chip_info->read_press(data); > > > > + ret = IIO_VAL_INT; > > > > + break; > > > > + case IIO_TEMP: > > > > + *val = data->chip_info->read_temp(data); > > > > + ret = IIO_VAL_INT; > > > > + break; > > > > + default: > > > > + ret = -EINVAL; > > > > + break; > > > > > > Is it mutex that prevents us from returning here? > > > If so, perhaps switching to use cleanup.h first? > > > > I haven't seen cleanup.h used in any file and now that I searched, > > only 5-6 are including it. > > Hmm... Which repository you are checking with? > > $ git grep -lw cleanup.h -- drivers/ | wc -l > 47 > > (Today's Linux Next) > I am checking the drivers/iio of 6.8 (on sunday) and I can only find 7 drivers that use it. > > I am currently thinking if the mutex > > that already exists is really needed since most of the drivers > > don't have it + I feel like this is something that should be done > > by IIO, thus maybe it's not even needed here. > > > > > + } > > > > + break; > > -- > With Best Regards, > Andy Shevchenko > >