[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bf220707-cca1-4a11-a194-04e131544d54@gmail.com>
Date: Mon, 15 Dec 2025 23:08:58 +0530
From: Ajith Anandhan <ajithanandhan0406@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: David Lechner <dlechner@...libre.com>, jic23@...nel.org,
nuno.sa@...log.com, andy@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] iio: adc: Add support for TI ADS1120
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.
>
>
>
Powered by blists - more mailing lists