Skip to contentSkip to conversation

acpi: document sysfs interfaces

PATCH Superseded Aishwarya Pant 3 participants 8 messages Feb 7, 2018 – Feb 9, 2018 ACPI

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover acpi: document sysfs interfaces

Patchset contains documentation for two acpi drivers- dock and dptf. Description was collected from git history and reading through code. This might be useful for tracking changes in the ABI.

Aishwarya Pant (2):
acpi/dptf: document sysfs atttributes
acpi/dock: document sysfs interface

 .../ABI/testing/sysfs-devices-platform-dock        | 38 ++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-platform-dptf      | 30 +++++++++++++++++
 2 files changed, 68 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-dock
 create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf
Signature · 1 line
2.16.1
#1 lore raw

PATCH 1/2 acpi/dptf: document sysfs atttributes

The descriptions have been collected from git commit logs and reading through code.

---
 Documentation/ABI/testing/sysfs-platform-dptf | 30 +++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf
Documentation/ABI/testing/sysfs-platform-dptf new file +30 -0
new file mode 100644
index 000000000000..e8168e5198d7
@@ -0,0 +1,30 @@
+sysfs interface for ACPI DPTF platform power driver
+---------------------------------------------------
+
+What:		/sys/bus/platform/devices/INT3407:00/dptf_power/charger_type
+What:		/sys/bus/platform/devices/INT3407:00/dptf_power/adapter_rating_mw
+What:		/sys/bus/platform/devices/INT3407:00/dptf_power/max_platform_power_mw
+What:		/sys/bus/platform/devices/INT3407:00/dptf_power/platform_power_source
+What:		/sys/bus/platform/devices/INT3407:00/dptf_power/battery_steady_power
+Date:		Jul, 2016
+KernelVersion:	v4.10
+Contact:	[email protected]
+Description:
+		charger_type:		(RO) The charger type- Traditional,
+					Hybrid or NVDC.
+
+		adapter_rating_mw:	(RO) Adapter rating in milliwatts (the
+					maximum Adapter power). Must be 0 if no
+					AC Adaptor is plugged in.
+
+		max_platform_power_mw:	(RO) Maximum platform power that can be
+					supported by the battery in milliwatts.
+
+		platform_power_source:	(RO) Display the platform power source
+					0x00 = DC
+					0x01 = AC
+					0x02 = USB
+					0x03 = Wireless Charger
+
+		battery_steady_power_mw:(RO) The maximum sustained power for
+					battery in milliwatts.
Signature · 1 line
2.16.1
#6 lore raw

PATCH 2/2 acpi/dock: document sysfs interface

In reply to Aishwarya Pant

Description has been collected from git commit history and reading through code.

---
 .../ABI/testing/sysfs-devices-platform-dock        | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-dock
Documentation/ABI/testing/sysfs-devices-platform-dock new file +38 -0
new file mode 100644
index 000000000000..0bb0d42e9126
@@ -0,0 +1,38 @@
+sysfs interface for ACPI dock station driver
+--------------------------------------------
+
+What:		/sys/devices/platform/dock.N/docked
+What:		/sys/devices/platform/dock.N/undock
+Date:		Dec, 2006
+KernelVersion:	2.6.19
+Contact:	[email protected]
+Description:
+		docked: (RO) Value 1 or 0 indicates whether the software
+		believes the laptop is docked in a docking station.
+
+		undock: (WO) Writing to this file causes the software to
+		initiate an undock request to the firmware.
+
+What:		/sys/devices/platform/dock.N/uid
+Date:		Feb, 2007
+KernelVersion:	v2.6.21
+Contact:	[email protected]
+Description:
+		(RO) Displays the docking station the laptop is docked to.
+
+What:		/sys/devices/platform/dock.N/flags
+Date:		May, 2007
+KernelVersion:	v2.6.21
+Contact:	[email protected]
+Description:
+		(RO) Show dock station flags, useful for checking if undock
+		request has been made by the user (from the immediate_undock
+		option).
+
+What:		/sys/devices/platform/dock.N/type
+Date:		Aug, 2008
+KernelVersion:	v2.6.27
+Contact:	[email protected]
+Description:
+		(RO) Display the dock station type- dock_station, ata_bay or
+		battery_bay.
Signature · 1 line
2.16.1
#7 lore raw

Re: [PATCH v1 2/2] acpi/dock: document sysfs interface

