From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 927AB2FD1B5 for ; Mon, 20 Jul 2026 14:00:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784556034; cv=none; b=NdgFAHgEjODN9HvERehFJ7ER59VZL4pfokQ9C+fqfzOa8hHD8e+cNH7O4l5FOIcPzBluo9jnab5bxp0N/lS6LOmAAKpmiHikKLtaMYSNwpxYceIRcGQRr3pJR/PUPJuI7Cn7O4ebZBYPCJi2yBERed6PJpk6PyDqmlEbETMCtII= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784556034; c=relaxed/simple; bh=ibO8HrzFGnu/FbI+Jv85vcjMmuwSEhYP9jqINubWEak=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=Bl2o4wapqslDmdrKJgU74++gek2tZbd/BbCC9a89CHJBcPRJcZjYXu1+vxJBFU5ZD7JWFI+SQTLmtqAEB3X3wSiZXmT4/vRexNtGW5KGn8wTZAWBIlL8ks9Ww9Xjzzs1txXA3k3ksQLWtqUPGpmAiaAjNJH4lQu1Eoa60dO6TkI= 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=NN4xQ3Ez; arc=none smtp.client-ip=209.85.218.42 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="NN4xQ3Ez" Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-c166f1bbeaeso976824466b.0 for ; Mon, 20 Jul 2026 07:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784556030; x=1785160830; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=7XWyfB00Rok/PjZ5UHAUkTiQrGyYkPnkRtIuDzoxupg=; b=NN4xQ3EzJUcEDIBjZYig4zs/xtggJJFuRxCFip4KzMpyhYCtOwL+BbH7hYqM5mKTHE s7yLQzp6MzAWSL5bKPu2137t+KeLT6kwBKqMLlo+TWRpk/L7zCrrkILwJAGeZrSza1gV wBelRJ9HhOaNnE6kxWgMpumc/gvwynV1VIWj7qjoJPzrohfP7/56hL/uJsiTIbkJedHo ELJ4l11ffh4SVZgTfXm1Ni+0g4pKSfWMENy3drnty1eJeYgGi1aAfzHo4+i1/bg+oH8r lqoxXb7Z2tFmH8BgUGjEY3lQ1k+1lZLBTX9vqzxroyjwsrVi0XOtmTP4hQ2HvKuVTW8i ulhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784556030; x=1785160830; h=content-transfer-encoding:content-type:in-reply-to:content-language :references:cc:to:subject:from:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=7XWyfB00Rok/PjZ5UHAUkTiQrGyYkPnkRtIuDzoxupg=; b=os3Y/73LZtdUwX4c2mo2kflHCCNBD+90dpcTjPFK/hPPkxmTHYYOcC9FWeM3rxoHCz kVXTvjgXIqyYCOskv7lxmdKV27J+F9rt8hUv8wdCk5ifh3wygeSR6QIzCIBaSQEm8kY2 Jh9YLGdF8kOcihNTcTUZ1eesNz2yA5OkZ6zy8dCol3/kei8IjXlfrcc6T6ddJycMiQ0n EWNlQS/x3r+VBgsv41z4Bm3oXLRXE3fQA2afFdrocC0pmZZLSAj5vs58tvYYc6HzcqiF vu3i6GXtROOOlAB3GXw2z99qAo7zy0za+HH7QCH1taX0n/ieZVvMdIJRMckKdNhr+iGT p+hA== X-Forwarded-Encrypted: i=1; AHgh+RorB9Q6WF1gXLA9DSKIfOpkZ7a66ucrJwI+BrVLhLc5AE6EC4BTWitgsvSP/Mv3R8QdvWi54CHiEL06Hpg=@vger.kernel.org X-Gm-Message-State: AOJu0YzWi+dcJqJgSH6uxM4T8IxZ5OThabve9rvM8Z+T5UZPf7IxQFmq EAaaa4tAsbWmIm61fDepqwuw8wenHBpTGsk8eglV0o/rPUkCQIlWH92f X-Gm-Gg: AfdE7ckWPFYEj9v0WGkK8uGiu6OrHYJq67wYCPDPFmCqxuLGO95tG8gx0lyeqru4auA e5y1QR348K/fv1cuFZMXoZFCEApeI+vGmXTKe+Q+xvWTECEsEVQxvaPuBbMc6+/x24iPQvgt68I fT6H/VBy6Ut/SP19UCnZYPo2qK641eAJbZT74/qIF7aM839l4hqaddq2gl462ViiYUk6OMruu2m 8+inSGqFLY4VgYs6glEJWg7htxB8ktNxrlBcd+pY6vrtYFikp8Gnl4txRastHdho4j3nhrRWaUB rIW+4FfI1jJZSDxmdBohiQyeNCRrsUkMat24foGuh+bE2W/6pPee98gpWPdGzGUFMFeVpIBcncs FBgzo9Ymfsy7IqWtuQ0tX032b7rqlaGVekufCqKhdXAlk/IZ+bOhc5U1YH9vjlVqe+shfxDduGQ vq7Ca1PsMDgYRgiBGKQm6RDFRxWQbVNWmSh9mBVeuEBI353qw4Ucvmv6GYKY2+NAEjO+kwUNo= X-Received: by 2002:a17:907:3e98:b0:c12:4cb8:a826 with SMTP id a640c23a62f3a-c16b457b1abmr614064366b.6.1784556029502; Mon, 20 Jul 2026 07:00:29 -0700 (PDT) Received: from [172.24.138.145] (dynamic-176-002-111-253.176.2.pool.telefonica.de. [176.2.111.253]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c17009ae00asm464388366b.7.2026.07.20.07.00.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Jul 2026 07:00:28 -0700 (PDT) Message-ID: <9dd16bb5-7a30-4024-88a7-4a4bf47c35e8@gmail.com> Date: Mon, 20 Jul 2026 16:00:26 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Janani Sunil Subject: Re: [PATCH 1/6] dt-bindings: iio: adc: Add AD7768 To: David Lechner , Janani Sunil , =?UTF-8?Q?Nuno_S=C3=A1?= , Michael Hennerich , Jonathan Cameron , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Olivier Moysan , Philipp Zabel , Linus Walleij , Bartosz Golaszewski , Jonathan Corbet , Shuah Khan Cc: linux@analog.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org References: <20260709-ad7768-driver-v1-0-44e1194fd96a@analog.com> <20260709-ad7768-driver-v1-1-44e1194fd96a@analog.com> <36df7c4f-82ea-4ed5-a4f9-3a29c75dc99a@baylibre.com> Content-Language: en-US In-Reply-To: <36df7c4f-82ea-4ed5-a4f9-3a29c75dc99a@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/9/26 17:43, David Lechner wrote: > On 7/9/26 3:50 AM, Janani Sunil wrote: >> Devicetree Bindings for AD7768-4 (4 channel) and AD7768 (8 channel) >> simultaneous sampling ADC >> >> Signed-off-by: Janani Sunil >> --- >> >> >> + >> + adi,power-mode: >> + $ref: /schemas/types.yaml#/definitions/string >> + enum: >> + - low >> + - median >> + - fast >> + description: >> + Power mode selection. > Unless there are pins that control this, it seems like it should be > left up to the driver to decide how to set this. > > In this case, it looks like the power mode also influences sample rate > which is normally something controlled at runtime. Hi David, The reason we'd like to retain power mode control is that certain ODRs are supported across all three power modes (low/median/fast), and the RMS noise and power consumption differ significantly between them at the same ODR. The higher the power mode, the better the noise performance, but power consumption nearly doubles for every ~3 dB improvement in dynamic range. Silently selecting one power mode in the driver would remove a meaningful hardware tradeoff from the user. We'd like to propose the following instead: - Remove adi,power-mode from the DT as suggested. - Expose power mode as a per-device sysfs attribute. - in_voltage_sampling_frequency_available dynamically reflects only the ODRs valid for the currently selected power mode. This keeps the DT clean while still giving the user explicit control over the noise versus power trade off. Would this approach be acceptable? Thanks, Jan