From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.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 3D41C29E0F8 for ; Tue, 12 May 2026 11:05:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778583960; cv=none; b=AriSOlNIfqUedC+5uEkpGxESdQevLm9jZorzjs7gcNV9cDXbWW2gEgdnME35NhngS96vB4m/qNK0wlXifb6XZHkJbtWmQLXE8hqK0loI9sFwap8wYVQv5MGBwwAyAHgGOMg769xz3JM7Szx6GDo0oQ0TOVjH6zDj3E48bo75Dec= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778583960; c=relaxed/simple; bh=yihKF7r74w0pKwj7IKwES1AT1LtYO73g8Ehu3pfaJQI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=coLyFeIPwECJqTK6elxIRlTpVmyLJ8gXPCkYUQUtLUIUblpjtBj9B1jbtfrIxTNPXCRcXJ37pdo3frhAowfzHyWnlGIqWpTUuLcwF3bnIIJVP3jn3yBLrIbvendrr5YXBRGRb7eY5p1RmG7Ty65wDCu0dfRGk5ge/FA7V5TZO6o= 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=jeofbcTZ; arc=none smtp.client-ip=209.85.221.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jeofbcTZ" Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-449de065cb3so4887194f8f.2 for ; Tue, 12 May 2026 04:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778583958; x=1779188758; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=OidTfMPPXPs1lrurNfI8WbziimaZNAI/uHskYuG7YWY=; b=jeofbcTZ3AqRExLzMOU5OAbgBEice6Dmx7hiksNZsgW55ETvj/Yqi69CX76JEj1FTg ozTJXc+igDhttCAeVq824OnhPrQbX48AElDsY0mwoeyifFwrBbW9mUi2/gDO0LUEORIC eZlojqripnru9Hq040ccd88Xo/XjGGI+fCxDpWVB5jqZtYWYGf++t7HCMesK8H+Jtoe8 ndsQ/wOri2axIUuMK+0oCLeSwuCKH57AU9NlCkI3YgZwEibZ58zypqXLPEqIgUAoFgnQ trBnI4q12XN5eVSftDwCETag1fOXRrlpmf+E/b4DPaQ513mGPMmA8QYsBax+zExDsmXg q7UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778583958; x=1779188758; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=OidTfMPPXPs1lrurNfI8WbziimaZNAI/uHskYuG7YWY=; b=I9ZwvPNBXF8hBD8urJDlcJpft5Pn8pbqigf0/uDSKH/BA093rp9Pgo/1NAwfaIY2kM 9N3hx9VhsziH6yyUgy6cCVpYV629x02xg0SPDfKvOPAy2OFzAIjobpbDZdhPKjkFIcZS NKIiSz5lh/MGJhBFJ8wl1+2vNzmk9DmXg8ZA21UVVPZm43trmZXZe5r1y8D9/P05RJRd ZHG77efIxjA7FkhDh7u4HS3049gMe4ZQv7mqv+dkxHG8f8nsZT9ydIuqhxsu+4rqW9F6 a6bN7hKoH+/v/DNIbjDMshQUrKNM5Up0YT2YpL07WlFI1ia5d6YbAj90MkPBF6dO3pjM 54QQ== X-Forwarded-Encrypted: i=1; AFNElJ+wqsmyVIkDZiI5rhimpvV9Ek4gKqMPZLIf60CmH9OTynjIwM2cY7wSmsG2RnYzMoKZ6TLKriP9eqLqdJo=@vger.kernel.org X-Gm-Message-State: AOJu0YytBPiRw7dGwh88EvwaWIuYlgzJImqdjrzKDVN+ykhgprCJe33S MxmlJxhZE2HB/DW+Z1bHsT0BwDSiTNqZ7TqWour5sv1ouxH9HLPiklUm X-Gm-Gg: Acq92OF+uLHPM8p0vZEkou9hzHzbtqlvtYBfrp7/+qX2WZsCECiOHFm5jbtEpwZGf3+ eaX5TkDPC1cFLFtvRqmbW2gDF5cjrlogxfzsDWKiRCcR8FhE0ZLoBYgwiCX8VxN3bUSL4cWyY5d bIYRYR0dsLnJa2xIWCOfqAyn8bkUzBdFNXcJ5Eu3cTuREdpRJMBcUyVS8bM917Pv90DK/sUzMHl nxVDWAMRXYA/Lafj+kh2kUhV0qOFkwwlctbyngG7RzbfmElQ88Z8zVQIsMrf0FUSE0DABCly9zE MiJisWtQJDg1pkB7tfW55qfa14Tzqt5+o3rSwdjPe5Rszc7DNT6O0ycE+gETDjqAK8Ul6OfOgbk 9Rqt9bzdW5+5Vr/FsXUck5jISTdxEjBfZ4+FsVvziMSm+aSa6unkYeAVezOvxO/Zdr71SMKHnu3 +q21uU0akjEIeVwA== X-Received: by 2002:a05:6000:2c01:b0:43e:a72e:ec5a with SMTP id ffacd0b85a97d-4515ce1c804mr44450540f8f.20.1778583957170; Tue, 12 May 2026 04:05:57 -0700 (PDT) Received: from nsa ([185.128.9.145]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4549120eab7sm31284036f8f.23.2026.05.12.04.05.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2026 04:05:56 -0700 (PDT) Date: Tue, 12 May 2026 12:06:51 +0100 From: Nuno =?utf-8?B?U8Oh?= To: Jonathan Cameron Cc: "Stan, Liviu" , Lars-Peter Clausen , "Hennerich, Michael" , "Sa, Nuno" , David Lechner , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "linux-iio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] iio: temperature: ltc2983: Add support for ADT7604 Message-ID: References: <20260509154600.02e2d11a@jic23-huawei> <20260511121820.3be9e635@jic23-huawei> <20260512115520.5833ce45@jic23-huawei> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260512115520.5833ce45@jic23-huawei> On Tue, May 12, 2026 at 11:55:20AM +0100, Jonathan Cameron wrote: > On Tue, 12 May 2026 09:24:27 +0100 > Nuno Sá wrote: > > > On Mon, May 11, 2026 at 12:02:31PM +0000, Stan, Liviu wrote: > > > On Mon, 11 May 2026 Jonathan Cameron wrote: > > > > > > Ok. So what are our options here? Present it as simple resistance and leave > > > > > > userspace to figure it out or add a new channel type? To me feels like new > > > > > > channel type makes sense. > > > > > > > > > > The current approach presents it as IIO_TEMP since the chip outputs coverage > > > > > (using the custom table interpolation) via the temperature result bank, not > > > > > the resistance bank, but I agree a new channel type makes sense. Should I > > > > > create a specific type like IIO_COVERAGE_PERCENT or would a general > > > > > IIO_PERCENTAGE be better? > > > > > > > > For ABI purposes we don't care where it comes from. > > > > > > > > We already have some 'ratio' type measurements like concentration which are > > > > percentages and similar to those I think we need some indication of 'what' > > > > is being measured given it's unit free. Hence IIO_COVERAGE_PERCENT seems > > > > the better choice to me. > > > > > > Understood. Will do that in v2. > > > > I do wonder if a complete type is what we want? How will we present it? > > > > in_coverage_ratio? > > > > What I'm not too convinced is that coverage is relative to what? Well > > it's a percentage so I guess we could not care and leave interpretation to > > userspace (to know which device is dealing with). Still I wonder if a > > new iio_chan_info wouldn't be more appropriate? In this case applied to > > iio_resistance. So something like: > > > > in_resistance_coverage_ratio > > I'm perhaps missing something - as far as I understand it there is no meaningful > connection to resistance in what is being measured. Maybe I'm the one missing something but as I understand it is that the more coverage we have (more liquid in the sensor area), the less resistance. > I think what you are proposing is similar to measuring current via voltage > drop over a sense resistor. We don't present that as modified voltage, we > present it as current. > > Here the thing being measured is coverage rather than resistance > so keeping resistance in there is confusing for the user. > Hmm ok! The above two paragraphs make sense to me. Hard to disagree :) - Nuno Sá > If we wanted a type to modify then we could do this as a modified area measurement. > Channel type IIO_AREA (which is new) and modifier IIO_MOD_RATIO (also new). > > Jonathan > > > > > So it's clear what physical quantity coverage ratio is affecting. > > > > Thoughts? > > - Nuno Sá > > > > > > > > Thank you! > > > > > > Liviu >