From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.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 7FCE321148B for ; Mon, 3 Feb 2025 23:01:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738623684; cv=none; b=OMeAajpo7Dg1GWyKH9cJXoRXoiFRzCpe6JvcseyUWDWGAIw2xqjnpdOPA8KTVMa2FQMjUyLYUX7LY8h99cqSo5T7VYXGIO0uG/8u0Kd0n1lhInAn5tignV+tGtjMBxmd+jl+ujPqbLTfIYI04Hw1Elek9GqwFD7HbL2Ll78WdKY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738623684; c=relaxed/simple; bh=JX6YgyI3XB5KZmwCC3kBcbBo+cVpHlL6lsPqGTgoxeA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=EPacwnsQXRmM+IGTqE+vuF3/TOO58S6W2X9NbFLSPJrHPTFEAsKZdeEOoLQdpbbUgyu+O39xNRT29KkfgdBb5fygS/sIqmKHX4yMoQ5nlc2SoxSjTPYUKkfFk48Q7+Qr2K/FTgQk/XBGSZeJIC/tEQb8jrLGCK48J/IL4kzJMDo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=TR1u7KMd; arc=none smtp.client-ip=209.85.160.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="TR1u7KMd" Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-29f7b5fbc9aso1283116fac.3 for ; Mon, 03 Feb 2025 15:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1738623681; x=1739228481; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Q48N32/BZzAOoxhPyz3+9vdM39rBTv/9Tu2+c8AC5Nc=; b=TR1u7KMdbhzMYP9oF0mbItwasEVKnR3dcvon5gwbwTryxzXJxf/p6WhbNNPjyf2MA1 cHEtllG4Z+HxCbHULwOmw3NXlrVOIAr83ucKd2YW9E8p1LnWCjwu7C9TMeZzmHZDQV4n qVmtqIOD8nSAdF52CtzDHMo8fQD8nh7RGVyH3VzqlMHToDtQzpATsiA3VWLF+6gEiL9j GyJRtYBLNLzFvw8n4re2GJwr2Zga+nv1JJDQoHan2UjMwEvhFLxWYx9DqrrQs4PO+8g+ kMUg1dFTXHUzuhwn8dZHFXDSwlyjt8fMFcEWCVVQhPKhS1d4BDtzq3Jc+KNAxoNe32IF I6uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738623681; x=1739228481; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Q48N32/BZzAOoxhPyz3+9vdM39rBTv/9Tu2+c8AC5Nc=; b=RyqwqpNQnO+AG6bDxz0OXk7ePs5xv+nlDxsT/zNS46xQudED24DANrXGBbRavQIPl5 3w4VbW/JmSwjidOkMd1KZEvYfme4sgGcGaaqSHR2dpV51J0q1T2fwGfGUndlgnFFnavz iilHr6J9C/8WYcOyXbWjOkafdk0Aa/Ej1uDe8iNZHSXCG00YMqbo/UiMOgmZKg7CfNFt fOKWQHL8IWMW8YV8074+rF2yIli4wy6zzhO6h7r1BjNHBB5GaGfTxrnq4xskTt79to3o mv5FHaWdmk/tm7Ka5HeOeDD4Kx15+7Be9xL+R0pg67tGAnLQrcspOZG8rbzQJJErvCRU ql4Q== X-Forwarded-Encrypted: i=1; AJvYcCVi9C0kNn24yjcR9EoN+E5G/WRX3Vq89Uck4xqgg+bBbLzfrWpGPmuJ6XRlPtts9thioGyrVJNhFj4wQvY=@vger.kernel.org X-Gm-Message-State: AOJu0Yy9GDbElpS7CSwMbmMRISCkNVS/rUCQJ3LjnwwLbhtGXkqx1cyy imOIejX0DHgxBsa0DhNxotFP1BBi27d5K0w5UpriKOZKnjGTpL7vIGHpVghk3cVQ8RIil1EnmXo 4 X-Gm-Gg: ASbGncvauI2JF6U1rzUYJ6zQSJGtOO00ImyJnuyiZdPmN7f3Dd2K1LR5elnK+r8CTQ4 S+Xtkwf0MZ1kdJ83l2LuyBUrmFVsiD+88PC+GLb9+Mc619/13d6iiIrNyS3dmENFCt8Ns5szzpd 0y7INoBETfIpUjFPdPsatp/M7EQxl5enXv+4e0Sua3iL+iOQHt4nBPSHY0VR78Gu6tLygOIVk9h K817+BzdevPPxPEUQVVz03D8nXueT37x9cy91mk+XzNbyYOYOsIL0D8q8mfYWbQqI6ynyg2Rxb1 T0qtaEBPpu3OCXVB8LCJ0TLlw8uOHO9Dg1e4mwHI+NBHEvnuoOFe X-Google-Smtp-Source: AGHT+IFvQHZNew9RMVh3oMkAV8tgG3NqgZ2zFveyRCk4EzbOqbrzrj7jrDhOfm9blPA9OWsKbsUncQ== X-Received: by 2002:a05:6870:3127:b0:29e:55ae:6170 with SMTP id 586e51a60fabf-2b32f26ff66mr16402322fac.29.1738623681468; Mon, 03 Feb 2025 15:01:21 -0800 (PST) Received: from [192.168.0.142] (ip98-183-112-25.ok.ok.cox.net. [98.183.112.25]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2b356196935sm3599125fac.17.2025.02.03.15.01.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Feb 2025 15:01:20 -0800 (PST) Message-ID: <9f209ff0-e56c-47a1-8df0-603d30d36ccb@baylibre.com> Date: Mon, 3 Feb 2025 17:01:18 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 3/3] docs: iio: add AD7191 To: Alisa-Dariana Roman , "Rob Herring (Arm)" , Alisa-Dariana Roman , Jonathan Cameron , Ramona Gradinariu , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet References: <20250203133254.313106-1-alisa.roman@analog.com> <20250203133254.313106-4-alisa.roman@analog.com> From: David Lechner Content-Language: en-US In-Reply-To: <20250203133254.313106-4-alisa.roman@analog.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 2/3/25 7:31 AM, Alisa-Dariana Roman wrote: > Add documentation for AD7191 driver. > > Signed-off-by: Alisa-Dariana Roman > --- > Documentation/iio/ad7191.rst | 250 +++++++++++++++++++++++++++++++++++ > Documentation/iio/index.rst | 1 + > 2 files changed, 251 insertions(+) > create mode 100644 Documentation/iio/ad7191.rst > > diff --git a/Documentation/iio/ad7191.rst b/Documentation/iio/ad7191.rst > new file mode 100644 > index 000000000000..b55f3c13e45a > --- /dev/null > +++ b/Documentation/iio/ad7191.rst > @@ -0,0 +1,250 @@ > +.. SPDX-License-Identifier: GPL-2.0-only > + > +============== > +AD7191 driver > +============== > + > +Device driver for Analog Devices AD7191 ADC. > + > +================== > +Supported devices > +================== > + > +* `AD7191 `_ > + > +The AD7191 is a high precision, low noise, 24-bit Σ-Δ ADC with integrated PGA. > +It features two differential input channels, an internal temperature sensor, and > +configurable sampling rates. > + > +===================== > +Device Configuration > +===================== > + I would call this section the `Devicetree/wiring` section since devicetree has to do with how the chip is wired up. The existing `Device Tree Bindings` section at the end pretty much just repeats the DT bindings .yml doc, so we could drop that section from this doc. What you have written in this section already covers it very well. > +-------------------- > +Pin Configuration > +-------------------- I think it looks the nicest when the --- exactly line up with the text and I think that is the usual kernel style as well. Example: ----------------- Pin Configuration ----------------- Same applies to the rest of the doc. > +=================== > +Device Attributes > +=================== There isn't really anything unusual about attributes on this chip compared to typical ADCs, so I would be OK if we left out this section. If we do keep it though, I think we should write out the full attribute name since some are separate, some shared_by_type and some shared_by_all, so they have different prefixes. > + > +The AD7191 provides several attributes through the IIO sysfs interface: > + > +----------------------------------- > +Voltage Input Differential Channels > +----------------------------------- > + > ++-------------------+----------------------------------------------------------+ > +| Attribute | Description | > ++===================+==========================================================+ > +| raw | Raw ADC output value | > ++-------------------+----------------------------------------------------------+ > +| scale | Scale factor to convert raw value to voltage | > ++-------------------+----------------------------------------------------------+ > +| offset | Voltage offset | > ++-------------------+----------------------------------------------------------+ > +| sampling_frequency| Current sampling frequency setting | > ++-------------------+----------------------------------------------------------+ > + > +-------------------- > +Temperature Sensor > +-------------------- > + > ++-------------------+----------------------------------------------------------+ > +| Attribute | Description | > ++===================+==========================================================+ > +| raw | Raw temperature sensor output value | > ++-------------------+----------------------------------------------------------+ > +| scale | Scale factor to convert raw value to temperature | > ++-------------------+----------------------------------------------------------+ > +| offset | Temperature calibration offset | > ++-------------------+----------------------------------------------------------+ > + > +-------------------- > +Available Attributes > +-------------------- > + > +The following attributes show available configuration options: > + > +- sampling_frequency_available: List of supported sampling frequencies > +- scale_available: List of supported scale factors (based on PGA settings) > + One of these days, we should probably write a generic page on the common attributes raw/scale/offset and somewhat common sampling_frequency/ oversampling_ratio (probably a few more that I'm forgetting). :-)