Re: [PATCH v2] ptp: ocp: add I2C ISP support for ADVA TimeCard CPLD
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Date: 2026-06-29 14:53:24
Also in:
lkml
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Date: 2026-06-29 14:53:24
Also in:
lkml
On 28/06/2026 06:38, Sagi Maimon wrote:
The ADVA TimeCard programs its on-board CPLD (Lattice MachXO3) via I2C using in-system programming (ISP). The CPLD resides on a secondary I2C bus controlled by the embedded MicroBlaze. To allow programming, the driver must take ownership of this bus and expose it to userspace. Add support to: - enable the i2c-dev interface to expose /dev/i2c-N - provide sysfs control over the secondary I2C bus Signed-off-by: Sagi Maimon <redacted> --- Address comments from: - Andrew Lunn: https://www.spinics.net/lists/netdev/msg1200997.html
I don't see anything regarding module_request() part. It looks like you want to expose raw I2C access for user-space software to do direct writes to the HW, which is not modeled as a device in kernel. Exposure of /dev/i2c bus affects other Time Cards where we tried to hide to avoid direct writes to EEPROM areas. If you need some addresses of i2c bus to be accessible, it's better to implement these accesses as sysfs or debugfs attributes and expose them for ADVA cards.