RE: [PATCH v13] platform/x86: Add Silicom Platform Driver

From: Huibin Shi
Date: Mon Nov 20 2023 - 10:25:56 EST


Hi Ilpo,

Thanks for your comments. Regarding your comments:

> + device. It returns to default value after power cycle.

to default value -> to 0

What actually sets power_cycle variable back to 0? I couldn't find such code.

Also, writing 1 and then 0 to sysfs power_cycle causes reads to return garbage unrelated to the whether there's power cycling currently going on or not.

I think you should first parse the string to local variable in power_cycle_store(), after checking it's okay take the mutex, and only then update power_cycle variable.

Henry: According to hardware design of this board, when powercycle_uc() is called, it will cause the whole platform to go through a hard power cycle. So Linux system will restart and this driver will be re-installed. There is no chance that power_cycle value will be read after powercycle_uc() is called. This is why I did not set "powey_cycle" variable value to 0 explicitly in function power_cycle_store(). Maybe I need add comments to explain this in function power_cycle_store(). Any suggestion on this?

Thanks
Henry