[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] Extend I2C tools to read unlimited lengths
From:       Olliver Schinagl <oliver+busybox () schinagl ! nl>
Date:       2023-07-07 9:17:38
Message-ID: 3ba887d5-db51-6fd0-eb8e-dc54e825801c () schinagl ! nl
[Download RAW message or body]

Gentle ping :)

On 12-05-2023 10:35, Olliver Schinagl wrote:
> The I2C tools suggest they can do block read/writes using either
> 's'(mbus) or 'i'(2c) access. However the current code limits reads
> specifically to a single block, which depending on the driver, may limit
> this to even less bytes. Looking closer, we actually see that the commands
> to read via either access is really the same, where the only difference
> is, that SMBus access can at most read 32 bytes (but can read less) but
> cannot be told to read less, and I2C access can read up to 1 byte
> granularity. Everything else works the same, and thus the loop to read
> multiple bytes works for both cases equally well. This change thus also
> reduces the code a tiny bit, but makes it more readable at the least.
>
> Further more, while here, a little bit of cleanup. One cosmetic and one
> where instead of always returning -1 (which is horrible to debug when
> your console just tells you this) instead returns errno that ioctl had
> already set for us anyway.
>
>
> _______________________________________________
> busybox mailing list
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic