From: Ajith Anandhan <ajithanandhan0406@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: David Lechner <dlechner@baylibre.com>,
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
Subject: Re: [PATCH v2 2/2] iio: adc: Add support for TI ADS1120
Date: Mon, 15 Dec 2025 23:08:58 +0530 [thread overview]
Message-ID: <bf220707-cca1-4a11-a194-04e131544d54@gmail.com> (raw)
In-Reply-To: <CAHp75VcA2SNGb6cpHaOQwQ_dNaG5xCZnfrXtu+u9pB1+oz7xew@mail.gmail.com>
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.
>
>
>
next prev parent reply other threads:[~2025-12-15 17:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-09 14:11 [PATCH v2 0/2] iio: adc: ti-ads1120: Add driver and dt-binding Ajith Anandhan
2025-11-09 14:11 ` [PATCH v2 1/2] dt-bindings: iio: adc: Add TI ADS1120 binding Ajith Anandhan
2025-11-10 7:59 ` Krzysztof Kozlowski
2025-11-15 18:31 ` Jonathan Cameron
2025-11-18 0:19 ` David Lechner
2025-12-15 14:49 ` Ajith Anandhan
2025-12-15 15:58 ` David Lechner
2025-11-09 14:11 ` [PATCH v2 2/2] iio: adc: Add support for TI ADS1120 Ajith Anandhan
2025-11-09 17:03 ` Andy Shevchenko
2025-11-09 17:05 ` Andy Shevchenko
2025-11-10 10:17 ` kernel test robot
2025-11-15 18:45 ` Jonathan Cameron
2025-11-18 14:04 ` David Lechner
2025-12-15 16:13 ` Ajith Anandhan
2025-12-15 16:36 ` David Lechner
2025-12-15 16:49 ` Ajith Anandhan
2025-12-15 17:00 ` Andy Shevchenko
2025-12-15 17:38 ` Ajith Anandhan [this message]
2025-12-15 17:42 ` David Lechner
2025-12-15 17:50 ` Ajith Anandhan
2025-12-21 18:57 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bf220707-cca1-4a11-a194-04e131544d54@gmail.com \
--to=ajithanandhan0406@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox