[dropped Mircea Caprioru from Cc: as their address bounces.] Hello David, On Fri, Nov 08, 2024 at 12:52:35PM -0600, David Lechner wrote: > On 11/8/24 12:18 PM, Uwe Kleine-König wrote: > > The ad7124-4 and ad7124-8 both support 16 channel registers. Don't > > accept more (logical) channels from dt than that. > > Why should the devicetree be limited by the number of channel > registers? Channel registers are a resource than can be > dynamically assigned, so it doesn't seem like the devicetree > should be specifying that assignment. Note the device tree isn't limited as I didn't adapt the binding. It's just that the driver doesn't bind if too many channels are specified. And while your statement about the channels being a dynamic resource is right, currently the driver doesn't cope and allocates resources statically, and happily assumes there is a CHANNEL_16 register if the device tree specifies 17 (or more) logical channels and writes to CONFIG_0 then which very likely results in strange effects. So as long as the driver doesn't implement this (possible) dynamic mapping to the CHANNEL registers, it's IMHO right to refuse to bind (or alternatively only use the 16 first logical channels). Best regards Uwe
Attachment:
signature.asc
Description: PGP signature