From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 ECB274D90B6 for ; Tue, 12 May 2026 12:05:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778587525; cv=none; b=T3lrPfqrroy6FHzduGAq+aO2IvDBD9gr1SEPQR269I3wmG89YImv4eb5KwNPQ/3Ehgr7Cla/rDrQeziDaCmTCGXPooGXnsY+oXc2N+cXQQrujM8nJVm58f8QGK6/g3mS28MCe5n2qvSvdUsDIgt1iX/7gIr5+wPwWWi/XIOO4zo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778587525; c=relaxed/simple; bh=eiiQn3LPaQ1C0TSaD+je1ad7MkAQEuJiYrexYHR8JW4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OGUi/4tYLckQoKMkQKOPhAzVb+nxhcmxgqu9gx2DN88JZ6MDxk0j/DiGCBeJRwGYqs1zjZWDukMj1PU7ybhS1p+un/J1AtZlVxcHWvrsg27bJwOGYl3j3LmkEMX6iQBTq08JWEUVzD7RFsGCRkhZh30Qr2GzsZvewwd8EqR8MiQ= 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=EG+HTSV4; arc=none smtp.client-ip=209.85.128.43 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="EG+HTSV4" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-488a88aeec9so60757765e9.2 for ; Tue, 12 May 2026 05:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778587521; x=1779192321; 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=MPixCwLYwSCQ7IjJ5OrD8u4Z57ctKq7410nlp6rxWgQ=; b=EG+HTSV4JkPS3hTqHjB+yt+2e+0nzu+OuRQI95huriZbSXg2R2D6Tx5aZDlNrwPJvU SKK9Yh2q15m2Nnvi0x6TgxU3vupDmFvZZOrBcjYoMnJTnUfohr5mhUiJ/qWziCI2i0uW 3olmrnHEDreSZzClwTG7ly3Q60/mh4sUGZXowJdDw3NP+A0EcKrmS6dbqCmXhDkBV9ZI I2Tfcqv8rC4cy50GfBXnOY+ePaTMduZgGTIqN8XKKmqgwnt1sW+ZTySYNTox3aUIoDVq 2v/Xl7eXkcLxgdmDIqVlTV4pmoe4Q1Ixtn+fv9UTqOue/nYuDLcYu3psdITUkSgsdxl0 BP0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778587521; x=1779192321; 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=MPixCwLYwSCQ7IjJ5OrD8u4Z57ctKq7410nlp6rxWgQ=; b=fMunpVMqPrZrToCYTjhEeeZQlfS/hF0pbu+bhUxeJSnNqejPRs4bXPFohz+ZmUyyra Sg87j2UgZkpOOKfrPX5YhbhJEZqM1iHLNYd3PgFpP03ZEdkICpSP+aKO6Jonm6dRnBYw ICt9LNWcMJDPwdxSeTRJG37RnV2qoiZPU+M9uQBeJGk45yLpJ8une9q+S6qtwHEExOPj CyjjH6aKEpHCIIoY4hHw9VAHKlY7iepkgCocsMuJDubw7QG+ag6vCeG7uuDWjxNcER67 4TKQBtObjBOdWpvFTDeMwNMURxBPQrCGYR7MLk99HPc2EztHIULOqKCYRjXbN1LOiz73 i8JA== X-Forwarded-Encrypted: i=1; AFNElJ9sTxa970kNaA8uYswjD/4ZAdQIxUHZUHpKyqNlWzz4mTJ9PUGS2xiwPx/uG2ItU8RnZKuaeYZ+BAfHVNI=@vger.kernel.org X-Gm-Message-State: AOJu0YxIfP9RZD/4RqIrJk0QPB5+1NCnc5OAoivdZBQbjWAh6A8EdDAD kplA0kKSzEXxIu5LIm7JD3SEUayZsNVunYM8NXrOHjyajWi62D3PpKHf X-Gm-Gg: Acq92OEZttTc2Tnjz8OeIIT1rVDx2sfCjMSrGnUvUEkyk82uIR/e9bDSlSKcN2VO0sb ZpbL5Xh29wE5vAcQT9RPg1v8RuCX0I7HMPUUO3U6pAPfc1ObVYj73HaA52uAhABN9/fWG9071dg gDj3VefBGT3hAbju7aV5gJhIDT1WFOYykcnbPwgDm0HgCUqlOKdMRVhcK3B51I1352tpga42mpU BOM803Si/AIHu/J+8q+SPT7ToTq+0seJic7B8uXeA5ZxqGHh6+AyBmUoitSGybKqMk5IiYgG1Jn 1KetopeeJW2BsN7By/1+ncjk22qO5eb38RvtQkKlAkw3I/DaCAZkp4iApcmJViXn+4MnLiDjkJc dt9MjVtBGqJ4s3+MzGTOxne4HWRf11lwSsY6rzoKMmI4PMswW4llavaE0oC6vLUuWZqv6RN8Vdu oBEICsydIz4LV0Cw== X-Received: by 2002:a05:600c:4f46:b0:489:e126:b757 with SMTP id 5b1f17b1804b1-48e707fbb13mr229757235e9.25.1778587520803; Tue, 12 May 2026 05:05:20 -0700 (PDT) Received: from nsa ([185.128.9.145]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48e8f42a845sm15997055e9.20.2026.05.12.05.05.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2026 05:05:20 -0700 (PDT) Date: Tue, 12 May 2026 13:06:14 +0100 From: Nuno =?utf-8?B?U8Oh?= To: "Stan, Liviu" Cc: Jonathan Cameron , 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> 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: On Tue, May 12, 2026 at 11:55:21AM +0000, Stan, Liviu wrote: > On Tue, May 12, 2026, Nuno Sá wrote: > > > > > 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 > > > > So it's clear what physical quantity coverage ratio is affecting. > > I still think a new channel type is the right approach. Consider copper > trace sensors - they also support a custom table, and when one is > provided the chip outputs both a resistance result and a temperature > result (the interpolation output), each in their own register bank. The > current approach handles that with separate IIO_RESISTANCE and > IIO_TEMP channels. So, for consistency, if we use a chan_info > attribute for the leak detector coverage output, we would need to do > the same for the copper trace temperature output. Since IIO_TEMP > makes sense for the interpolation result for copper traces and > because it is a distinct physical quantity output by the chip, I think it > would make the most sense that leak detectors follow the same > pattern and create a separate IIO channel. > > What do you think? > Yeah, makes sense. Jonathan already put it very nicely for the distinct channel case. - Nuno Sá