From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (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 83E5834DCE3 for ; Fri, 17 Jul 2026 16:37:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784306230; cv=none; b=RaKlDq897P23+3yeYoyBRVZyDhBIsH6wK0JX17PaIQ4bitMM54mImQrpDdnk9/d/0TzxfzcCHy/NsCNbU1+A3LeimuC+61CRLqxr2b/FCcXwxrfhMih24Q6MRoetRpHYJU0HxVaOiQsEdF5Lk9bxj64SRDMqaE80kBV5e/PNcAA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784306230; c=relaxed/simple; bh=tGwzjYdByfoFaIh4ZwoemqEAXz0OnUd03AbzuPL+9IA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=cpJ9iS3RdrHP2w2WUQnaPfnYsH8zkYk0h7FDevN6Lxok/XShBCPbhiI0MEc07Wj19KD/+Xjz2LaDxK7CGhQltg/D6kfDcwAM6epViRu8ePS36XuH6KtS8jjSY6hy7soiFXbKw0lCH1VkYbh4SBZcOcsXVnnwfd1gTeaE47B+evY= 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=MdnY9X4k; arc=none smtp.client-ip=209.85.128.173 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="MdnY9X4k" Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-81ee2c048acso25876437b3.3 for ; Fri, 17 Jul 2026 09:37:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784306227; x=1784911027; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=UnLMXcEn62d3oMMgJrrwZa8KdOiLTui4IgFDQmHHq2Q=; b=MdnY9X4kK+T4/S8xOTzaGcXE9dlGmdzSmL05goIEj6wxQ31qXSVnZ4Uy1QMoKgYO80 zcsLn2xF8Kn6zdZqDvWAV/wLGH9lszWgjXIlnWOudlgDx9ArctXvtLwQ3ozzXUlhBF1v Qsiq3e/N3pmCxPPMUV8dg/CkcXBbU9a8aV0Tvl+W5IeL72o/hQc87Zf9SlYtki3TlVG0 araiNYR3XkLMp80xYF54ymSkyVjfEhNF0BdM9Ktgr6vQEU2ehG+R8pfsLqjbk18dgtVX KVEdsZwnGXxEk+raHLsBBVu+Qzux/mZfpHa7riZ0bI8aHZSGX0QvYegeMgyXa9P+LHUg 3/sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784306227; x=1784911027; h=in-reply-to:content-transfer-encoding:content-disposition :content-type: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:content-type; bh=UnLMXcEn62d3oMMgJrrwZa8KdOiLTui4IgFDQmHHq2Q=; b=OgoiGJ4hlXbShjS8TVQyUmKkL1M0A+gZIK7VMNUzx3I5Fki4VrXHZ5QELlM24Gf6za 597Z1lYXpfEyZB6AndhepqRjPAEg1hh8QR7sKXy4pn1b7pxbtdc7qF4Dk6Zo8bn+8Yoh 3I8nhbgL1GegRr5EojluNyIEl1dxf7Nt9o+gq0FV3FvvEV3JeYx7FE35ixiY7RWAPa7r 9ndHFuAJYJyALjAuITY6fueOPHn8jX0uEkqojtphq95CG4dCJtp1ksyOwKp3yBYxTS3i elDzDKy8xtocEy0Q2CDEBYvPUHT00NvME+pFizZoPi6I7jK+FOAZUHK86nNEWIFiVtAc ezTA== X-Forwarded-Encrypted: i=1; AHgh+RpuDC/KsSYA38v/cyMDk/nNAEn/q+043TsGeYLYezb/6YqjeG9gGVfftIOVR9B/wYi0cWr++uU6UhGk@vger.kernel.org X-Gm-Message-State: AOJu0YzyphVX/KiHwdcsTC4X5WjKji90Yq6eAWWyCDrkawlhUmHWP2YA hKvd3ozPcrwFPNujIQTBIpX9X+BuaFgc+EvB6lPMvFHsRq+eYTfSZZm6xv910Q== X-Gm-Gg: AfdE7clu+mGnkxPBQNvsE7UXCR2STYs2kKnJoIKTDuMEbNs5+4ZAQcSO0bHrWsGJBNJ 2ErhGJAMylT2m0MlO6/0wHt9X04nN4GHRn/SmBt4OwGq9bcNcRcO1+f/HW1J9NeRMNbbOSZY+oY /bEC6RXNq10jnXMb9q4jwoKUML5nkFVdgc4FiW5yo1Uqf/cIqsAx6BTMoIjWOc+3GzfbeWcrbkV 4QvLt4bwkGEvGayKCZIbYIaroojXPJC9B5kD0vM1q0fh+xt7ebriLBS7COAiBjx1dADak6YBlzy xE3EmEwA04/QsNDXf1AIDur7z1rC/HREPYarl9qN2BBQ0XUa6A658430BKx/1zgi5WGLYl78Tvj CstmlBvggyquu5RSs8pOOnJEy8W8+rf+qTjh5fii2wkI2OA/+Vks+bEZEY8oiB4obE9RowrOHaL UP1w/0N2VXrSY= X-Received: by 2002:a05:690c:6888:b0:81e:dc5a:a4f2 with SMTP id 00721157ae682-81ef26a5f43mr12401847b3.41.1784306227436; Fri, 17 Jul 2026 09:37:07 -0700 (PDT) Received: from localhost ([2804:30c:1f09:b400:47f8:7933:2105:dd41]) by smtp.gmail.com with ESMTPSA id 00721157ae682-81ef42c4ef3sm14017747b3.40.2026.07.17.09.37.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2026 09:37:06 -0700 (PDT) Date: Fri, 17 Jul 2026 13:38:07 -0300 From: Marcelo Schmitt To: sashiko-reviews@lists.linux.dev Cc: Marcelo Schmitt , conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org, linux-iio@vger.kernel.org, marcelo.schmitt1@gmail.com Subject: Re: [PATCH v7 2/4] iio: adc: ltc2378: Add support for LTC2378-20 and similar ADCs Message-ID: References: <5108c89986ae8723139419058db1b2f2e74daff6.1784235595.git.marcelo.schmitt@analog.com> <20260716212838.95B3F1F000E9@smtp.kernel.org> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20260716212838.95B3F1F000E9@smtp.kernel.org> On 07/16, sashiko-bot@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Medium] The `LTC2378_DIFF_CHANNEL` macro defines an IIO channel that is intended to be differential but lacks the `.differential = 1`, `.indexed = 1`, `.channel = 0`, and `.channel2 = 1` attributes. > -- > > --- Patch [2]: [PATCH v7 2/4] iio: adc: ltc2378: Add support for LTC2378-20 and similar ADCs --- > commit 5710d5f25b45906977e2522567c1964b1d3219f8 > Author: Marcelo Schmitt > > iio: adc: ltc2378: Add support for LTC2378-20 and similar ADCs > > This commit adds a new driver for the Analog Devices LTC2378-20 and > similar analog-to-digital converters. > > > diff --git a/drivers/iio/adc/ltc2378.c b/drivers/iio/adc/ltc2378.c > > new file mode 100644 > > index 0000000000000..5600c820c7f45 > > --- /dev/null > > +++ b/drivers/iio/adc/ltc2378.c > > @@ -0,0 +1,416 @@ > [ ... ] > > +#define LTC2378_DIFF_CHANNEL(_sign, _real_bits, _storage_bits) \ > > +{ \ > > + .type = IIO_VOLTAGE, \ > > + .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ > > + BIT(IIO_CHAN_INFO_SCALE), \ > > + .scan_index = 0, \ > > [Severity: Medium] > Does this macro need to set .differential = 1, .indexed = 1, .channel = 0, > and .channel2 = 1? The name suggests these are differential channels, but > without these attributes, the IIO ABI will expose them as single-ended > (e.g., in_voltage_raw instead of in_voltage0-voltage1_raw). For parts with multiple inputs and configurable differential channels (e.g. AD4130-8, MCP3561/2/4R, NAFE13388 [1, 2, 3]), the voltageY-voltageZ ABI helps clarifying what physical inputs make up a channel. For differential only parts, the ABI seems to be flexible by only requiring a 'consistent labeling' (either voltageY or voltageY-voltageZ IIUC). Will set the channel with the differential ABI if maintainers believe that's the best way to have it. Might slightly tweak the channel macros to keep .differential = 0 for pseudo-differential chips (e.g.LTC2369-18). [1]: https://www.analog.com/media/en/technical-documentation/data-sheets/ad4130-8.pdf [2]: https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3561_2_4R-Data-Sheet-DS200006391C.pdf [3]: https://www.nxp.com/docs/en/data-sheet/NAFE13388.pdf > > > + .scan_type = { \ > > + .format = _sign ? IIO_SCAN_FORMAT_SIGNED_INT : \ > > + IIO_SCAN_FORMAT_UNSIGNED_INT, \ > > + .realbits = _real_bits, \ > > + .storagebits = _storage_bits, \ > > + .shift = _storage_bits - _real_bits, \ > > + .endianness = IIO_BE, \ > > + }, \ > > +} > > + > > +#define LTC2378_BIPOLAR_DIFF_CHANNEL(_real_bits) \ > > + LTC2378_DIFF_CHANNEL(1, _real_bits, (((_real_bits) > 16) ? 32 : 16)) > > + > > +#define LTC2378_UNIPOLAR_DIFF_CHANNEL(_real_bits) \ > > + LTC2378_DIFF_CHANNEL(0, _real_bits, (((_real_bits) > 16) ? 32 : 16)) > > + > [ ... ] > > -- > Sashiko AI review · https://sashiko.dev/#/patchset/cover.1784235595.git.marcelo.schmitt@analog.com?part=2