From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 DF7B82E8B98 for ; Mon, 15 Dec 2025 17:39:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765820348; cv=none; b=BAl3L9GOxVHaEc2rRteRuH/04wAhHh5RdhkSmvr6RKFUfJrLtBQCD2oRGxZhr1pNPjmxCdd8E084eYgwxW42lj7zJacwAL1noUazepbPRU0kH6Wq1DYeBEEhJ8ei0BxqqcJjzp1myG7HyHPXtKD4HvwIM8YmWj6gS5KIaARw0+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765820348; c=relaxed/simple; bh=psA0R8uGmpGOA2fhUCx8jrhNdynv6YxOoiERa8JAm0A=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=l7vADCGmXBqcM+GD7Hox/yi0JNZnBmOgCjv2hZUoNfX9H3S/NgEXawPXRO2nB3SN7pGlCDbNrMsuGOhc3l+GLQprtVX2iI4/QpJ87C8PbFpbV7AyCDMpiWcaKDkiaQRp99lt6F4Vg+hf6ZLXCPP+0KSwXucwzIHJZdd76rEivdA= 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=W4aE9rhB; arc=none smtp.client-ip=209.85.214.171 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="W4aE9rhB" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2a0bb2f093aso18252045ad.3 for ; Mon, 15 Dec 2025 09:39:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765820346; x=1766425146; 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=a4h6/dnocvbSI7wy9WOBKXhAE/Pd1GTroBa3YOvaI4E=; b=W4aE9rhBtPanpxXLQdmxHy+8eHxo+o73fkJCn5h0QY1h2QF6Bhqj+ftuI3Ht68FC2c +Yl+aqRWDoQGaBgJKbqGKbEDNIeK7rT8ipZlittt05DBf1/pzrTH4bv1L1tyqliny+Ri DsollwYUoGd6eAAgXJS/t7SPg033SW9Rvt46oAPvGWoe5vpPiDtcroeCjb/9lsSeExcb QzTpo18xz1I74FZxsrMsPcNg9PAsORn6iqw074xX/FytYJohM1LDKD52EJcAEr/K/th4 LjbiozT3BNp5lrfWwowXN49VACCJP8I2JJ+/ntL7wr3EfgO6oXG88EM9gTCCn5xyUFqs zgwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765820346; x=1766425146; 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=a4h6/dnocvbSI7wy9WOBKXhAE/Pd1GTroBa3YOvaI4E=; b=U5qtXTtKqLBeN5LP66JrhscBnuEyxZdtfchHVv5csBXG8pAKiBbhMz+8Iwj+ILu8PA fBdE9sezeleem7bSVjYidoRIBosa2atkijHWiTL//X21TCk1AB7RKErxsAAL8J4AY49T 4pLLNci4upum0HynyCzZh5JqDILYNnpNTdMZe+0TW98QZ8NGkE6oDcC505RAL+jRMPjw P7N5T0x7e1PGpGoud/GXKwTH7vGllAJqqgjdGneZqptnTjDACBkY38jFmjffG9kqCq9b TuX78aO4DMibNwuL2psdwz1nPHv9sBo1xZRjotr7z8CueCVkJNRQe9LgGZtcvr3oBk8x 9nwA== X-Forwarded-Encrypted: i=1; AJvYcCUbxVZOkcy058LIthHN8L+9udApukvSpG7zZ48e2BjezdxvCFq8W7uB4lLdFHxGfWQkE+aQtyw/IDecWIw=@vger.kernel.org X-Gm-Message-State: AOJu0YyY14JITQ9zn6/LZgCMKu10MeRYb58DsLT8t+l+Fbu2b3xcvGfh 6xr5dhBOc1KNGqgdgVQpWGBzXnyTBEm/umHJoSvnk8SLbvBU01REvZWE X-Gm-Gg: AY/fxX7Ydlbjs1YH/ktFEtmMBmjly55mQaWaYEnivql2MEF9tuTXFz3Y5tK0xuWe6Xg 0XsMyMfjKWs6+rP55aXXBvoasv/jke4D3wgd2LbOaOH/7hIFmH5HMuzEMCwEX5Rw4H3MXgUvFZ9 R29x4VA6KX12MgQZuBIFlWD/nakNdu1bSlFF7OAktha06X8kX5GV+gAQkF6Yo1S58PGu8qqb5jj HvJvYBVQS4hs00oMh2pwdhNMFKw/KGNaWpQuhGNmUJnc1BCk3M9zAZa0lp8wWnIu14SL6G/wmvc thBFlfCvcAJkTnt7XoEYld8LOyPoL4Ou2RHl8pH1L5MKFpSLevPbC4oOly3A42fTL5mFr5X2vzB Zik2HzqickWbx6KmUiREc8xCeb0W2vvu1dfWP8337rOty8ptBjc71o+NWVN8rwjd0Q3T/7VIJTk unYAs+Hagb0xKrmR/nNJtVd87zPRVrXBDtEOGKxfFmwbUPV7DXeVORpfbo5SiJcmE= X-Google-Smtp-Source: AGHT+IE46iX/+UepoP75ugQxR9RVc4LZtluzmX+M6lYVRNxOVnAo/xUyAvLUfTOY+OUvXeZbNmPVLw== X-Received: by 2002:a17:902:d488:b0:2a0:d149:5d0f with SMTP id d9443c01a7336-2a0d1495d3emr54427205ad.17.1765820345955; Mon, 15 Dec 2025 09:39:05 -0800 (PST) Received: from ?IPV6:2402:e280:21d3:2:50bc:8636:2ee8:5158? ([2402:e280:21d3:2:50bc:8636:2ee8:5158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a0be984c7csm55202695ad.66.2025.12.15.09.38.59 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Dec 2025 09:39:05 -0800 (PST) Message-ID: Date: Mon, 15 Dec 2025 23:08:58 +0530 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 2/2] iio: adc: Add support for TI ADS1120 To: Andy Shevchenko Cc: David Lechner , jic23@kernel.org, nuno.sa@analog.com, andy@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20251109141119.561756-1-ajithanandhan0406@gmail.com> <20251109141119.561756-3-ajithanandhan0406@gmail.com> <5f15284b-159b-4860-b58b-35c624e2539f@baylibre.com> <8e2c73ca-3746-4b2a-9d85-c12b51a69059@gmail.com> <8ad18de5-53cd-49ba-8e84-1e8c7e5bd627@baylibre.com> <15106906-3bcc-4187-87d9-c838fe99b583@gmail.com> Content-Language: en-US From: Ajith Anandhan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 12/15/25 10:30 PM, Andy Shevchenko wrote: >> Thanks for the pointer. >> >> I did look at reg_shift, but it doesn’t fit this device. With .reg_shift >> = 2, regmap would send only (reg << 2) (e.g. 0x0c for reg 3). >> >> The ADS1120 requires the command byte to be CMD | (reg << 2) (e.g. 0x20 >> | 0x0c = 0x2c for an RREG of reg 3). >> >> Similarly, >> >> .read_flag_mask would produce reg | mask (e.g. 0x03 | 0x20 = 0x23), >> which is also not the required format. >> >> Unless I’m missing a regmap configuration that can generate (reg << 2) | >> CMD as a single byte, >> >> a custom regmap bus seems necessary here. Please let me know if there is >> a way to express this with standard regmap-spi. > So, and if you define both? Hi Andy, You're right! Using both reg_shift and the flag masks produces the correct format Thank you for catching this! I will drop the custom regmap wrapper. BR, Ajith. > > >