Jonathan Cameron wrote: > "Kobayashi,Daisuke" <kobayashi.da-06@xxxxxxxxxxx> wrote: > [...] > It's not user friendly to just output the register content, and this is breaking the > one thing per sysfs file ABI rules. > > Various possible sysfs structures may make more sense. > > 1) Directory with files for each entry found. Each file > is one thing so > power_budget/X_power - maths done to take base power and apply the > data scale. > X_pm_state > X_pm_substate > X_type - potentially with nice strings for each type. > X_rail - 12V, 3,3V , 1.5V/1.8V, 48V, 5V, thermal > X_connector - > X_connector_type > > With the stuff in the extended bit only visible if flag in bit 31 is set. Following the ABI rules, I propose the following directory structure, based on the suggestion provided. Please review it and let me know if you have any concerns. If there are no objections, I will implement this and release it as the next v5 patch. power_budget ├── 0 - The index number to be set in the Data Select Register │ ├── power - Value considering base power and data scale │ ├── pm_state - D0, D1, D2, D3 │ ├── pm_substate │ ├── type │ ├── rail - 12V, 3.3V, 1.5V/1.8V, 48V, 5V, Thermal │ ├── connector │ └── connector_type ├── 1 │ ├── power │ ├── pm_state │ ├──