Re: [PATCH v6] ptp: ocp: add CPLD ISP support for ADVA TimeCard X1
From: Jakub Kicinski
Date: Mon Jul 27 2026 - 17:05:24 EST
On Mon, 27 Jul 2026 12:02:53 +0100 Vadim Fedorenko wrote:
> I don't like the idea of having a buffer in a global structure. And it
> doesn't look like you can actually serialize access. Imaging 2 processes
> manipulating this i2c bus. I can be that mutex will put them like:
>
> 1. process1 -> write cmd
> 2. process2 -> write cmd
> 3. process1 -> read result
>
> That means the data will be a mess.
>
> That's why it is a really bad thing to allow direct access from the user
> space. Is it possible to add a property per command?
At a glance - adding I2C support via 2 magic files in sysfs is rather
odd. Either expose a real i2c bus or make the driver sends the
appropriate commands. We are opposed to raw device write interfaces in
netdev.