Re: [PATCH net-next 2/2] net: pse-pd: pd692x0: Add sysfs interface for configuration save/reset

From: Andrew Lunn
Date: Fri Aug 22 2025 - 13:18:18 EST


On Fri, Aug 22, 2025 at 05:37:02PM +0200, Kory Maincent wrote:
> From: Kory Maincent (Dent Project) <kory.maincent@xxxxxxxxxxx>
>
> Add sysfs attributes save_conf and reset_conf to enable userspace
> management of the PSE's permanent configuration stored in EEPROM.
>
> The save_conf attribute allows saving the current configuration to
> EEPROM by writing '1'. The reset_conf attribute restores factory
> defaults and reinitializes the port matrix configuration.

I'm not sure sysfs is the correct interface for this.

Lets take a step back.

I assume ethtool will report the correct state after a reboot when the
EEPROM has content? The driver does not hold configuration state which
cannot be represented in the EEPROM?

Is the EEPROM mandatory, or optional? Is it built into the controller?

How fast is it to store the settings?

I'm wondering if rather than having this sysfs parameter, you just
store every configuration change? That could be more intuitive.

I've not looked at the sysfs documentation. Are there other examples
of such a property?

Andrew