Quoted 19 lines · Aishwarya Pant

Description has been collected from git commit history and reading through code.

---
 .../ABI/testing/sysfs-devices-platform-dock        | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-dock
Documentation/ABI/testing/sysfs-devices-platform-dock new file +4 -0
new file mode 100644
index 000000000000..0bb0d42e9126
@@ -0,0 +1,38 @@
+sysfs interface for ACPI dock station driver
+--------------------------------------------
+
+What:          /sys/devices/platform/dock.N/docked

Documentation/ABI/testing/sysfs-devices-platform-dock line 14

Quoted 10 lines
Documentation/ABI/testing/sysfs-devices-platform-dock new file +10 -0
+What:          /sys/devices/platform/dock.N/undock
+Date:          Dec, 2006
+KernelVersion: 2.6.19
+Contact:       [email protected]
+Description:
+               docked: (RO) Value 1 or 0 indicates whether the software
+               believes the laptop is docked in a docking station.
+
+               undock: (WO) Writing to this file causes the software to
+               initiate an undock request to the firmware.

Please split the above into two entries.

Apart from that it looks OK to me.

#2 lore raw

Re: [PATCH 1/2] acpi/dptf: document sysfs atttributes

In reply to Aishwarya Pant
Quoted 15 lines · Aishwarya Pant

The descriptions have been collected from git commit logs and reading through code.

---
 Documentation/ABI/testing/sysfs-platform-dptf | 30 +++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf
Documentation/ABI/testing/sysfs-platform-dptf new file +0 -0
new file mode 100644
index 000000000000..e8168e5198d7

Documentation/ABI/testing/sysfs-platform-dptf line 2

Quoted 2 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +2 -0
@@ -0,0 +1,30 @@
+sysfs interface for ACPI DPTF platform power driver
+---------------------------------------------------

The header isn't necessary.

Documentation/ABI/testing/sysfs-platform-dptf line 8

Quoted 6 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +6 -0
+
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/charger_type
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/adapter_rating_mw
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/max_platform_power_mw
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/platform_power_source
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/battery_steady_power

There should be one entry per attribute AFAICS.

Also I need Srinivas to tell me whether or not the descriptions are accurate enough.

Quoted 23 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +22 -1
+Date:          Jul, 2016
+KernelVersion: v4.10
+Contact:       [email protected]
+Description:
+               charger_type:           (RO) The charger type- Traditional,
+                                       Hybrid or NVDC.
+
+               adapter_rating_mw:      (RO) Adapter rating in milliwatts (the
+                                       maximum Adapter power). Must be 0 if no
+                                       AC Adaptor is plugged in.
+
+               max_platform_power_mw:  (RO) Maximum platform power that can be
+                                       supported by the battery in milliwatts.
+
+               platform_power_source:  (RO) Display the platform power source
+                                       0x00 = DC
+                                       0x01 = AC
+                                       0x02 = USB
+                                       0x03 = Wireless Charger
+
+               battery_steady_power_mw:(RO) The maximum sustained power for
+                                       battery in milliwatts.
--
#3 lore raw

Re: [PATCH 1/2] acpi/dptf: document sysfs atttributes

Quoted 21 lines · Rafael J. Wysocki
Quoted 15 lines · Aishwarya Pant

The descriptions have been collected from git commit logs and reading through code.

---
 Documentation/ABI/testing/sysfs-platform-dptf | 30 +++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf
Documentation/ABI/testing/sysfs-platform-dptf new file +0 -0
new file mode 100644
index 000000000000..e8168e5198d7

Documentation/ABI/testing/sysfs-platform-dptf line 2

Quoted 2 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +2 -0
@@ -0,0 +1,30 @@
+sysfs interface for ACPI DPTF platform power driver
+---------------------------------------------------

The header isn't necessary.

Quoted 8 lines

Documentation/ABI/testing/sysfs-platform-dptf line 8

Quoted 6 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +6 -0
+
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/charger_type
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/adapter_rating_mw
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/max_platform_power_mw
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/platform_power_source
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/battery_steady_power

There should be one entry per attribute AFAICS.

I grouped attributes by the date in which they were added for brevity, because otherwise fields like Date added, KernelVersion and Contact information are the same.

I can split them up if it makes more sense...

Aishwarya

Quoted 27 lines

Also I need Srinivas to tell me whether or not the descriptions are accurate enough.

