From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (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 52048472797 for ; Mon, 29 Jun 2026 16:38:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782751114; cv=none; b=esyMYbnClevka6KP1lEI0CttBsOtCL0b3ihVq7+cgmZP6pNtQDx5T5jRnBNqh8QtzKQVT94SuHKN00zPwrbEglCMpayQzPNycM5wfZUgW6SRo7IhV/jE1Wa+cpq2ZayFpcvC75ys2xoFCTWcAgwTtQQ5x+J/OlVeh57/CgtlRuI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782751114; c=relaxed/simple; bh=8QMGfKWHrJeLkYDpL5CEDwN6QIg7bPP/VRES8dFKzE0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DSKz/h7dwfSNpe2TYaVZWJauruqY8VfhplYwnY5vB2w+WvSoe3HFfYdbJERHCkt82iTnrdUkeWQmHK2TMNH2wnB2dynpmO39d9cAVVVutdu8WAgJm3G5VJEi3nRFB/ApQoVHad3xPm427kPfIL3HamlcDWqt6VZSScGBK7cOMyY= 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 header.i=@baylibre.com header.b=UjqWu2SS; arc=none smtp.client-ip=209.85.160.44 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 header.i=@baylibre.com header.b="UjqWu2SS" Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-4471b489240so960567fac.2 for ; Mon, 29 Jun 2026 09:38:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre.com; s=google; t=1782751108; x=1783355908; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=68Y2SPxYfxzmQx5v613mkpO9So+RFHEtHHsWxF6WE1Y=; b=UjqWu2SSZSjGHetyWUwjcL5DQmmP/xifef8oHdXAH/uqLT6YlD9OFpF/oKefcRvyzM YMpnUzLwv/Q7xUREcc82UTYzUbrXVuT24diPolbvRPS6nzgMrd+SOpXlrCLm+kiESaDl aV3P9u4Li0s4FIiocNagS9z9QerGG5vIzJCeG73Ng6SuxSBF+IoI1Tvhl3obXyKFdXb/ 79j92JGxQugBTbRGaNSgc/jU05mrLIcF6l/etsTMfM2v8pA4M9VVsMWxGFiud3fgnIMM R16BUkF517GQ6dvLxqtUSSmwWP6S7Sg3xxf3gum3bp9ASUhTZ8Q5P9k6TyCwnBdezOYh T1Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782751108; x=1783355908; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=68Y2SPxYfxzmQx5v613mkpO9So+RFHEtHHsWxF6WE1Y=; b=NxkT15xsy5KAkTu6Mxuhpt3wRgPOKgMYPHqI4B1cMGMMS64LUd81onNRHtggAjN8Gm fbX4q7B2kap5GAUA+B+QAtaPTKpDgz/tbdmVmJsIjUJlDSdgFGX1Sj5gMxw+fbgQTkdq S0fwGDJOqlBNfiPfTXGK8eeL6CV6UiR6mjy/1GJL4gqztpq4+5SxcyNggJAjocQnTXYB 3EBqObOBQamT9nH2DM1cVT67bN+5rih6rbmFt33BCNTK1PPtOGJEKNzv2N58HRjqYk5W +2otABY8PCEfXoLOVl8U2WY2L7+wXvHAI/4yyXbCnchIOUOgFUVwlaazqGqlLL5zn4uY wyVQ== X-Forwarded-Encrypted: i=1; AFNElJ8P9ZB38r4z5o1wa0x92xTE3ZAILLyVYbYM/tuao3cLZSbI6v/UO6S2qDUjENKg2JPpZj0HFjcUlKrLGgY=@vger.kernel.org X-Gm-Message-State: AOJu0YwH1DK2UhkXW6xM09ofEb4EHARlkUP2rOtjeDCzOogA+UAANf9C bIclG8g451X56lFSnSDtqiGL7Cdu7Dyr7pQ30KrhZtHoCii3+Xir7cFV9McpJB/qyQk= X-Gm-Gg: AfdE7cno7fD8JFf5+QSGN/L2cg6ZnCvJTmNe8nSOg8iApZ4yxc4fz7CFY1hIyV11ntl IYa0hVEpITm2PQNZOej/PaY1FvFNjC9nU1fQJYZmBNaMXTW/5S1Au2a5Mdujg0FTIRyb4z6+Vj4 wBEdqNQs0JFcADC9hs5yXkgh3+zLIq28Hqhl4d4X3/GyZFvj+rVD09PiHPek/MUDT0jpHIYz6RL uy9RThqLLnrz9REeY8O1PGAzZ2nwxxrQEwUYLDNvN0qhW9e7Vx+X+HIOsCE6wQWNIqkPvSD8BXh UREqbsN2IUlWLoWrTZmB7GANmFiPNwuw8/y9NrKhvjqOLvdSPqwWIe+JIkGplaMpztMshgSOtPX 9P2X5D1GDzVLv2YHpHLu53tPKs3SlEX0BCIln4AtnNCIJ1yuVbPmPRAtBBgIk6owI9jseYr6EJg p4NzsQjGlAWif+v7mrk+CeSb6QhyajSug1Bl/xrmsEUcd4J6nYMnhds1V18TgtQVs= X-Received: by 2002:a05:6870:709f:b0:43d:1689:ed9c with SMTP id 586e51a60fabf-448dc67bc00mr177521fac.18.1782751107867; Mon, 29 Jun 2026 09:38:27 -0700 (PDT) Received: from ?IPV6:2600:8803:e7e4:500:3533:aa22:9a69:df1c? ([2600:8803:e7e4:500:3533:aa22:9a69:df1c]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-448dc1019f5sm185503fac.17.2026.06.29.09.38.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Jun 2026 09:38:27 -0700 (PDT) Message-ID: <8da7db13-5c6a-42cf-8546-f0e580c3b278@baylibre.com> Date: Mon, 29 Jun 2026 11:38:26 -0500 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 v2 7/7] iio: adc: Add ti-ads1263-adc2 driver To: Kurt Borja , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260628-ads126x-v2-0-4b1b231325ba@gmail.com> <20260628-ads126x-v2-7-4b1b231325ba@gmail.com> Content-Language: en-US From: David Lechner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 6/28/26 3:08 PM, Kurt Borja wrote: > On Sun Jun 28, 2026 at 12:22 PM -05, David Lechner wrote: >> On 6/28/26 12:36 AM, Kurt Borja wrote: >>> The TI ADS1263 embeds a second 24-bit delta-sigma ADC (ADC2) with its >>> own input mux, reference, gain and sample-rate selection. >>> >>> Model ADC2 as a separate IIO device on the auxiliary bus: the ti-ads1262 >>> SPI driver instantiates the auxiliary device and exports a small set of >>> TI_ADS1262-namespaced helpers for the conversion and register accesses >>> that must go through the shared bus. ADC2 channels are derived from the >>> parent's configured channels. >>> >> Can these just be additional channels in the main iio device rather >> than a separate iio device? > > I guess we can do it, but wouldn't it be quite a mess? I think doing it > that way adds a lot of complexity: channel naming, available scan masks > (because both ADCs can be sampled at the same time), optimized software > sequencing would only work in ADC1 channels, ADC2 doesn't have a DRDY > IRQ, etc. Channel naming is easy, e.g. just add 100 to channel and channel2 for ADC1 and 200 for ADC2. And if ADC2 is mostly for diagnostics, do we really care about trying to optimize it? > > IMO separating both drivers makes everything simpler, easier to > understand and easier to maintain in the future. > Sure, I don't have any strong objection to doing this way. We just usually try to avoid multiple IIO devices for a single chip. Although one of the exceptions to this is when a chip has independent cores. I guess this fits that description, although it is a little muddled due to sharing the same input pins, sensor bias, IDACs and probably a few other things - i.e. doing buffered reads on both cores at the same time requires a static IDAC output to avoid issues.