From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) (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 216C8309DD8 for ; Fri, 21 Nov 2025 23:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763767700; cv=none; b=kzaXpsA6y2CfEQA0I3bNjnqsBzCIJevPouJf5jTt8MRb1cxAdGfNnvausG/+vUkMoi7QX8bHkHN0RHwbTJvUJGHZO+khExSdfORTCWFmH/UpMk17JU+YySicWs66E17L1MkqSbpSPIACFl/9MC7YaOllG84BhMNAR7Ox7tk/zgo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763767700; c=relaxed/simple; bh=C5xk5Nu5EFld4DJwl1asaNpmcCYJqbKLczamgBNiJ5U=; h=Content-Type:Date:Message-Id:Cc:Subject:From:To:Mime-Version: References:In-Reply-To; b=tKAI1Fx3TFLjVBrqaEO5iNSpYYnJxR4NZqu9zybaoTOp+rFYyouBAZsXWhCgu4Nc3Shq19/oHE6HmuhcDjKZGM+oACOF9PBG3Tw7sUadfMrDyupjXlP1CrJuTMw2rbA8O+bdl9s+NxEf4gD3i8ZQsyqneukMew4Qfp8pPubAOvc= 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=Mze3Ca/R; arc=none smtp.client-ip=209.85.221.174 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="Mze3Ca/R" Received: by mail-vk1-f174.google.com with SMTP id 71dfb90a1353d-55b26461e78so789583e0c.3 for ; Fri, 21 Nov 2025 15:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763767693; x=1764372493; darn=vger.kernel.org; h=in-reply-to:references:content-transfer-encoding:mime-version:to :from:subject:cc:message-id:date:from:to:cc:subject:date:message-id :reply-to; bh=W2vmRyY+CPyo6gdzUvKfso20g3IwmE2bzd6yZ/el5t4=; b=Mze3Ca/RV1t/Tj+dk8RDZv9ytKnu4xb01iyb+ZjYiYdVG44FdTQ2kh3lbjPOulwlD2 K5WDfya8PSTEiJ73Gzx9Ws1Xeta7vVqU81xbE6SOsCqNEEnA+ViklOPL6EjGksqZG1ni HSSbJB5EY3Tj9NnkC9+9pp8889K3QqSEDyWOYbf9+X0DgrNWjJ/arMyV/6KoZyuR5ziy K7ZAFIwwuGFsMFM7raL/Qw6DJx4XXjwBf6NOxcr9z8YxUo1i0z0a2VLm7LeBMzRMNb64 eujHgiKbNSSdOeF+hdEosl0VtKBdNpB/nzveqnO1ZbeYNUvCemYxQNN2kFtvIF8H0ftO BnVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763767693; x=1764372493; h=in-reply-to:references:content-transfer-encoding:mime-version:to :from:subject:cc:message-id:date:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=W2vmRyY+CPyo6gdzUvKfso20g3IwmE2bzd6yZ/el5t4=; b=mcn/nRqM42gwQgXGLntKjd/UBoqncVvEFMxRAFLC2bRrl5DSxMvOQVXeIOk0avthmE s/QhpazSuSUHA3CKHXa3hTyf6xiQQ9A/ppFmXH74PkFPIwnos0BNjEYzDK25hj4Nj2pp GaAyhugZZSJgSNgjAAvVZiJIwPDJSLXkF5WHQ7lIs3h2GFX1JlpRdG2iBYOPeI1EFAEu 0l7TWEUPKKiDICvnEnwHZqVXf0vDxEcF73kgK4CvgzVEUmDKJZq5K3d49qVDtn+gJAiC 15FDaENRSLEbwvFTMNPnFFtVybxsWoRcSQZK8TcG/KxMvZtzh6GtTMAy9AkVismI1ZXl yqKg== X-Forwarded-Encrypted: i=1; AJvYcCU5fbrkt322QF+86fh+Tmg1sfnqnASX4W5IW2C6dPjrbrLniNLMR9lQJ4jJxWtel+iAoJIXI/oHaMDi16U=@vger.kernel.org X-Gm-Message-State: AOJu0Yy3t/BnJj3NcIWb66W9UxQetZTIWKZLEzc+UICtAmHASES6oew0 +suRyp5lZCcux+OZ9uWgIpjctcIif1hnRetOqPvnKNNtd84O3/s7rqgt X-Gm-Gg: ASbGnctQbDJs4BpD9pVTC1WJM3VoaEyy3LzELcxMu8yhq8BGexCEhUP3u/j+FSF6swo +IbV6cQ2sSl39ajIGh6gAhK5k8s3F0IxSRkb1TmwPX/ilwTNPQypMnqUAjoWgLLjzpT9QdSqHHN KDG2cohTP7KRwK7pdjwmOFeYgtK3xLgUVW2RTqwvASDSbvaqsdAjrUCCoMEy6Wbv60iW1nTLNLv 3rjWcD7u0Ryh5Ifw08ClZEeANRRUhs2myR9STo6BjjUA0uos3m1UFS4aXaClyPODzxvzxuFWsWI bqq55OdZ8jLbKeLLJAss9q8qQa3sxpGZ+gu3qF2Mk9yfZIUltkL8Uh2lP+I4C5pm32duX6dBLPB rTBTAvo5a+pQ0N2RjwMxOBHHmTeUL0DBwBVbUN1mBLoDBNyzHt/LioFF4rlYDijb7b85nJx/cC+ /KmNhNwH6UT2Uwjg== X-Google-Smtp-Source: AGHT+IGW1BbieHcjel98FU+b4VtP+Iz6SjkaHRfKnGxBEMggGehiG5MLGPtYSLUCYH2iZ+EhpeqLeQ== X-Received: by 2002:a05:6122:202a:b0:55b:305b:4e3c with SMTP id 71dfb90a1353d-55b8f00fd2cmr1358436e0c.18.1763767693075; Fri, 21 Nov 2025 15:28:13 -0800 (PST) Received: from localhost ([2800:bf0:82:3d2:875c:6c76:e06b:3095]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-55b7f60076dsm3160249e0c.3.2025.11.21.15.28.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Nov 2025 15:28:12 -0800 (PST) Content-Type: text/plain; charset=UTF-8 Date: Fri, 21 Nov 2025 18:28:10 -0500 Message-Id: Cc: =?utf-8?q?Nuno_S=C3=A1?= , "Andy Shevchenko" , , , , "Jonathan Cameron" Subject: Re: [PATCH 0/2] iio: Add support for TI ADS1X18 ADCs From: "Kurt Borja" To: "David Lechner" , "Kurt Borja" , "Jonathan Cameron" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Tobias Sperling" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20251121-ads1x18-v1-0-86db080fc9a4@gmail.com> <05fae891-a4e6-439d-97da-6259370f68b5@baylibre.com> In-Reply-To: <05fae891-a4e6-439d-97da-6259370f68b5@baylibre.com> Hi David, On Fri Nov 21, 2025 at 5:32 PM -05, David Lechner wrote: > On 11/21/25 11:16 AM, Kurt Borja wrote: >> Hi, >>=20 >> This series adds a new driver for TI ADS1X18 SPI devices. >>=20 >> This is my first time contributing to the IIO subsystem and making >> dt-bindings documentation, so (don't) go easy on me :p. > > I actually had these parts on my radar, so happy to help you out. > Unfortunately, I don't have the hardware for testing though. > > The first thing I was going to do was check the existing drivers > to make sure that there isn't one already that has a compatible > register layout. I have a feeling we won't find one, but would be > good to mention that in the cover to justify adding a new driver. The closest driver I could find was the ti-ads1015 I2C driver. It has the same register map and similar specs. Although I think we can adapt it to be "compatible", I chose to do a different driver for a few reasons: - ads1015 and compatible devices have a separate DRDY interrupt line. - The ti-ads1015 driver doesn't support the DRDY interrupt (sleeps until data is ready and it doesn't have an iio_trigger). - To correctly handle the DOUT/DRDY line we need to manually control the spi_bus_lock. And we do it differently based on which IIO device mode we are operating on, so it would be difficult to stuff this logic into regmap_bus callbacks alone. - IMO the end result of merging these drivers would be too messy. This is just my opinion though, so let me know what you think. If do agree I will add some of this points in the patch changelog! > > There are a couple of similar TI ADCs on the mailing list right > now, but they are IMHO just slightly too different to share a > driver, but would be good to look at just to make things are > consistent on a high level. Yes, the other two TI ADCs, ADS1120 and ADS131M02 are very different devices. > >>=20 >> As explained in Patch 2 changelog, the DRDY interrupt line is shared >> with the MOSI pin. This awkward quirk is also found on some Analog >> Devices sigma-delta SPI ADCs, so the interrupt and trigger design is >> inspired by those. > > Yup, that seems to be the best way we know how to handle this. --=20 ~ Kurt