Quoted 23 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +22 -1
+Date:          Jul, 2016
+KernelVersion: v4.10
+Contact:       [email protected]
+Description:
+               charger_type:           (RO) The charger type- Traditional,
+                                       Hybrid or NVDC.
+
+               adapter_rating_mw:      (RO) Adapter rating in milliwatts (the
+                                       maximum Adapter power). Must be 0 if no
+                                       AC Adaptor is plugged in.
+
+               max_platform_power_mw:  (RO) Maximum platform power that can be
+                                       supported by the battery in milliwatts.
+
+               platform_power_source:  (RO) Display the platform power source
+                                       0x00 = DC
+                                       0x01 = AC
+                                       0x02 = USB
+                                       0x03 = Wireless Charger
+
+               battery_steady_power_mw:(RO) The maximum sustained power for
+                                       battery in milliwatts.
--
#4 lore raw

Re: [PATCH 1/2] acpi/dptf: document sysfs atttributes

Quoted 31 lines · Aishwarya Pant
Quoted 21 lines · Rafael J. Wysocki
Quoted 15 lines · Aishwarya Pant

The descriptions have been collected from git commit logs and reading through code.

---
 Documentation/ABI/testing/sysfs-platform-dptf | 30 +++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf
Documentation/ABI/testing/sysfs-platform-dptf new file +0 -0
new file mode 100644
index 000000000000..e8168e5198d7

Documentation/ABI/testing/sysfs-platform-dptf line 2

Quoted 2 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +2 -0
@@ -0,0 +1,30 @@
+sysfs interface for ACPI DPTF platform power driver
+---------------------------------------------------

The header isn't necessary.

Quoted 8 lines

Documentation/ABI/testing/sysfs-platform-dptf line 8

Quoted 6 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +6 -0
+
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/charger_type
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/adapter_rating_mw
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/max_platform_power_mw
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/platform_power_source
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/battery_steady_power

There should be one entry per attribute AFAICS.

Quoted 5 lines

I grouped attributes by the date in which they were added for brevity, because otherwise fields like Date added, KernelVersion and Contact information are the same.

I can split them up if it makes more sense...

That's what the format is from looking at the existing files.

#5 lore raw

Re: [PATCH 1/2] acpi/dptf: document sysfs atttributes

In reply to Rafael J. Wysocki
Quoted 39 lines · Rafael J. Wysocki
Quoted 18 lines · Aishwarya Pant

The descriptions have been collected from git commit logs and reading
through code.

---
 Documentation/ABI/testing/sysfs-platform-dptf | 30
+++++++++++++++++++++++++++

 1 file changed, 30 insertions(+)

 create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf

Documentation/ABI/testing/sysfs-platform-dptf new file +0 -0
new file mode 100644
index 000000000000..e8168e5198d7

Documentation/ABI/testing/sysfs-platform-dptf line 2

Quoted 2 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +2 -0
@@ -0,0 +1,30 @@
+sysfs interface for ACPI DPTF platform power driver
+---------------------------------------------------

The header isn't necessary.

Quoted 11 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +2 -0
+
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/cha

rger_type
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/ada pter_rating_mw
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/max _platform_power_mw
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/pla tform_power_source
+What:          /sys/bus/platform/devices/INT3407:00/dptf_power/bat tery_steady_power

There should be one entry per attribute AFAICS.

Quoted 2 lines

Also I need Srinivas to tell me whether or not the descriptions are accurate enough.

Descriptions are correct.

Thanks,
Srinivas

Quoted 31 lines
Quoted 31 lines
Documentation/ABI/testing/sysfs-platform-dptf new file +5 -0
+Date:          Jul, 2016
+KernelVersion: v4.10
+Contact:       [email protected]
+Description:
+               charger_type:           (RO) The charger type-

Traditional,
+                                       Hybrid or NVDC. +
+               adapter_rating_mw:      (RO) Adapter rating in milliwatts (the
+                                       maximum Adapter power). Must be 0 if no
+                                       AC Adaptor is plugged in. +
+               max_platform_power_mw:  (RO) Maximum platform power that can be
+                                       supported by the battery in milliwatts.
+
+               platform_power_source:  (RO) Display the platform power source
+                                       0x00 = DC
+                                       0x01 = AC
+                                       0x02 = USB
+                                       0x03 = Wireless Charger +
+               battery_steady_power_mw:(RO) The maximum sustained power for
+                                       battery in milliwatts. --