[PATCH] Input: trackpoint: document sysfs interface
Descriptions have been collected from git commit logs, code commits and the TrackPoint System Version 4.0 Engineering Specification. Signed-off-by: Aishwarya Pant --- .../ABI/testing/sysfs-devices-platform-trackpoint | 115 + 1 file changed, 115 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-trackpoint diff --git a/Documentation/ABI/testing/sysfs-devices-platform-trackpoint b/Documentation/ABI/testing/sysfs-devices-platform-trackpoint new file mode 100644 index ..df11901a6b3d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-platform-trackpoint @@ -0,0 +1,115 @@ +What: /sys/devices/platform/i8042/.../sensitivity +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Trackpoint sensitivity. + +What: /sys/devices/platform/i8042/.../intertia +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Negative inertia factor. High values cause the cursor to + snap backward when the trackpoint is released. + +What: /sys/devices/platform/i8042/.../reach +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Backup range for z-axis press. + +What: /sys/devices/platform/i8042/.../draghys +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) The drag hysteresis controls how hard it is to drag with + z-axis pressed. + +What: /sys/devices/platform/i8042/.../mindrag +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Minimum amount of force needed to trigger dragging. + +What: /sys/devices/platform/i8042/.../speed +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Speed of the trackpoint cursor. + +What: /sys/devices/platform/i8042/.../thresh +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Minimum value for z-axis force required to trigger a press + or release, relative to the running average. + +What: /sys/devices/platform/i8042/.../upthresh +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) The offset from the running average required to generate a + select (click) on z-axis on release. + +What: /sys/devices/platform/i8042/.../ztime +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) This attribute determines how sharp a press has to be in + order to be recognized. + +What: /sys/devices/platform/i8042/.../jenks +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Minimum curvature in degrees required to generate a double + click without a release. + +What: /sys/devices/platform/i8042/.../skipback +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) When the skipback bit is set, backup cursor movement during + releases from drags will be suppressed. The default value for + this bit is 0. + +What: /sys/devices/platform/i8042/.../ext_dev +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Disable (0) or enable (1) external pointing device. + +What: /sys/devices/platform/i8042/.../press_to_select +Date: Aug, 2005 +KernelVersion: 2.6.14 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Writing a value of 1 to this file will enable the Press to + Select functions like tapping the control stick to simulate a + left click, and writing 0 will disable it. + +What: /sys/devices/platform/i8042/.../drift_time +Date: Dec, 2014 +KernelVersion: 3.19 +Contact: linux-in...@vger.kernel.org +Description: + (RW) This parameter controls the period of time to test for a + ‘hands off’ condition (i.e. when no force is applied) before a + drift (noise) calibration occurs. + + IBM Trackpoints have a feature to compensate for drift by + recalibrating themselves periodically. By default, if for 0.5 + seconds there is no change in position, it's used as the new + zero. This duration is too low. Often, the calibration happens + when the trackpoint is in
[PATCH] HID: logitech-hidpp: document sysfs interface
Descriptions have been collected from git commit logs. Signed-off-by: Aishwarya Pant --- .../ABI/testing/sysfs-driver-hid-logitech-hidpp | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-logitech-hidpp diff --git a/Documentation/ABI/testing/sysfs-driver-hid-logitech-hidpp b/Documentation/ABI/testing/sysfs-driver-hid-logitech-hidpp new file mode 100644 index ..d8f831f2d6b5 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-hid-logitech-hidpp @@ -0,0 +1,19 @@ +What: /sys/bus/hid/drivers/logitech-hidpp-device//range +Date: Jan, 2016 +KernelVersion: 4.6 +Contact: linux-in...@vger.kernel.org +Description: + (RW) This attribute controls the amount of 'turn' permitted in + Logitech G920 wheel. Reading from the file shows the current + range of the steering wheel. Writing a value within the min and + max boundary sets the range of the wheel. + +What: /sys/bus/hid/drivers/logitech-hidpp-device//builtin_power_supply +Date: Apr, 2017 +KernelVersion: 4.12 +Contact: linux-in...@vger.kernel.org +Description: + Presence of this file indicates that HID++ driver is capable of + handling battery properties in the kernel. This way, upower can + add a udev rule to decide whether or not it should use the + internal unifying support or the generic kernel one. -- 2.16.2
[PATCH] HID: ntrig: document sysfs interface
Add sysfs documentation for N-Trig touchscreens under Documentation/ABI. Descriptions have been collected from code comments. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-driver-hid-ntrig | 70 1 file changed, 70 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-hid-ntrig diff --git a/Documentation/ABI/testing/sysfs-driver-hid-ntrig b/Documentation/ABI/testing/sysfs-driver-hid-ntrig new file mode 100644 index ..e574a5625efe --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-hid-ntrig @@ -0,0 +1,70 @@ +What: /sys/bus/hid/drivers/ntrig//activate_slack +Date: May, 2010 +KernelVersion: 2.6.35 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Number of contact frames ignored before acknowledging the + start of activity (activating touch). + + +What: /sys/bus/hid/drivers/ntrig//decativate_slack +Date: May, 2010 +KernelVersion: 2.6.35 +Contact: linux-in...@vger.kernel.org +Description: + (RW) Number of empty (no contact) frames ignored before + acknowledging the end of activity (deactivating touch). + + When the last finger is removed from the device, it sends a + number of empty frames. By holding off on deactivation for a few + frames false erroneous disconnects can be tolerated, where the + sensor may mistakenly not detect a finger that is still present. + + +What: /sys/bus/hid/drivers/ntrig//activation_width +What: /sys/bus/hid/drivers/ntrig//activation_height +Date: May, 2010 +KernelVersion: 2.6.35 +Contact: linux-in...@vger.kernel.org +Description: + Threholds to override activation slack. + + activation_width: (RW) Width threshold to immediately + start processing touch events. + + activation_height: (RW) Height threshold to immediately + start processing touch events. + + +What: /sys/bus/hid/drivers/ntrig//min_width +What: /sys/bus/hid/drivers/ntrig//min_height +Date: May, 2010 +KernelVersion: 2.6.35 +Contact: linux-in...@vger.kernel.org +Description: + Minimum size contact accepted. + + min_width: (RW) Minimum touch contact width to decide + activation and activity. + + min_height: (RW) Minimum touch contact height to decide + activation and activity. + + +What: /sys/bus/hid/drivers/ntrig//sensor_physical_width +What: /sys/bus/hid/drivers/ntrig//sensor_physical_height +Date: May, 2010 +KernelVersion: 2.6.35 +Contact: linux-in...@vger.kernel.org +Description: + (RO) These are internal ranges not used for normal events but + useful for tuning. + + +What: /sys/bus/hid/drivers/ntrig//sensor_logical_width +What: /sys/bus/hid/drivers/ntrig//sensor_logical_height +Date: May, 2010 +KernelVersion: 2.6.35 +Contact: linux-in...@vger.kernel.org +Description: + (RO) The range for positions reported during activity. -- 2.16.2
[PATCH] char/bsr: add sysfs interface documentation
Descriptions have collected from code comments and by reading through code. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-class-bsr | 25 + 1 file changed, 25 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-bsr diff --git a/Documentation/ABI/testing/sysfs-class-bsr b/Documentation/ABI/testing/sysfs-class-bsr new file mode 100644 index ..7bf145d32cbc --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-bsr @@ -0,0 +1,25 @@ +What: /sys/class/bsr/bsr*/bsr_size +Date: Jul, 2008 +KernelVersion: 2.6.27 +Contact: Arnd Bergmann , + Greg Kroah-Hartman +Description: + (RO) Size of the barrier-synchronization register (BSR) + register in bytes. + +What: /sys/class/bsr/bsr*/bsr_length +Date: Jul, 2008 +KernelVersion: 2.6.27 +Contact: Arnd Bergmann , + Greg Kroah-Hartman +Description: + (RO) The length of memory region that can be mapped in bytes. + +What: /sys/class/bsr/bsr*/bsr_stride +Date: Jul, 2008 +KernelVersion: 2.6.27 +Contact: Arnd Bergmann , + Greg Kroah-Hartman +Description: + (RO) The stride or the interval at which the allocated BSR bytes + repeat within the mapping. -- 2.16.2
[PATCH] char/ipmi: add documentation for sysfs interface
This is an attempt to document the sysfs interface for the IPMI drivers. Descriptions were collected from v2.0 of the IPMI specification and from code comments. Signed-off-by: Aishwarya Pant --- .../ABI/testing/sysfs-devices-platform-ipmi| 238 + 1 file changed, 238 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-ipmi diff --git a/Documentation/ABI/testing/sysfs-devices-platform-ipmi b/Documentation/ABI/testing/sysfs-devices-platform-ipmi new file mode 100644 index ..2a781e7513b7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-platform-ipmi @@ -0,0 +1,238 @@ +What: /sys/devices/platform/ipmi_bmc.*/firmware_revision +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) The major and minor revision of the firmware. + + +What: /sys/devices/platform/ipmi_bmc.*/aux_firmware_revision +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) Holds additional information about the firmware revision, + such as boot block or internal data structure version numbers. + The meanings of the numbers are specific to the vendor + identified by Manufacturer ID. + + +What: /sys/devices/platform/ipmi_bmc.*/revision +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) Device revision. Useful for identifying if significant + hardware changes have been made to the implementation of the + management controller. + + +What: /sys/devices/platform/ipmi_bmc.*/provides_device_sdrs +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) Indicates whether device provides device sensor data + records (1) or not (0). + + +What: /sys/devices/platform/ipmi_bmc.*/device_id +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) Device id is specified by the manufacturer identified by + the Manufacturer ID field. This field allows controller specific + software to identify the unique application command, OEM + fields, and functionality that are provided by the controller + + +What: /sys/devices/platform/ipmi_bmc.*/additional_device_support +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) Lists the IPMI ‘logical device’ commands and functions + that the controller supports that are in addition to the + mandatory IPM and Application commands. + + +What: /sys/devices/platform/ipmi_bmc.*/ipmi_version +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) Displays the IPMI Command Specification Version. + + +What: /sys/devices/platform/ipmi_bmc.*/manufacturer_id +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) Identifies the manufacturer responsible for the + specification of functionality of the vendor (OEM)-specific + commands, codes, and interfaces used in the controller. + + +What: /sys/devices/platform/ipmi_bmc.*/product_id +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) Displays a number that identifies a particular system, + module, add-in card, or board set. The number is specified + according to the manufacturer given by Manufacturer ID. + +For detailed definitions of the above attributes, refer to section 20.1 'Get +Device ID Command' of the IPMI specification v2.0. + + +What: /sys/devices/platform/ipmi_bmc.*/guid +Date: Mar, 2006 +KernelVersion: v2.6.17 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) A GUID (Globally Unique ID), also referred to as a UUID + (Universally Unique Identifier), for the management controller, + as described in section 20.8 'Get Device GUID Command' of the + IPMI specification v2.0. + + +What: /sys/devices/platform/ipmi_si.*/type +Date: Sep, 2017 +KernelVersion: v4.15 +Contact: openipmi-develo...@lists.sourceforge.net +Description: + (RO) The device interface for IPMI "kcs", "smic", "bt" or + "invalid" + +What: /sys/devices/pl
[RESEND PATCH v2] Documentation/ABI: add sysfs interface for s6e63m0 lcd driver
Document sysfs attributes of s6e63m0 lcd panel driver by looking through git logs and reading code. Signed-off-by: Aishwarya Pant --- Changes in v2: - Convert spaces to tabs Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 | 27 +++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 diff --git a/Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 b/Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 new file mode 100644 index ..ae0a2d3dcc07 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 @@ -0,0 +1,27 @@ +sysfs interface for the S6E63M0 AMOLED LCD panel driver +--- + +What: /sys/class/lcd//gamma_mode +Date: May, 2010 +KernelVersion: v2.6.35 +Contact: dri-de...@lists.freedesktop.org +Description: + (RW) Read or write the gamma mode. Following three modes are + supported: + 0 - gamma value 2.2, + 1 - gamma value 1.9 and + 2 - gamma value 1.7. + + +What: /sys/class/lcd//gamma_table +Date: May, 2010 +KernelVersion: v2.6.35 +Contact: dri-de...@lists.freedesktop.org +Description: + (RO) Displays the size of the gamma table i.e. the number of + gamma modes available. + +This is a backlight lcd driver. These interfaces are an extension to the API +documented in Documentation/ABI/testing/sysfs-class-lcd and in +Documentation/ABI/stable/sysfs-class-backlight (under +/sys/class/backlight//). -- 2.16.2
[RESEND PATCH v2] Documentation/ABI: clean up sysfs-class-pktcdvd
Clean up the sysfs documentation such that it is in the same format as described in Documentation/ABI/README. Mainly, the patch moves the attribute names to the 'What:' field. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Changes in v2: - Convert spaces to tabs Documentation/ABI/testing/sysfs-class-pktcdvd | 129 +++--- 1 file changed, 75 insertions(+), 54 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-pktcdvd b/Documentation/ABI/testing/sysfs-class-pktcdvd index b1c3f0263359..dde4f26d0780 100644 --- a/Documentation/ABI/testing/sysfs-class-pktcdvd +++ b/Documentation/ABI/testing/sysfs-class-pktcdvd @@ -1,60 +1,81 @@ -What: /sys/class/pktcdvd/ -Date: Oct. 2006 -KernelVersion: 2.6.20 -Contact:Thomas Maier -Description: - sysfs interface --- +The pktcdvd module (packet writing driver) creates the following files in the +sysfs: ( is in the format major:minor) + +What: /sys/class/pktcdvd/add +What: /sys/class/pktcdvd/remove +What: /sys/class/pktcdvd/device_map +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact: Thomas Maier +Description: + + add:(WO) Write a block device id (major:minor) to + create a new pktcdvd device and map it to the + block device. + + remove: (WO) Write the pktcdvd device id (major:minor) + to remove the pktcdvd device. + + device_map: (RO) Shows the device mapping in format: + pktcdvd[0-7] + + +What: /sys/class/pktcdvd/pktcdvd[0-7]/dev +What: /sys/class/pktcdvd/pktcdvd[0-7]/uevent +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact: Thomas Maier +Description: + dev:(RO) Device id + + uevent: (WO) To send a uevent + + +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_started +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_finished +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_written +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read_gather +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/reset +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact: Thomas Maier +Description: + packets_started:(RO) Number of started packets. + + packets_finished: (RO) Number of finished packets. + + kb_written: (RO) kBytes written. + + kb_read:(RO) kBytes read. + + kb_read_gather: (RO) kBytes read to fill write packets. + + reset: (WO) Write any value to it to reset + pktcdvd device statistic values, like + bytes read/written. + + +What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/size +What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_off +What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_on +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact: Thomas Maier +Description: + size: (RO) Contains the size of the bio write queue. + + congestion_off: (RW) If bio write queue size is below this mark, + accept new bio requests from the block layer. -The pktcdvd module (packet writing driver) creates -these files in the sysfs: -( is in format major:minor ) - -/sys/class/pktcdvd/ -add(0200) Write a block device id (major:minor) - to create a new pktcdvd device and map - it to the block device. - -remove (0200) Write the pktcdvd device id (major:minor) - to it to remove the pktcdvd device. - -device_map (0444) Shows the device mapping in format: - pktcdvd[0-7] - -/sys/class/pktcdvd/pktcdvd[0-7]/ -dev (0444) Device id -uevent(0200) To send an uevent. - -/sys/class/pktcdvd/pktcdvd[0-7]/stat/ -packets_started (0444) Number of started packets. -packets_finished (0444) Number of finished packets. - -kb_written(0444) kBytes written. -kb_read (0444) kBytes read. -kb_read_gather(0444) kBytes read to fill write packets. - -reset (0200) Write any value to it to reset - pktcdvd device statistic values, like - bytes read/written. - -/sys/class/pktcdvd/pktcdvd[0-7]/write_queue/ -size (0444) Contains the size of the bio write -
Re: [PATCH] acpi: nfit: document sysfs interface
On Wed, Feb 21, 2018 at 03:46:06PM -0800, Dan Williams wrote: > > So, this looks great and is something I've had on my backlog for a > while. That said this is a bit incomplete. These attributes are > relative to the the "nd" bus which is the libnvdimm sub-system sysfs > interface. This document describes that sysfs layout [3]. Ideally that > content would be converted into Documentation/ABI format and merged > with what you have done here into an overall > Documentation/ABI/testing/sysfs-bus-nvdimm file. > > I realize that's quite a bit more work, so I'm fine if we start with > the nfit attributes and save that follow on work for a separate patch > in the future. Thanks for the review! I'll keep the libnvdim interface in my backlog for now. I just sent a revision of the nfit patch with the suggested changes. Aishwarya > > [3]: > https://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git/tree/Documentation/nvdimm/nvdimm.txt?h=libnvdimm-for-next
[PATCH v2] acpi: nfit: document sysfs interface
This is an attempt to document the nfit sysfs interface. The descriptions have been collected from git commit logs and the ACPI specification 6.2. Signed-off-by: Aishwarya Pant --- Changes in v2: - Add descriptions for range_index and ecc_unit_size - Edit various descriptions as suggested Documentation/ABI/testing/sysfs-bus-nfit | 233 +++ 1 file changed, 233 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-nfit diff --git a/Documentation/ABI/testing/sysfs-bus-nfit b/Documentation/ABI/testing/sysfs-bus-nfit new file mode 100644 index ..619eb8ca0f99 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-nfit @@ -0,0 +1,233 @@ +For all of the nmem device attributes under nfit/*, see the 'NVDIMM Firmware +Interface Table (NFIT)' section in the ACPI specification +(http://www.uefi.org/specifications) for more details. + +What: /sys/bus/nd/devices/nmemX/nfit/serial +Date: Jun, 2015 +KernelVersion: v4.2 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Serial number of the NVDIMM (non-volatile dual in-line + memory module), assigned by the module vendor. + + +What: /sys/bus/nd/devices/nmemX/nfit/handle +Date: Apr, 2015 +KernelVersion: v4.2 +Contact: linux-nvd...@lists.01.org +Description: + (RO) The address (given by the _ADR object) of the device on its + parent bus of the NVDIMM device containing the NVDIMM region. + + +What: /sys/bus/nd/devices/nmemX/nfit/device +Date: Apr, 2015 +KernelVersion: v4.1 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Device id for the NVDIMM, assigned by the module vendor. + + +What: /sys/bus/nd/devices/nmemX/nfit/rev_id +Date: Jun, 2015 +KernelVersion: v4.2 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Revision of the NVDIMM, assigned by the module vendor. + + +What: /sys/bus/nd/devices/nmemX/nfit/phys_id +Date: Apr, 2015 +KernelVersion: v4.2 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Handle (i.e., instance number) for the SMBIOS (system + management BIOS) Memory Device structure describing the NVDIMM + containing the NVDIMM region. + + +What: /sys/bus/nd/devices/nmemX/nfit/flags +Date: Jun, 2015 +KernelVersion: v4.2 +Contact: linux-nvd...@lists.01.org +Description: + (RO) The flags in the NFIT memory device sub-structure indicate + the state of the data on the nvdimm relative to its energy + source or last "flush to persistence". + + The attribute is a translation of the 'NVDIMM State Flags' field + in section 5.2.25.3 'NVDIMM Region Mapping' Structure of the + ACPI specification 6.2. + + The health states are "save_fail", "restore_fail", "flush_fail", + "not_armed", "smart_event", "map_fail" and "smart_notify". + + +What: /sys/bus/nd/devices/nmemX/nfit/format +What: /sys/bus/nd/devices/nmemX/nfit/format1 +What: /sys/bus/nd/devices/nmemX/nfit/formats +Date: Apr, 2016 +KernelVersion: v4.7 +Contact: linux-nvd...@lists.01.org +Description: + (RO) The interface codes indicate support for persistent memory + mapped directly into system physical address space and / or a + block aperture access mechanism to the NVDIMM media. + The 'formats' attribute displays the number of supported + interfaces. + + This layout is compatible with existing libndctl binaries that + only expect one code per-dimm as they will ignore + nmemX/nfit/formats and nmemX/nfit/formatN. + + +What: /sys/bus/nd/devices/nmemX/nfit/vendor +Date: Apr, 2016 +KernelVersion: v4.7 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Vendor id of the NVDIMM. + + +What: /sys/bus/nd/devices/nmemX/nfit/dsm_mask +Date: May, 2016 +KernelVersion: v4.7 +Contact: linux-nvd...@lists.01.org +Description: + (RO) The bitmask indicates the supported device specific control + functions relative to the NVDIMM command family supported by the + device + + +What: /sys/bus/nd/devices/nmemX/nfit/family +Date: Apr, 2016 +KernelVersion: v4.7 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Displays the NVDIMM family command sets. Values + 0, 1, 2 and 3 correspond to NVDIMM_FAMILY_INTEL, + NVDIMM_FAMILY_HPE1, NVDIMM_FAMILY_HPE2 and NVDIMM_FAMILY_MSFT + respectively. + + See th
[PATCH v2] block: rbd: update sysfs interface
The existing sysfs interface has been updated to be in the same format as described in Documentation/ABI/README. This will be useful for scripting and tracking changes in the ABI. Attributes have been grouped by functionality and/or the date on which they were added. There are a couple of more changes: - The attributes have been annotated with file permissions RO/RW/WO. - Added description of the bus attribute supported_features Signed-off-by: Aishwarya Pant --- Changes in v2: - Update dates and kernel version. Sorry, my scripts have been acting up :/ - Update contact information. Would it be more appropriate to use the mailing list ceph-de...@vger.kernel.org in the contact section? - (WO) -> (RO) in image_id - Fix typo pool_idr -> pool_id Documentation/ABI/testing/sysfs-bus-rbd | 203 +++- 1 file changed, 122 insertions(+), 81 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd index f208ac58d613..cc30bee8b5f4 100644 --- a/Documentation/ABI/testing/sysfs-bus-rbd +++ b/Documentation/ABI/testing/sysfs-bus-rbd @@ -1,121 +1,162 @@ -What: /sys/bus/rbd/ -Date: November 2010 -Contact: Yehuda Sadeh , - Sage Weil +What: /sys/bus/rbd/add +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: Sage Weil Description: + (WO) Add rbd block device. -Being used for adding and removing rbd block devices. + Usage: [] -Usage: [] +$ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add - $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add + The snapshot name can be "-" or omitted to map the image + read/write. A will be assigned for any registered block + device. If snapshot is used, it will be mapped read-only. -The snapshot name can be "-" or omitted to map the image read/write. A -will be assigned for any registered block device. If snapshot is used, it will -be mapped read-only. -Usage: [force] +What: /sys/bus/rbd/remove +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: Sage Weil +Description: + (WO) Remove rbd block device. + + Usage: [force] - $ echo 2 > /sys/bus/rbd/remove +$ echo 2 > /sys/bus/rbd/remove + + Optional "force" argument which when passed will wait for + running requests and then unmap the image. Requests sent to the + driver after initiating the removal will be failed. (August + 2016, since 4.9.) -Optional "force" argument which when passed will wait for running requests and -then unmap the image. Requests sent to the driver after initiating the removal -will be failed. (August 2016, since 4.9.) What: /sys/bus/rbd/add_single_major -Date: December 2013 -KernelVersion: 3.14 -Contact: Sage Weil -Description: Available only if rbd module is inserted with single_major +Date: Dec, 2013 +KernelVersion: v3.14 +Contact: Sage Weil +Description: + (WO) Available only if rbd module is inserted with single_major parameter set to true. - Usage is the same as for /sys/bus/rbd/add. If present, + + Usage is the same as for /sys/bus/rbd/add. If present, this should be used instead of the latter: any attempts to use - /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is - available will fail for backwards compatibility reasons. + /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is available + will fail for backwards compatibility reasons. + What: /sys/bus/rbd/remove_single_major -Date: December 2013 -KernelVersion: 3.14 -Contact: Sage Weil -Description: Available only if rbd module is inserted with single_major +Date: Dec, 2013 +KernelVersion: v3.14 +Contact: Sage Weil +Description: + (WO) Available only if rbd module is inserted with single_major parameter set to true. - Usage is the same as for /sys/bus/rbd/remove. If present, + + Usage is the same as for /sys/bus/rbd/remove. If present, this should be used instead of the latter: any attempts to use /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is available will fail for backwards compatibility reasons. -Entries under /sys/bus/rbd/devices// - - -client_addr - - The ceph unique client entity_addr_t (address + nonce). - The format is :/: '1.2.3.4:1234/5678' or - '[1:2:3:4:5:6:7:8]:1234/5678'. (August 2016, since 4.9.) - -client_id - - The ceph unique client id that was assigne
[PATCH] xen/blkback: update sysfs interface documentation
Add documentation for statistic attribute ds_req - the number of discarded requests. Signed-off-by: Aishwarya Pant --- Documentation/ABI/stable/sysfs-bus-xen-backend | 7 +++ 1 file changed, 7 insertions(+) diff --git a/Documentation/ABI/stable/sysfs-bus-xen-backend b/Documentation/ABI/stable/sysfs-bus-xen-backend index 3d5951c8bf5f..20ef835785ec 100644 --- a/Documentation/ABI/stable/sysfs-bus-xen-backend +++ b/Documentation/ABI/stable/sysfs-bus-xen-backend @@ -73,3 +73,10 @@ KernelVersion: 3.0 Contact: Konrad Rzeszutek Wilk Description: Number of sectors written by the frontend. + +What: /sys/bus/xen-backend/devices/vbd-*/statistics/ds_req +Date: October 2011 +KernelVersion: 3.1 +Contact: Konrad Rzeszutek Wilk +Description: +Number of discard requests from the frontend. -- 2.16.1
[PATCH] block: rbd: update sysfs interface
The existing sysfs interface has been updated to be in the same format as described in Documentation/ABI/README. This will be useful for scripting and tracking changes in the ABI. Attributes have been grouped by functionality and/or the date on which they were added. There are a couple of more changes: - The attributes have been annotated with file permissions RO/RW/WO. - Added description of the bus attribute supported_features Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-bus-rbd | 202 +++- 1 file changed, 122 insertions(+), 80 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-bus-rbd b/Documentation/ABI/testing/sysfs-bus-rbd index f208ac58d613..9549e9b0fcf8 100644 --- a/Documentation/ABI/testing/sysfs-bus-rbd +++ b/Documentation/ABI/testing/sysfs-bus-rbd @@ -1,121 +1,163 @@ -What: /sys/bus/rbd/ -Date: November 2010 +What: /sys/bus/rbd/add +What: /sys/bus/rbd/remove +Date: Jan, 2012 +KernelVersion: v3.10 Contact: Yehuda Sadeh , Sage Weil Description: + add : (WO) Add rbd block device. -Being used for adding and removing rbd block devices. + Usage: [] -Usage: [] +$ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add - $ echo "192.168.0.1 name=admin rbd foo" > /sys/bus/rbd/add + The snapshot name can be "-" or omitted to map the image + read/write. A will be assigned for any registered block + device. If snapshot is used, it will be mapped read-only. -The snapshot name can be "-" or omitted to map the image read/write. A -will be assigned for any registered block device. If snapshot is used, it will -be mapped read-only. + remove: (WO) Remove rbd block device. -Usage: [force] + Usage: [force] - $ echo 2 > /sys/bus/rbd/remove +$ echo 2 > /sys/bus/rbd/remove + + Optional "force" argument which when passed will wait for + running requests and then unmap the image. Requests sent to the + driver after initiating the removal will be failed. (August + 2016, since 4.9.) -Optional "force" argument which when passed will wait for running requests and -then unmap the image. Requests sent to the driver after initiating the removal -will be failed. (August 2016, since 4.9.) What: /sys/bus/rbd/add_single_major -Date: December 2013 -KernelVersion: 3.14 -Contact: Sage Weil -Description: Available only if rbd module is inserted with single_major +Date: Dec, 2013 +KernelVersion: v3.14 +Contact: Yehuda Sadeh , + Sage Weil +Description: + (WO) Available only if rbd module is inserted with single_major parameter set to true. - Usage is the same as for /sys/bus/rbd/add. If present, + + Usage is the same as for /sys/bus/rbd/add. If present, this should be used instead of the latter: any attempts to use - /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is - available will fail for backwards compatibility reasons. + /sys/bus/rbd/add if /sys/bus/rbd/add_single_major is available + will fail for backwards compatibility reasons. + What: /sys/bus/rbd/remove_single_major -Date: December 2013 -KernelVersion: 3.14 -Contact: Sage Weil -Description: Available only if rbd module is inserted with single_major +Date: Dec, 2013 +KernelVersion: v3.14 +Contact: Yehuda Sadeh , + Sage Weil +Description: + (WO) Available only if rbd module is inserted with single_major parameter set to true. - Usage is the same as for /sys/bus/rbd/remove. If present, + + Usage is the same as for /sys/bus/rbd/remove. If present, this should be used instead of the latter: any attempts to use /sys/bus/rbd/remove if /sys/bus/rbd/remove_single_major is available will fail for backwards compatibility reasons. -Entries under /sys/bus/rbd/devices// - - -client_addr - - The ceph unique client entity_addr_t (address + nonce). - The format is :/: '1.2.3.4:1234/5678' or - '[1:2:3:4:5:6:7:8]:1234/5678'. (August 2016, since 4.9.) - -client_id - - The ceph unique client id that was assigned for this specific session. - -cluster_fsid - - The ceph cluster UUID. (August 2016, since 4.9.) - -config_info - - The string written into /sys/bus/rbd/add{,_single_major}. (August - 2016, since 4.9.) - -features - - A hexadecimal encoding of the feature bits for this image. -major - - The block devic
[PATCH v3] aoe: document sysfs interface
Documentation has been compiled from git commit logs and descriptions in Documentation/aoe/aoe.txt. This should be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Changes in v3: - name -> names in description of netif v2: - interface -> interfaces in description of netif Documentation/ABI/testing/sysfs-block-aoe | 45 +++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-block-aoe diff --git a/Documentation/ABI/testing/sysfs-block-aoe b/Documentation/ABI/testing/sysfs-block-aoe new file mode 100644 index ..b5837765bcdd --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block-aoe @@ -0,0 +1,45 @@ +What: /sys/block/etherd*/mac +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) The ethernet address of the remote Ata over Ethernet (AoE) + device. + +What: /sys/block/etherd*/netif +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) The names of the network interfaces on the localhost (comma + separated) through which we are communicating with the remote + AoE device. + +What: /sys/block/etherd*/state +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) Device status. The state attribute is "up" when the device + is ready for I/O and "down" if detected but unusable. The + "down,closewait" state shows that the device is still open and + cannot come up again until it has been closed. The "up,kickme" + state means that the driver wants to send more commands to the + target but found out there were already the max number of + commands waiting for a response. It will retry again after being + kicked by the periodic timer handler routine. + +What: /sys/block/etherd*/firmware-version +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) Version of the firmware in the target. + +What: /sys/block/etherd*/payload +Date: Dec, 2012 +KernelVersion: v3.10 +Contact: Ed L. Cashin +Description: + (RO) The amount of user data transferred (in bytes) inside each AoE + command on the network, network headers excluded. -- 2.16.1
[PATCH] acpi: nfit: document sysfs interface
This is an attempt to document the nfit sysfs interface. The descriptions have been collected from git commit logs and the ACPI specification 6.2. There are still two undocumented attributes- range_index and ecc_unit_size, for which I couldn't collect complete information. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-bus-nfit | 202 +++ 1 file changed, 202 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-nfit diff --git a/Documentation/ABI/testing/sysfs-bus-nfit b/Documentation/ABI/testing/sysfs-bus-nfit new file mode 100644 index ..758d8d0d4c37 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-nfit @@ -0,0 +1,202 @@ +What: /sys/bus/nd/devices/nmemX/nfit/serial +Date: Apr, 2015 +KernelVersion: v4.1 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Serial number of the NVDIMM (non-volatile dual in-line + memory module), assigned by the module vendor. + + +What: /sys/bus/nd/devices/nmemX/nfit/handle +Date: Apr, 2015 +KernelVersion: v4.1 +Contact: linux-nvd...@lists.01.org +Description: + (RO) The address (given by the _ADR object) of the device on its + parent bus of the NVDIMM device containing the NVDIMM region. + + +What: /sys/bus/nd/devices/nmemX/nfit/device +Date: Apr, 2015 +KernelVersion: v4.1 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Identifier for the NVDIMM, assigned by the module vendor. + + +What: /sys/bus/nd/devices/nmemX/nfit/rev_id +Date: Apr, 2015 +KernelVersion: v4.1 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Revision of the NVDIMM, assigned by the module vendor. + + +What: /sys/bus/nd/devices/nmemX/nfit/phys_id +Date: Apr, 2015 +KernelVersion: v4.1 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Handle (i.e., instance number) for the SMBIOS (system + management BIOS) Memory Device structure describing the NVDIMM + containing the NVDIMM region. + + +What: /sys/bus/nd/devices/nmemX/nfit/flags +Date: Jun, 2015 +KernelVersion: v4.1 +Contact: linux-nvd...@lists.01.org +Description: + (RO) The flags in the NFIT memory device sub-structure indicate + the state of the data on the nvdimm relative to its energy + source or last "flush to persistence". + + The attribute is a translation of the 'NVDIMM State Flags' field + in section 5.2.25.3 'NVDIMM Region Mapping' Structure of the + ACPI specification 6.2. + + The health states are "save_fail", "restore_fail", "flush_fail", + "not_armed", "smart_event", "map_fail" and "smart_notify". + + +What: /sys/bus/nd/devices/nmemX/nfit/format +What: /sys/bus/nd/devices/nmemX/nfit/format1 +What: /sys/bus/nd/devices/nmemX/nfit/formats +Date: Apr, 2016 +KernelVersion: v4.6 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Identifiers for the programming interface. Starting with + ACPI 6.1 an NFIT table reports multiple 'NVDIMM Control Region + Structure' instances per-dimm, one for each supported format + interface. That code is represented in the sysfs as follows: + nmemX/nfit/formats, nmemX/nfit/format, nmemX/nfit/format1, + nmemX/nfit/format2 ... nmemX/nfit/formatN, where format2 - + formatN are theoretical as there are no known DIMMs with support + for more than two interface formats. The 'formats' attribute + displays the number of supported interfaces. + + This layout is compatible with existing libndctl binaries that + only expect one code per-dimm as they will ignore + nmemX/nfit/formats and nmemX/nfit/formatN. + + +What: /sys/bus/nd/devices/nmemX/nfit/vendor +Date: Apr, 2016 +KernelVersion: v4.6 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Identifier indicating the vendor of the NVDIMM. + + +What: /sys/bus/nd/devices/nmemX/nfit/dsm_mask +Date: Apr, 2016 +KernelVersion: v4.6 +Contact: linux-nvd...@lists.01.org +Description: + (RO) The bitmask indicates the supported device specific control + functions. + + +What: /sys/bus/nd/devices/nmemX/nfit/family +Date: Apr, 2016 +KernelVersion: v4.6 +Contact: linux-nvd...@lists.01.org +Description: + (RO) Displays the NVDIMM family (and the command sets). Values + 0, 1, 2 and 3 correspond to NVDIMM_FAMILY_INTEL, +
[PATCH v2] block/loop: add documentation for sysfs interface
Documentation has been compiled from git logs and by reading through code. Signed-off-by: Aishwarya Pant --- For drivers/block/loop.c, I don't see any maintainers or mailing lists except for LKML. I am guessing linux-block mailing list should be okay. Changes in v2: - Add linux-bl...@vger.kernel.org to the recipient list. Documentation/ABI/testing/sysfs-block-loop | 50 ++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-block-loop diff --git a/Documentation/ABI/testing/sysfs-block-loop b/Documentation/ABI/testing/sysfs-block-loop new file mode 100644 index ..627f4eb87286 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block-loop @@ -0,0 +1,50 @@ +What: /sys/block/loopX/loop/autoclear +Date: Aug, 2010 +KernelVersion: v2.6.37 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) Shows if the device is in autoclear mode or not ( "1" or + "0"). Autoclear (if set) indicates that the loopback device will + self-distruct after last close. + +What: /sys/block/loopX/loop/backing_file +Date: Aug, 2010 +KernelVersion: v2.6.37 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) The path of the backing file that the loop device maps its + data blocks to. + +What: /sys/block/loopX/loop/offset +Date: Aug, 2010 +KernelVersion: v2.6.37 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) Start offset (in bytes). + +What: /sys/block/loopX/loop/sizelimit +Date: Aug, 2010 +KernelVersion: v2.6.37 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) The size (in bytes) that the block device maps, starting + from the offset. + +What: /sys/block/loopX/loop/partscan +Date: Aug, 2011 +KernelVersion: v3.10 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) Shows if automatic partition scanning is enabled for the + device or not ("1" or "0"). This can be requested individually + per loop device during its setup by setting LO_FLAGS_PARTSCAN in + in the ioctl request. By default, no partition tables are + scanned. + +What: /sys/block/loopX/loop/dio +Date: Aug, 2015 +KernelVersion: v4.10 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) Shows if direct IO is being used to access backing file or + not ("1 or "0"). -- 2.16.1
[PATCH v2] aoe: document sysfs interface
Documentation has been compiled from git commit logs and descriptions in Documentation/aoe/aoe.txt. This should be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Changes in v2: - interface -> interfaces in description of netif Documentation/ABI/testing/sysfs-block-aoe | 44 +++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-block-aoe diff --git a/Documentation/ABI/testing/sysfs-block-aoe b/Documentation/ABI/testing/sysfs-block-aoe new file mode 100644 index ..6f0795f7f10c --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block-aoe @@ -0,0 +1,44 @@ +What: /sys/block/etherd*/mac +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) The ethernet address of the remote Ata over Ethernet (AoE) + device. + +What: /sys/block/etherd*/netif +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) The name of the network interfaces on the localhost through + which we are communicating with the remote AoE device. + +What: /sys/block/etherd*/state +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) Device status. The state attribute is "up" when the device + is ready for I/O and "down" if detected but unusable. The + "down,closewait" state shows that the device is still open and + cannot come up again until it has been closed. The "up,kickme" + state means that the driver wants to send more commands to the + target but found out there were already the max number of + commands waiting for a response. It will retry again after being + kicked by the periodic timer handler routine. + +What: /sys/block/etherd*/firmware-version +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) Version of the firmware in the target. + +What: /sys/block/etherd*/payload +Date: Dec, 2012 +KernelVersion: v3.10 +Contact: Ed L. Cashin +Description: + (RO) The amount of user data transferred (in bytes) inside each AoE + command on the network, network headers excluded. -- 2.16.1
[PATCH] aoe: document sysfs interface
Documentation has been compiled from git commit logs and descriptions in Documentation/aoe/aoe.txt. This should be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-block-aoe | 44 +++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-block-aoe diff --git a/Documentation/ABI/testing/sysfs-block-aoe b/Documentation/ABI/testing/sysfs-block-aoe new file mode 100644 index ..d197c7770dc0 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block-aoe @@ -0,0 +1,44 @@ +What: /sys/block/etherd*/mac +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) The ethernet address of the remote Ata over Ethernet (AoE) + device. + +What: /sys/block/etherd*/netif +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) The name of the network interface on the localhost through + which we are communicating with the remote AoE device. + +What: /sys/block/etherd*/state +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) Device status. The state attribute is "up" when the device + is ready for I/O and "down" if detected but unusable. The + "down,closewait" state shows that the device is still open and + cannot come up again until it has been closed. The "up,kickme" + state means that the driver wants to send more commands to the + target but found out there were already the max number of + commands waiting for a response. It will retry again after being + kicked by the periodic timer handler routine. + +What: /sys/block/etherd*/firmware-version +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: Ed L. Cashin +Description: + (RO) Version of the firmware in the target. + +What: /sys/block/etherd*/payload +Date: Dec, 2012 +KernelVersion: v3.10 +Contact: Ed L. Cashin +Description: + (RO) The amount of user data transferred (in bytes) inside each AoE + command on the network, network headers excluded. -- 2.16.1
[PATCH] block/loop: add documentation for sysfs interface
Documentation has been compiled from git logs and by reading through code. Signed-off-by: Aishwarya Pant --- For drivers/block/loop.c, I don't see any maintainers or mailing lists except for LKML. Documentation/ABI/testing/sysfs-block-loop | 50 ++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-block-loop diff --git a/Documentation/ABI/testing/sysfs-block-loop b/Documentation/ABI/testing/sysfs-block-loop new file mode 100644 index ..627f4eb87286 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block-loop @@ -0,0 +1,50 @@ +What: /sys/block/loopX/loop/autoclear +Date: Aug, 2010 +KernelVersion: v2.6.37 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) Shows if the device is in autoclear mode or not ( "1" or + "0"). Autoclear (if set) indicates that the loopback device will + self-distruct after last close. + +What: /sys/block/loopX/loop/backing_file +Date: Aug, 2010 +KernelVersion: v2.6.37 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) The path of the backing file that the loop device maps its + data blocks to. + +What: /sys/block/loopX/loop/offset +Date: Aug, 2010 +KernelVersion: v2.6.37 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) Start offset (in bytes). + +What: /sys/block/loopX/loop/sizelimit +Date: Aug, 2010 +KernelVersion: v2.6.37 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) The size (in bytes) that the block device maps, starting + from the offset. + +What: /sys/block/loopX/loop/partscan +Date: Aug, 2011 +KernelVersion: v3.10 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) Shows if automatic partition scanning is enabled for the + device or not ("1" or "0"). This can be requested individually + per loop device during its setup by setting LO_FLAGS_PARTSCAN in + in the ioctl request. By default, no partition tables are + scanned. + +What: /sys/block/loopX/loop/dio +Date: Aug, 2015 +KernelVersion: v4.10 +Contact: linux-bl...@vger.kernel.org +Description: + (RO) Shows if direct IO is being used to access backing file or + not ("1 or "0"). -- 2.16.1
[PATCH] acpi: device_sysfs: update sysfs documentation
Add documentation for two attributes - status and hrv in Documentation/ABI/testing/sysfs-bus-acpi. Compiled from git logs and the ACPI specification. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-bus-acpi | 36 1 file changed, 36 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-acpi b/Documentation/ABI/testing/sysfs-bus-acpi index 7fa9cbc75344..89feb01d1d0d 100644 --- a/Documentation/ABI/testing/sysfs-bus-acpi +++ b/Documentation/ABI/testing/sysfs-bus-acpi @@ -56,3 +56,39 @@ Description: Writing 1 to this attribute will trigger hot removal of this device object. This file exists for every device object that has _EJ0 method. + +What: /sys/bus/acpi/devices/.../status +Date: Jan, 2014 +Contact: Rafael J. Wysocki +Description: + (RO) Displays the ACPI device status - enabled, disabled or + functioning or present, if the method _STA is present. + + Return value is an integer containing a device status bitmap: + + Bit [0] – Set if the device is present. + Bit [1] – Set if the device is enabled and decoding its + resources. + Bit [2] – Set if the device should be shown in the UI. + Bit [3] – Set if the device is functioning properly (cleared if + device failed its diagnostics). + Bit [4] – Set if the battery is present. + Bits [31:5] – Reserved (must be cleared) + + If bit [0] is cleared, then bit 1 must also be cleared (a device + that is not present cannot be enabled). + + Bit 0 can be clear (not present) with bit [3] set (device is + functional). This case is used to indicate a valid device for + which no device driver should be loaded. + + More special cases are covered in the ACPI specification. + +What: /sys/bus/acpi/devices/.../hrv +Date: Apr, 2016 +Contact: Rafael J. Wysocki +Description: + (RO) Allows users to read the hardware version of non-PCI + hardware, if the _HRV control method is present. It is most + useful for non-PCI devices because lspci can list the hardware + version for PCI devices. -- 2.16.1
[PATCH] libata: transport: cleanup documentation of sysfs interface
Clean-up the documentation of sysfs interfaces to be in the same format as described in Documentation/ABI/README. This will be useful for tracking changes in the ABI. Attributes are grouped by function (device, link or port) and then by date added. This patch also adds documentation for one attribute - /sys/class/ata_port/ataX/port_no Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-ata | 171 +--- 1 file changed, 100 insertions(+), 71 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-ata b/Documentation/ABI/testing/sysfs-ata index aa4296498859..9ab0ef1dd1c7 100644 --- a/Documentation/ABI/testing/sysfs-ata +++ b/Documentation/ABI/testing/sysfs-ata @@ -1,110 +1,139 @@ What: /sys/class/ata_... -Date: August 2008 -Contact: Gwendal Grignou Description: - -Provide a place in sysfs for storing the ATA topology of the system. This allows -retrieving various information about ATA objects. + Provide a place in sysfs for storing the ATA topology of the + system. This allows retrieving various information about ATA + objects. Files under /sys/class/ata_port --- - For each port, a directory ataX is created where X is the ata_port_id of - the port. The device parent is the ata host device. +For each port, a directory ataX is created where X is the ata_port_id of the +port. The device parent is the ata host device. -idle_irq (read) - Number of IRQ received by the port while idle [some ata HBA only]. +What: /sys/class/ata_port/ataX/nr_pmp_links +What: /sys/class/ata_port/ataX/idle_irq +Date: May, 2010 +KernelVersion: v2.6.37 +Contact: Gwendal Grignou +Description: + nr_pmp_links: (RO) If a SATA Port Multiplier (PM) is + connected, the number of links behind it. -nr_pmp_links (read) + idle_irq: (RO) Number of IRQ received by the port while + idle [some ata HBA only]. - If a SATA Port Multiplier (PM) is connected, number of link behind it. + +What: /sys/class/ata_port/ataX/port_no +Date: May, 2013 +KernelVersion: v3.11 +Contact: Gwendal Grignou +Description: + (RO) Host local port number. While registering host controller, + port numbers are tracked based upon number of ports available on + the controller. This attribute is needed by udev for composing + persistent links in /dev/disk/by-path. Files under /sys/class/ata_link --- - Behind each port, there is a ata_link. If there is a SATA PM in the - topology, 15 ata_link objects are created. - - If a link is behind a port, the directory name is linkX, where X is - ata_port_id of the port. - If a link is behind a PM, its name is linkX.Y where X is ata_port_id - of the parent port and Y the PM port. +Behind each port, there is a ata_link. If there is a SATA PM in the topology, 15 +ata_link objects are created. -hw_sata_spd_limit +If a link is behind a port, the directory name is linkX, where X is ata_port_id +of the port. If a link is behind a PM, its name is linkX.Y where X is +ata_port_id of the parent port and Y the PM port. - Maximum speed supported by the connected SATA device. -sata_spd_limit +What: /sys/class/ata_link/linkX[.Y]/hw_sata_spd_limit +What: /sys/class/ata_link/linkX[.Y]/sata_spd_limit +What: /sys/class/ata_link/linkX[.Y]/sata_spd +Date: May, 2010 +KernelVersion: v2.6.37 +Contact: Gwendal Grignou +Description: + hw_sata_spd_limit: (RO) Maximum speed supported by the + connected SATA device. - Maximum speed imposed by libata. + sata_spd_limit: (RO) Maximum speed imposed by libata. -sata_spd + sata_spd: (RO) Current speed of the link + eg. 1.5, 3 Gbps etc. - Current speed of the link [1.5, 3Gps,...]. Files under /sys/class/ata_device - - Behind each link, up to two ata device are created. - The name of the directory is devX[.Y].Z where: - - X is ata_port_id of the port where the device is connected, - - Y the port of the PM if any, and - - Z the device id: for PATA, there is usually 2 devices [0,1], - only 1 for SATA. - -class - Device class. Can be "ata" for disk, "atapi" for packet device, - "pmp" for PM, or "none" if no device was found behind the link. - -dma_mode +Behind each link, up to two ata devices are created. +The name of the directory is devX[.Y].Z where: +- X is ata_port_id of the port where the device is connected, +- Y the port of th
[PATCH] libata: update documentation for sysfs interfaces
Dcoumentation has been added by parsing through git commit history and reading code. This might be useful for scripting and tracking changes in the ABI. I do not have complete descriptions for the following 3 attributes; they have been annotated with the comment [to be documented] - /sys/class/scsi_host/hostX/ahci_port_cmd /sys/class/scsi_host/hostX/ahci_host_caps /sys/class/scsi_host/hostX/ahci_host_cap2 Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-block-device| 58 Documentation/ABI/testing/sysfs-class-scsi_host | 89 + 2 files changed, 147 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-block-device diff --git a/Documentation/ABI/testing/sysfs-block-device b/Documentation/ABI/testing/sysfs-block-device new file mode 100644 index ..82ef6eab042d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-block-device @@ -0,0 +1,58 @@ +What: /sys/block/*/device/sw_activity +Date: Jun, 2008 +KernelVersion: v2.6.27 +Contact: linux-...@vger.kernel.org +Description: + (RW) Used by drivers which support software controlled activity + LEDs. + + It has the following valid values: + + 0 OFF - the LED is not activated on activity + 1 BLINK_ON - the LED blinks on every 10ms when activity is + detected. + 2 BLINK_OFF - the LED is on when idle, and blinks off + every 10ms when activity is detected. + + Note that the user must turn sw_activity OFF it they wish to + control the activity LED via the em_message file. + + +What: /sys/block/*/device/unload_heads +Date: Sep, 2008 +KernelVersion: v2.6.28 +Contact: linux-...@vger.kernel.org +Description: + (RW) Hard disk shock protection + + Writing an integer value to this file will take the heads of the + respective drive off the platter and block all I/O operations + for the specified number of milliseconds. + + - If the device does not support the unload heads feature, + access is denied with -EOPNOTSUPP. + - The maximal value accepted for a timeout is 3 + milliseconds. + - A previously set timeout can be cancelled and disk can resume + normal operation immediately by specifying a timeout of 0. + - Some hard drives only comply with an earlier version of the + ATA standard, but support the unload feature nonetheless. + There is no safe way Linux can detect these devices, so this + is not enabled by default. If it is known that your device + does support the unload feature, then you can tell the kernel + to enable it by writing -1. It can be disabled again by + writing -2. + - Values below -2 are rejected with -EINVAL + + For more information, see + Documentation/laptops/disk-shock-protection.txt + + +What: /sys/block/*/device/ncq_prio_enable +Date: Oct, 2016 +KernelVersion: v4.10 +Contact: linux-...@vger.kernel.org +Description: + (RW) Write to the file to turn on or off the SATA ncq (native + command queueing) support. By default this feature is turned + off. diff --git a/Documentation/ABI/testing/sysfs-class-scsi_host b/Documentation/ABI/testing/sysfs-class-scsi_host index 0eb255e7db12..bafc59fd7b69 100644 --- a/Documentation/ABI/testing/sysfs-class-scsi_host +++ b/Documentation/ABI/testing/sysfs-class-scsi_host @@ -27,3 +27,92 @@ Description: This file contains the current status of the "SSD Smart Path" the direct i/o path to physical devices. This setting is controller wide, affecting all configured logical drives on the controller. This file is readable and writable. + +What: /sys/class/scsi_host/hostX/link_power_management_policy +Date: Oct, 2007 +KernelVersion: v2.6.24 +Contact: linux-...@vger.kernel.org +Description: + (RW) This parameter allows the user to read and set the link + (interface) power management. + + There are four possible options: + + min_power: Tell the controller to try to make the link use the + least possible power when possible. This may sacrifice some + performance due to increased latency when coming out of lower + power states. + + max_performance: Generally, this means no power management. + Tell the controller to have performance be a priority over power + management. + + medium_power: Tell the controller
[PATCH v2 2/2] acpi/dock: document sysfs interface
Description has been collected from git commit history and reading through code. Signed-off-by: Aishwarya Pant --- Changes in v2: - Split up attribute definitions .../ABI/testing/sysfs-devices-platform-dock| 39 ++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-dock diff --git a/Documentation/ABI/testing/sysfs-devices-platform-dock b/Documentation/ABI/testing/sysfs-devices-platform-dock new file mode 100644 index ..1d8c18f905c7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-platform-dock @@ -0,0 +1,39 @@ +What: /sys/devices/platform/dock.N/docked +Date: Dec, 2006 +KernelVersion: 2.6.19 +Contact: linux-a...@vger.kernel.org +Description: + (RO) Value 1 or 0 indicates whether the software believes the + laptop is docked in a docking station. + +What: /sys/devices/platform/dock.N/undock +Date: Dec, 2006 +KernelVersion: 2.6.19 +Contact: linux-a...@vger.kernel.org +Description: + (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: linux-a...@vger.kernel.org +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: linux-a...@vger.kernel.org +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: linux-a...@vger.kernel.org +Description: + (RO) Display the dock station type- dock_station, ata_bay or + battery_bay. -- 2.16.1
[PATCH v2 1/2] acpi/dptf: document sysfs atttributes
The descriptions have been collected from git commit logs and reading through code. Signed-off-by: Aishwarya Pant --- Changes in v2: - Split up attribute definitions Documentation/ABI/testing/sysfs-platform-dptf | 40 +++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf diff --git a/Documentation/ABI/testing/sysfs-platform-dptf b/Documentation/ABI/testing/sysfs-platform-dptf new file mode 100644 index ..325dc0667dbb --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-dptf @@ -0,0 +1,40 @@ +What: /sys/bus/platform/devices/INT3407:00/dptf_power/charger_type +Date: Jul, 2016 +KernelVersion: v4.10 +Contact: linux-a...@vger.kernel.org +Description: + (RO) The charger type - Traditional, Hybrid or NVDC. + +What: /sys/bus/platform/devices/INT3407:00/dptf_power/adapter_rating_mw +Date: Jul, 2016 +KernelVersion: v4.10 +Contact: linux-a...@vger.kernel.org +Description: + (RO) Adapter rating in milliwatts (the maximum Adapter power). + Must be 0 if no AC Adaptor is plugged in. + +What: /sys/bus/platform/devices/INT3407:00/dptf_power/max_platform_power_mw +Date: Jul, 2016 +KernelVersion: v4.10 +Contact: linux-a...@vger.kernel.org +Description: + (RO) Maximum platform power that can be supported by the battery + in milliwatts. + +What: /sys/bus/platform/devices/INT3407:00/dptf_power/platform_power_source +Date: Jul, 2016 +KernelVersion: v4.10 +Contact: linux-a...@vger.kernel.org +Description: + (RO) Display the platform power source + 0x00 = DC + 0x01 = AC + 0x02 = USB + 0x03 = Wireless Charger + +What: /sys/bus/platform/devices/INT3407:00/dptf_power/battery_steady_power +Date: Jul, 2016 +KernelVersion: v4.10 +Contact: linux-a...@vger.kernel.org +Description: + (RO) The maximum sustained power for battery in milliwatts. -- 2.16.1
[PATCH v2 0/2] 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. Changes in v2: - Split up multiple attribute definitions Aishwarya Pant (2): acpi/dptf: document sysfs atttributes acpi/dock: document sysfs interface .../ABI/testing/sysfs-devices-platform-dock| 39 + Documentation/ABI/testing/sysfs-platform-dptf | 40 ++ 2 files changed, 79 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-dock create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf -- 2.16.1
[PATCH v5] Documentation/ABI: update infiniband sysfs interfaces
Add documentation for core and hardware specific infiniband interfaces. The descriptions have been collected from git commit logs, reading through code and data sheets. Some drivers have incomplete doc and are annotated with the comment '[to be documented]'. Signed-off-by: Aishwarya Pant Reviewed-by: Hal Rosenstock --- Sorry, there were no changes in v4! Changes in v5: - Typo GODs -> GIDs v3: - outbound -> inbound in description of port_rcv_constraint_errors v2: - Move infiniband interface from testing to stable - Fix typos - Update description of cap_mask, port_xmit_constraint_errors and port_rcv_constraint_errors - Add doc for hw_counters - Remove old documentation Documentation/ABI/stable/sysfs-class-infiniband | 818 +++ Documentation/ABI/testing/sysfs-class-infiniband | 16 - Documentation/infiniband/sysfs.txt | 129 +--- 3 files changed, 820 insertions(+), 143 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-class-infiniband delete mode 100644 Documentation/ABI/testing/sysfs-class-infiniband diff --git a/Documentation/ABI/stable/sysfs-class-infiniband b/Documentation/ABI/stable/sysfs-class-infiniband new file mode 100644 index ..17211ceb9bf4 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-class-infiniband @@ -0,0 +1,818 @@ +sysfs interface common for all infiniband devices +- + +What: /sys/class/infiniband//node_type +What: /sys/class/infiniband//node_guid +What: /sys/class/infiniband//sys_image_guid +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + node_type: (RO) Node type (CA, RNIC, usNIC, usNIC UDP, + switch or router) + + node_guid: (RO) Node GUID + + sys_image_guid: (RO) System image GUID + + +What: /sys/class/infiniband//node_desc +Date: Feb, 2006 +KernelVersion: v2.6.17 +Contact: linux-r...@vger.kernel.org +Description: + (RW) Update the node description with information such as the + node's hostname, so that IB network management software can tie + its view to the real world. + + +What: /sys/class/infiniband//fw_ver +Date: Jun, 2016 +KernelVersion: v4.10 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Display firmware version + + +What: /sys/class/infiniband//ports//lid +What: /sys/class/infiniband//ports//rate +What: /sys/class/infiniband//ports//lid_mask_count +What: /sys/class/infiniband//ports//sm_sl +What: /sys/class/infiniband//ports//sm_lid +What: /sys/class/infiniband//ports//state +What: /sys/class/infiniband//ports//phys_state +What: /sys/class/infiniband//ports//cap_mask +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + + lid:(RO) Port LID + + rate: (RO) Port data rate (active width * active + speed) + + lid_mask_count: (RO) Port LID mask count + + sm_sl: (RO) Subnet manager SL for port's subnet + + sm_lid: (RO) Subnet manager LID for port's subnet + + state: (RO) Port state (DOWN, INIT, ARMED, ACTIVE or + ACTIVE_DEFER) + + phys_state: (RO) Port physical state (Sleep, Polling, + LinkUp, etc) + + cap_mask: (RO) Port capability mask. 2 bits here are + settable- IsCommunicationManagementSupported + (set when CM module is loaded) and IsSM (set via + open of issmN file). + + +What: /sys/class/infiniband//ports//link_layer +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Link layer type information (Infiniband or Ethernet type) + + +What: /sys/class/infiniband//ports//counters/symbol_error +What: /sys/class/infiniband//ports//counters/port_rcv_errors +What: /sys/class/infiniband//ports//counters/port_rcv_remote_physical_errors +What: /sys/class/infiniband//ports//counters/port_rcv_switch_relay_errors +What: /sys/class/infiniband//ports//counters/link_error_recovery +What: /sys/class/infiniband//ports//counters/port_xmit_constraint_errors +What: /sys/class/infiniband//ports//counters/port_rcv_contraint_errors +What: /sys/class/infiniband//ports//counters/local_link_integrity_errors +What: /sys/class/infiniband//ports//counters/excessive_buffer_overrun_errors +What: /sys/class/infiniband//ports
[PATCH v4] Documentation/ABI: update infiniband sysfs interfaces
Add documentation for core and hardware specific infiniband interfaces. The descriptions have been collected from git commit logs, reading through code and data sheets. Some drivers have incomplete doc and are annotated with the comment '[to be documented]'. Signed-off-by: Aishwarya Pant Reviewed-by: Hal Rosenstock --- Changes in v4: - Typo GODs -> GIDs v3: - outbound -> inbound in description of port_rcv_constraint_errors v2: - Move infiniband interface from testing to stable - Fix typos - Update description of cap_mask, port_xmit_constraint_errors and port_rcv_constraint_errors - Add doc for hw_counters - Remove old documentation Documentation/ABI/stable/sysfs-class-infiniband | 818 +++ Documentation/ABI/testing/sysfs-class-infiniband | 16 - Documentation/infiniband/sysfs.txt | 129 +--- 3 files changed, 820 insertions(+), 143 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-class-infiniband delete mode 100644 Documentation/ABI/testing/sysfs-class-infiniband diff --git a/Documentation/ABI/stable/sysfs-class-infiniband b/Documentation/ABI/stable/sysfs-class-infiniband new file mode 100644 index ..f3acf3713a91 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-class-infiniband @@ -0,0 +1,818 @@ +sysfs interface common for all infiniband devices +- + +What: /sys/class/infiniband//node_type +What: /sys/class/infiniband//node_guid +What: /sys/class/infiniband//sys_image_guid +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + node_type: (RO) Node type (CA, RNIC, usNIC, usNIC UDP, + switch or router) + + node_guid: (RO) Node GUID + + sys_image_guid: (RO) System image GUID + + +What: /sys/class/infiniband//node_desc +Date: Feb, 2006 +KernelVersion: v2.6.17 +Contact: linux-r...@vger.kernel.org +Description: + (RW) Update the node description with information such as the + node's hostname, so that IB network management software can tie + its view to the real world. + + +What: /sys/class/infiniband//fw_ver +Date: Jun, 2016 +KernelVersion: v4.10 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Display firmware version + + +What: /sys/class/infiniband//ports//lid +What: /sys/class/infiniband//ports//rate +What: /sys/class/infiniband//ports//lid_mask_count +What: /sys/class/infiniband//ports//sm_sl +What: /sys/class/infiniband//ports//sm_lid +What: /sys/class/infiniband//ports//state +What: /sys/class/infiniband//ports//phys_state +What: /sys/class/infiniband//ports//cap_mask +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + + lid:(RO) Port LID + + rate: (RO) Port data rate (active width * active + speed) + + lid_mask_count: (RO) Port LID mask count + + sm_sl: (RO) Subnet manager SL for port's subnet + + sm_lid: (RO) Subnet manager LID for port's subnet + + state: (RO) Port state (DOWN, INIT, ARMED, ACTIVE or + ACTIVE_DEFER) + + phys_state: (RO) Port physical state (Sleep, Polling, + LinkUp, etc) + + cap_mask: (RO) Port capability mask. 2 bits here are + settable- IsCommunicationManagementSupported + (set when CM module is loaded) and IsSM (set via + open of issmN file). + + +What: /sys/class/infiniband//ports//link_layer +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Link layer type information (Infiniband or Ethernet type) + + +What: /sys/class/infiniband//ports//counters/symbol_error +What: /sys/class/infiniband//ports//counters/port_rcv_errors +What: /sys/class/infiniband//ports//counters/port_rcv_remote_physical_errors +What: /sys/class/infiniband//ports//counters/port_rcv_switch_relay_errors +What: /sys/class/infiniband//ports//counters/link_error_recovery +What: /sys/class/infiniband//ports//counters/port_xmit_constraint_errors +What: /sys/class/infiniband//ports//counters/port_rcv_contraint_errors +What: /sys/class/infiniband//ports//counters/local_link_integrity_errors +What: /sys/class/infiniband//ports//counters/excessive_buffer_overrun_errors +What: /sys/class/infiniband//ports//counters/port_xmit_data +What:
Re: [PATCH 1/2] acpi/dptf: document sysfs atttributes
On Fri, Feb 09, 2018 at 11:31:35AM +0100, Rafael J. Wysocki wrote: > On Wed, Feb 7, 2018 at 2:18 PM, Aishwarya Pant wrote: > > The descriptions have been collected from git commit logs and reading > > through code. > > > > Signed-off-by: Aishwarya Pant > > --- > > Documentation/ABI/testing/sysfs-platform-dptf | 30 > > +++ > > 1 file changed, 30 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf > > > > diff --git a/Documentation/ABI/testing/sysfs-platform-dptf > > b/Documentation/ABI/testing/sysfs-platform-dptf > > new file mode 100644 > > index ..e8168e5198d7 > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-platform-dptf > > @@ -0,0 +1,30 @@ > > +sysfs interface for ACPI DPTF platform power driver > > +--- > > The header isn't necessary. > > > + > > +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 > > Also I need Srinivas to tell me whether or not the descriptions are > accurate enough. > > > +Date: Jul, 2016 > > +KernelVersion: v4.10 > > +Contact: linux-a...@vger.kernel.org > > +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. > > --
[PATCH v5] Documentation/ABI: update cpuidle sysfs documentation
Update cpuidle documentation using git logs and existing documentation in Documentation/cpuidle/sysfs.txt. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Changes in v5: - Update contact information- LKML -> power management mailing list v4: - Fix patch formatting v3: - Fix subject line v2: - Merge cpuidle_sysfs_switch attributes' description with the previous entry. Documentation/ABI/testing/sysfs-devices-system-cpu | 77 +- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index bfd29bc8d37a..4ed63b6cfb15 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -108,6 +108,8 @@ Description:CPU topology files that describe a logical CPU's relationship What: /sys/devices/system/cpu/cpuidle/current_driver /sys/devices/system/cpu/cpuidle/current_governer_ro + /sys/devices/system/cpu/cpuidle/available_governors + /sys/devices/system/cpu/cpuidle/current_governor Date: September 2007 Contact: Linux kernel mailing list Description: Discover cpuidle policy and mechanism @@ -119,13 +121,84 @@ Description: Discover cpuidle policy and mechanism Idle policy (governor) is differentiated from idle mechanism (driver) - current_driver: displays current idle mechanism + current_driver: (RO) displays current idle mechanism - current_governor_ro: displays current idle policy + current_governor_ro: (RO) displays current idle policy + + With the cpuidle_sysfs_switch boot option enabled (meant for + developer testing), the following three attributes are visible + instead: + + current_driver: same as described above + + available_governors: (RO) displays a space separated list of + available governors + + current_governor: (RW) displays current idle policy. Users can + switch the governor at runtime by writing to this file. See files in Documentation/cpuidle/ for more information. +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name + /sys/devices/system/cpu/cpuX/cpuidle/stateN/latency + /sys/devices/system/cpu/cpuX/cpuidle/stateN/power + /sys/devices/system/cpu/cpuX/cpuidle/stateN/time + /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage +Date: September 2007 +KernelVersion: v2.6.24 +Contact: Linux power management list +Description: + The directory /sys/devices/system/cpu/cpuX/cpuidle contains per + logical CPU specific cpuidle information for each online cpu X. + The processor idle states which are available for use have the + following attributes: + + name: (RO) Name of the idle state (string). + + latency: (RO) The latency to exit out of this idle state (in + microseconds). + + power: (RO) The power consumed while in this idle state (in + milliwatts). + + time: (RO) The total time spent in this idle state (in microseconds). + + usage: (RO) Number of times this state was entered (a count). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc +Date: February 2008 +KernelVersion: v2.6.25 +Contact: Linux power management list +Description: + (RO) A small description about the idle state (string). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable +Date: March 2012 +KernelVersion: v3.10 +Contact: Linux power management list +Description: + (RW) Option to disable this idle state (bool). The behavior and + the effect of the disable variable depends on the implementation + of a particular governor. In the ladder governor, for example, + it is not coherent, i.e. if one is disabling a light state, then + all deeper states are disabled as well, but the disable variable + does not reflect it. Likewise, if one enables a deep state but a + lighter state still is disabled, then this has no effect. + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency +Date: March 2014 +KernelVersion: v3.15 +Contact: Linux power management list +Description: + (RO) Display the target residency i.e. the minimum amount of + time (in microseconds) this cpu should spend in this idle state + to make the transition worth the effort. + + What: /sys/devices/system/cpu/cpu#/cp
[PATCH v1 2/2] acpi/dock: document sysfs interface
Description has been collected from git commit history and reading through code. Signed-off-by: Aishwarya Pant --- .../ABI/testing/sysfs-devices-platform-dock| 38 ++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-devices-platform-dock diff --git a/Documentation/ABI/testing/sysfs-devices-platform-dock b/Documentation/ABI/testing/sysfs-devices-platform-dock new file mode 100644 index ..0bb0d42e9126 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-devices-platform-dock @@ -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: linux-a...@vger.kernel.org +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: linux-a...@vger.kernel.org +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: linux-a...@vger.kernel.org +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: linux-a...@vger.kernel.org +Description: + (RO) Display the dock station type- dock_station, ata_bay or + battery_bay. -- 2.16.1
[PATCH 1/2] acpi/dptf: document sysfs atttributes
The descriptions have been collected from git commit logs and reading through code. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-platform-dptf | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-platform-dptf diff --git a/Documentation/ABI/testing/sysfs-platform-dptf b/Documentation/ABI/testing/sysfs-platform-dptf new file mode 100644 index ..e8168e5198d7 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-dptf @@ -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: linux-a...@vger.kernel.org +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. -- 2.16.1
[PATCH 0/2] 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 -- 2.16.1
[PATCH v3] Documentation/ABI: update infiniband sysfs interfaces
Add documentation for core and hardware specific infiniband interfaces. The descriptions have been collected from git commit logs, reading through code and data sheets. Some drivers have incomplete doc and are annotated with the comment '[to be documented]'. Signed-off-by: Aishwarya Pant --- Changes in v3: - outbound -> inbound in description of port_rcv_constraint_errors v2: - Move infiniband interface from testing to stable - Fix typos - Update description of cap_mask, port_xmit_constraint_errors and port_rcv_constraint_errors - Add doc for hw_counters - Remove old documentation Documentation/ABI/stable/sysfs-class-infiniband | 818 +++ Documentation/ABI/testing/sysfs-class-infiniband | 16 - Documentation/infiniband/sysfs.txt | 129 +--- 3 files changed, 820 insertions(+), 143 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-class-infiniband delete mode 100644 Documentation/ABI/testing/sysfs-class-infiniband diff --git a/Documentation/ABI/stable/sysfs-class-infiniband b/Documentation/ABI/stable/sysfs-class-infiniband new file mode 100644 index ..f3acf3713a91 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-class-infiniband @@ -0,0 +1,818 @@ +sysfs interface common for all infiniband devices +- + +What: /sys/class/infiniband//node_type +What: /sys/class/infiniband//node_guid +What: /sys/class/infiniband//sys_image_guid +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + node_type: (RO) Node type (CA, RNIC, usNIC, usNIC UDP, + switch or router) + + node_guid: (RO) Node GUID + + sys_image_guid: (RO) System image GUID + + +What: /sys/class/infiniband//node_desc +Date: Feb, 2006 +KernelVersion: v2.6.17 +Contact: linux-r...@vger.kernel.org +Description: + (RW) Update the node description with information such as the + node's hostname, so that IB network management software can tie + its view to the real world. + + +What: /sys/class/infiniband//fw_ver +Date: Jun, 2016 +KernelVersion: v4.10 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Display firmware version + + +What: /sys/class/infiniband//ports//lid +What: /sys/class/infiniband//ports//rate +What: /sys/class/infiniband//ports//lid_mask_count +What: /sys/class/infiniband//ports//sm_sl +What: /sys/class/infiniband//ports//sm_lid +What: /sys/class/infiniband//ports//state +What: /sys/class/infiniband//ports//phys_state +What: /sys/class/infiniband//ports//cap_mask +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + + lid:(RO) Port LID + + rate: (RO) Port data rate (active width * active + speed) + + lid_mask_count: (RO) Port LID mask count + + sm_sl: (RO) Subnet manager SL for port's subnet + + sm_lid: (RO) Subnet manager LID for port's subnet + + state: (RO) Port state (DOWN, INIT, ARMED, ACTIVE or + ACTIVE_DEFER) + + phys_state: (RO) Port physical state (Sleep, Polling, + LinkUp, etc) + + cap_mask: (RO) Port capability mask. 2 bits here are + settable- IsCommunicationManagementSupported + (set when CM module is loaded) and IsSM (set via + open of issmN file). + + +What: /sys/class/infiniband//ports//link_layer +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Link layer type information (Infiniband or Ethernet type) + + +What: /sys/class/infiniband//ports//counters/symbol_error +What: /sys/class/infiniband//ports//counters/port_rcv_errors +What: /sys/class/infiniband//ports//counters/port_rcv_remote_physical_errors +What: /sys/class/infiniband//ports//counters/port_rcv_switch_relay_errors +What: /sys/class/infiniband//ports//counters/link_error_recovery +What: /sys/class/infiniband//ports//counters/port_xmit_constraint_errors +What: /sys/class/infiniband//ports//counters/port_rcv_contraint_errors +What: /sys/class/infiniband//ports//counters/local_link_integrity_errors +What: /sys/class/infiniband//ports//counters/excessive_buffer_overrun_errors +What: /sys/class/infiniband//ports//counters/port_xmit_data +What: /sys/class/infiniband//ports//counters/port_rcv_data
[PATCH v2] Documentation/ABI: add sysfs interface for s6e63m0 lcd driver
Document sysfs attributes of s6e63m0 lcd panel driver by looking through git logs and reading code. Signed-off-by: Aishwarya Pant --- Changes in v2: - Update contact information Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 | 27 +++ 1 file changed, 27 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 diff --git a/Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 b/Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 new file mode 100644 index ..ae0a2d3dcc07 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 @@ -0,0 +1,27 @@ +sysfs interface for the S6E63M0 AMOLED LCD panel driver +--- + +What: /sys/class/lcd//gamma_mode +Date: May, 2010 +KernelVersion: v2.6.35 +Contact: dri-de...@lists.freedesktop.org +Description: + (RW) Read or write the gamma mode. Following three modes are + supported: + 0 - gamma value 2.2, + 1 - gamma value 1.9 and + 2 - gamma value 1.7. + + +What: /sys/class/lcd//gamma_table +Date: May, 2010 +KernelVersion: v2.6.35 +Contact: dri-de...@lists.freedesktop.org +Description: + (RO) Displays the size of the gamma table i.e. the number of + gamma modes available. + +This is a backlight lcd driver. These interfaces are an extension to the API +documented in Documentation/ABI/testing/sysfs-class-lcd and in +Documentation/ABI/stable/sysfs-class-backlight (under +/sys/class/backlight//). -- 2.16.1
[PATCH v4] Documentation/ABI: update cpuidle sysfs documentation
Update cpuidle documentation using git logs and existing documentation in Documentation/cpuidle/sysfs.txt. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Changes in v4: - Fix patch formatting v3: - Fix subject line v2: - Merge cpuidle_sysfs_switch attributes' description with the previous entry. Documentation/ABI/testing/sysfs-devices-system-cpu | 77 +- 1 file changed, 75 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index bfd29bc8d37a..e9ee67f80933 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -108,6 +108,8 @@ Description:CPU topology files that describe a logical CPU's relationship What: /sys/devices/system/cpu/cpuidle/current_driver /sys/devices/system/cpu/cpuidle/current_governer_ro + /sys/devices/system/cpu/cpuidle/available_governors + /sys/devices/system/cpu/cpuidle/current_governor Date: September 2007 Contact: Linux kernel mailing list Description: Discover cpuidle policy and mechanism @@ -119,13 +121,84 @@ Description: Discover cpuidle policy and mechanism Idle policy (governor) is differentiated from idle mechanism (driver) - current_driver: displays current idle mechanism + current_driver: (RO) displays current idle mechanism - current_governor_ro: displays current idle policy + current_governor_ro: (RO) displays current idle policy + + With the cpuidle_sysfs_switch boot option enabled (meant for + developer testing), the following three attributes are visible + instead: + + current_driver: same as described above + + available_governors: (RO) displays a space separated list of + available governors + + current_governor: (RW) displays current idle policy. Users can + switch the governor at runtime by writing to this file. See files in Documentation/cpuidle/ for more information. +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name + /sys/devices/system/cpu/cpuX/cpuidle/stateN/latency + /sys/devices/system/cpu/cpuX/cpuidle/stateN/power + /sys/devices/system/cpu/cpuX/cpuidle/stateN/time + /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage +Date: September 2007 +KernelVersion: v2.6.24 +Contact: Linux kernel mailing list +Description: + The directory /sys/devices/system/cpu/cpuX/cpuidle contains per + logical CPU specific cpuidle information for each online cpu X. + The processor idle states which are available for use have the + following attributes: + + name: (RO) Name of the idle state (string). + + latency: (RO) The latency to exit out of this idle state (in + microseconds). + + power: (RO) The power consumed while in this idle state (in + milliwatts). + + time: (RO) The total time spent in this idle state (in microseconds). + + usage: (RO) Number of times this state was entered (a count). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc +Date: February 2008 +KernelVersion: v2.6.25 +Contact: Linux kernel mailing list +Description: + (RO) A small description about the idle state (string). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable +Date: March 2012 +KernelVersion: v3.10 +Contact: Linux kernel mailing list +Description: + (RW) Option to disable this idle state (bool). The behavior and + the effect of the disable variable depends on the implementation + of a particular governor. In the ladder governor, for example, + it is not coherent, i.e. if one is disabling a light state, then + all deeper states are disabled as well, but the disable variable + does not reflect it. Likewise, if one enables a deep state but a + lighter state still is disabled, then this has no effect. + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency +Date: March 2014 +KernelVersion: v3.15 +Contact: Linux kernel mailing list +Description: + (RO) Display the target residency i.e. the minimum amount of + time (in microseconds) this cpu should spend in this idle state + to make the transition worth the effort. + + What: /sys/devices/system/cpu/cpu#/cpufreq/* Date: pre-git history Contact: linux...@vger.kernel.org -- 2.16.1
[PATCH v2 3/3] backlight: adp8860: document sysfs attributes
Add documentation for sysfs interface of adp8860 series backlight devices by reading through code and git commits. Signed-off-by: Aishwarya Pant Acked-by: Michael Hennerich --- .../ABI/testing/sysfs-class-backlight-adp8860 | 54 ++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860 diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp8860 b/Documentation/ABI/testing/sysfs-class-backlight-adp8860 new file mode 100644 index ..54d61c788b1b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp8860 @@ -0,0 +1,54 @@ +sysfs interface for analog devices adp8860 backlight driver +--- + +The backlight brightness control operates at three different levels for the +adp8860, adp8861 and adp8863 devices: daylight (level 1), office (level 2) and +dark (level 3). By default the brightness operates at the daylight brightness +level. + +What: /sys/class/backlight//ambient_light_level +Date: Apr, 2010 +KernelVersion: v2.6.35 +Contact: Michael Hennerich +Description: + (RO) 13-bit conversion value for the first light sensor—high + byte (Bit 12 to Bit 8). The value is updated every 80 ms (when + the light sensor is enabled). + + +What: /sys/class/backlight//ambient_light_zone +Date: Apr, 2010 +KernelVersion: v2.6.35 +Contact: Michael Hennerich +Description: + (RW) Read or write the specific level at which the backlight + operates. Value "0" enables automatic ambient light sensing, and + values "1", "2" or "3" set the control to daylight, office or + dark respectively. + + +What: /sys/class/backlight//l1_daylight_max +What: /sys/class/backlight//l2_office_max +What: /sys/class/backlight//l3_dark_max +Date: Apr, 2010 +KernelVersion: v2.6.35 +Contact: Michael Hennerich +Description: + (RW) Maximum current setting for the backlight when brightness + is at one of the three levels (daylight, office or dark). This + is an input code between 0 and 127, which is transformed to a + value between 0 mA and 30 mA using linear or non-linear + algorithms. + + +What: /sys/class/backlight//l1_daylight_dim +What: /sys/class/backlight//l2_office_dim +What: /sys/class/backlight//l3_dark_dim +Date: Apr, 2010 +KernelVersion: v2.6.35 +Contact: Michael Hennerich +Description: + (RW) Dim current setting for the backlight when brightness is at + one of the three levels (daylight, office or dark). This is an + input code between 0 and 127, which is transformed to a value + between 0 mA and 30 mA using linear or non-linear algorithms. -- 2.16.1
[PATCH v2 2/3] backlight: adp5520: document sysfs attributes
Add documentation for sysfs interface of adp5520/adp5501 analog devices backlight driver by reading code and looking through git commit logs. Signed-off-by: Aishwarya Pant Acked-by: Michael Hennerich --- .../ABI/testing/sysfs-class-backlight-adp5520 | 31 ++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520 diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp5520 b/Documentation/ABI/testing/sysfs-class-backlight-adp5520 new file mode 100644 index ..34b6ebafa210 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp5520 @@ -0,0 +1,31 @@ +sysfs interface for analog devices adp5520(01) backlight driver +--- + +The backlight brightness control operates at three different levels for the +adp5520 and adp5501 devices: daylight (level 1), office (level 2) and dark +(level 3). By default the brightness operates at the daylight brightness level. + +What: /sys/class/backlight//daylight_max +What: /sys/class/backlight//office_max +What: /sys/class/backlight//dark_max +Date: Sep, 2009 +KernelVersion: v2.6.32 +Contact: Michael Hennerich +Description: + (RW) Maximum current setting for the backlight when brightness + is at one of the three levels (daylight, office or dark). This + is an input code between 0 and 127, which is transformed to a + value between 0 mA and 30 mA using linear or non-linear + algorithms. + +What: /sys/class/backlight//daylight_dim +What: /sys/class/backlight//office_dim +What: /sys/class/backlight//dark_dim +Date: Sep, 2009 +KernelVersion: v2.6.32 +Contact: Michael Hennerich +Description: + (RW) Dim current setting for the backlight when brightness is at + one of the three levels (daylight, office or dark). This is an + input code between 0 and 127, which is transformed to a value + between 0 mA and 30 mA using linear or non-linear algorithms. -- 2.16.1
[PATCH v2 1/3] backlight: lm3639: document sysfs attributes
Add documentation for sysfs interfaces of Texas Instruments lm3639 backlight + flash led driver chip by looking through git commits and reading code. Signed-off-by: Aishwarya Pant Acked-by: Daniel Thompson --- Changes in v2: - Update contact information Documentation/ABI/testing/sysfs-class-backlight-lm3639 | 11 +++ 1 file changed, 11 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639 diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lm3639 b/Documentation/ABI/testing/sysfs-class-backlight-lm3639 new file mode 100644 index ..f7e92a82ea25 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-backlight-lm3639 @@ -0,0 +1,11 @@ +sysfs interface for Texas Instruments lm3639 backlight + flash led driver chip +-- + +What: /sys/class/backlight//bled_mode +Date: Oct, 2012 +KernelVersion: v3.10 +Contact: dri-de...@lists.freedesktop.org +Description: + (WO) Write to the backlight mapping mode. The backlight current + can be mapped for either exponential (value "0") or linear + mapping modes (default). -- 2.16.1
[PATCH v2 0/3] backlight: document sysfs interfaces
Patchset contains documentation of the sysfs interfaces for the following five backlight drivers- 1) lm3639 2) adp5520 3) adp8860 It was compiled from data sheets, reading code and git history logs. In v2 of the patches, documentation for lp8788 and lp855x devices was dropped as the attributes contained debug information. Aishwarya Pant (3): backlight: lm3639: document sysfs attributes backlight: adp5520: document sysfs attributes backlight: adp8860: document sysfs attributes .../ABI/testing/sysfs-class-backlight-adp5520 | 31 + .../ABI/testing/sysfs-class-backlight-adp8860 | 54 ++ .../ABI/testing/sysfs-class-backlight-lm3639 | 11 + 3 files changed, 96 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639 -- 2.16.1
[PATCH v2] Documentation/ABI: update infiniband sysfs interfaces
Add documentation for core and hardware specific infiniband interfaces. The descriptions have been collected from git commit logs, reading through code and data sheets. Some drivers have incomplete doc and are annotated with the comment '[to be documented]'. Signed-off-by: Aishwarya Pant --- Changes in v2: - Move infiniband interface from testing to stable - Fix typos - Update description of cap_mask, port_xmit_constraint_errors and port_rcv_constraint_errors - Add doc for hw_counters - Remove old documentation Documentation/ABI/stable/sysfs-class-infiniband | 818 +++ Documentation/ABI/testing/sysfs-class-infiniband | 16 - Documentation/infiniband/sysfs.txt | 129 +--- 3 files changed, 820 insertions(+), 143 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-class-infiniband delete mode 100644 Documentation/ABI/testing/sysfs-class-infiniband diff --git a/Documentation/ABI/stable/sysfs-class-infiniband b/Documentation/ABI/stable/sysfs-class-infiniband new file mode 100644 index ..f9c709a8d0ab --- /dev/null +++ b/Documentation/ABI/stable/sysfs-class-infiniband @@ -0,0 +1,818 @@ +sysfs interface common for all infiniband devices +- + +What: /sys/class/infiniband//node_type +What: /sys/class/infiniband//node_guid +What: /sys/class/infiniband//sys_image_guid +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + node_type: (RO) Node type (CA, RNIC, usNIC, usNIC UDP, + switch or router) + + node_guid: (RO) Node GUID + + sys_image_guid: (RO) System image GUID + + +What: /sys/class/infiniband//node_desc +Date: Feb, 2006 +KernelVersion: v2.6.17 +Contact: linux-r...@vger.kernel.org +Description: + (RW) Update the node description with information such as the + node's hostname, so that IB network management software can tie + its view to the real world. + + +What: /sys/class/infiniband//fw_ver +Date: Jun, 2016 +KernelVersion: v4.10 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Display firmware version + + +What: /sys/class/infiniband//ports//lid +What: /sys/class/infiniband//ports//rate +What: /sys/class/infiniband//ports//lid_mask_count +What: /sys/class/infiniband//ports//sm_sl +What: /sys/class/infiniband//ports//sm_lid +What: /sys/class/infiniband//ports//state +What: /sys/class/infiniband//ports//phys_state +What: /sys/class/infiniband//ports//cap_mask +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + + lid:(RO) Port LID + + rate: (RO) Port data rate (active width * active + speed) + + lid_mask_count: (RO) Port LID mask count + + sm_sl: (RO) Subnet manager SL for port's subnet + + sm_lid: (RO) Subnet manager LID for port's subnet + + state: (RO) Port state (DOWN, INIT, ARMED, ACTIVE or + ACTIVE_DEFER) + + phys_state: (RO) Port physical state (Sleep, Polling, + LinkUp, etc) + + cap_mask: (RO) Port capability mask. 2 bits here are + settable- IsCommunicationManagementSupported + (set when CM module is loaded) and IsSM (set via + open of issmN file). + + +What: /sys/class/infiniband//ports//link_layer +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Link layer type information (Infiniband or Ethernet type) + + +What: /sys/class/infiniband//ports//counters/symbol_error +What: /sys/class/infiniband//ports//counters/port_rcv_errors +What: /sys/class/infiniband//ports//counters/port_rcv_remote_physical_errors +What: /sys/class/infiniband//ports//counters/port_rcv_switch_relay_errors +What: /sys/class/infiniband//ports//counters/link_error_recovery +What: /sys/class/infiniband//ports//counters/port_xmit_constraint_errors +What: /sys/class/infiniband//ports//counters/port_rcv_contraint_errors +What: /sys/class/infiniband//ports//counters/local_link_integrity_errors +What: /sys/class/infiniband//ports//counters/excessive_buffer_overrun_errors +What: /sys/class/infiniband//ports//counters/port_xmit_data +What: /sys/class/infiniband//ports//counters/port_rcv_data +What: /sys/class/infiniband//ports//counters/port_xmit_packets +W
Re: [PATCH 1/5] backlight: lp8788: document sysfs attributes
On Thu, Feb 01, 2018 at 11:36:04AM +, Daniel Thompson wrote: > On Wed, Jan 31, 2018 at 01:51:21PM +0200, Jani Nikula wrote: > > On Wed, 31 Jan 2018, Daniel Thompson wrote: > > > On Fri, Jan 26, 2018 at 08:20:08PM +0530, Aishwarya Pant wrote: > > >> Add documentation for sysfs interfaces of lp8788 backlight driver by > > >> looking through the code and the git commit history. > > >> > > >> Signed-off-by: Aishwarya Pant > > >> --- > > >> Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++ > > >> 1 file changed, 10 insertions(+) > > >> create mode 100644 > > >> Documentation/ABI/testing/sysfs-class-backlight-lp8788 > > >> > > >> diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 > > >> b/Documentation/ABI/testing/sysfs-class-backlight-lp8788 > > >> new file mode 100644 > > >> index ..c0e565c8d63d > > >> --- /dev/null > > >> +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788 > > >> @@ -0,0 +1,10 @@ > > >> +sysfs interface for Texas Instruments lp8788 mfd backlight driver > > >> +- > > >> + > > >> +What: /sys/class/backlight//bl_ctl_mode > > >> +Date: Feb, 2013 > > >> +KernelVersion: v3.10 > > >> +Contact:Milo Kim > > >> +Description: > > >> +(RO) Displays whether the brightness is controlled by > > >> the PWM > > >> +input("PWM based") or the I2C register("Register > > >> based"). > > > > > > I rather dislike drivers with this type of "bonus" sysfs controls. I'm > > > struggling to come up with any reason why the userspace would want to > > > read this control (and I think bl_ctl_mode gets the fewest hits after > > > searching with google hits of any search I've tried) . It looks to me > > > like this is debug information that should never have gone into sysfs > > > at all. > > > > Agreed. I think the same holds for the other extra sysfs attributes. At > > worst, having these prevents the backlight class from adding the names > > later on, which is just backwards. > > The problem is that they do exist... > > For controls which appear to be misplaced debug attributes I think I am > happy to nuke the values entirely. It is extremely improbable that any > userspace will notice. > > Unfortunately some of the controls look like they could be poked by an > custom userspace so I'm quite so confident about nuking these ones...and if we > don't nuke we should document (so thanks Aishwarya!). > Hi Thanks for reviewing. Should I take it to assume that we would like to keep the debug-like attributes in documentation for now? Aishwarya > > Daniel.
Re: [PATCH] Documentation/ABI: update infiniband sysfs interfaces
On Thu, Feb 01, 2018 at 12:48:18PM -0500, Hal Rosenstock wrote: > On 2/1/2018 8:32 AM, Aishwarya Pant wrote: > > Add documentation for core and hardware specific infiniband interfaces. > > The descriptions have been collected from git commit logs, reading > > through code and data sheets. Some drivers have incomplete doc and are > > annotated with the comment '[to be documented]'. > > > > Signed-off-by: Aishwarya Pant > > --- > > Documentation/ABI/testing/sysfs-class-infiniband | 755 > > +++ > > 1 file changed, 755 insertions(+) > > > > diff --git a/Documentation/ABI/testing/sysfs-class-infiniband > > b/Documentation/ABI/testing/sysfs-class-infiniband > > index a86abe66a316..2e150169633b 100644 > > --- a/Documentation/ABI/testing/sysfs-class-infiniband > > +++ b/Documentation/ABI/testing/sysfs-class-infiniband > > @@ -1,3 +1,194 @@ > > +sysfs interface common for all infiniband devices > > +- > > + > > +What: /sys/class/infiniband//node_type > > +What: /sys/class/infiniband//node_guid > > +What: /sys/class/infiniband//sys_image_guid > > +Date: Apr, 2005 > > +KernelVersion: v2.6.12 > > +Contact: linux-r...@vger.kernel.org > > +Description: > > + node_type: (RO) Node type (CA, RNIC, usNIC, usNIC UDP, > > + switch or router) > > + > > + node_guid: (RO) Node GUID > > + > > + sys_image_guid: (RO) System image GUID > > + > > + > > +What: /sys/class/infiniband//node_desc > > +Date: Feb, 2006 > > +KernelVersion: v2.6.17 > > +Contact: linux-r...@vger.kernel.org > > +Description: > > + (RW) Update the node description with information such as the > > + node's hostname, so that IB network management software can tie > > + its view to the real world. > > + > > + > > +What: /sys/class/infiniband//fw_ver > > +Date: Jun, 2016 > > +KernelVersion: v4.10 > > +Contact: linux-r...@vger.kernel.org > > +Description: > > + (RO) Display firmware version > > + > > + > > +What: /sys/class/infiniband//ports//lid > > +What: /sys/class/infiniband//ports//rate > > +What: > > /sys/class/infiniband//ports//lid_mask_count > > +What: /sys/class/infiniband//ports//sm_sl > > +What: /sys/class/infiniband//ports//sm_lid > > +What: /sys/class/infiniband//ports//state > > +What: > > /sys/class/infiniband//ports//phys_state > > +What: /sys/class/infiniband//ports//cap_mask > > +Date: Apr, 2005 > > +KernelVersion: v2.6.12 > > +Contact: linux-r...@vger.kernel.org > > +Description: > > + > > + lid:(RO) Port LID > > + > > + rate: (RO) Port data rate (active width * active > > + speed) > > + > > + lid_mask_count: (RO) Port LID mask count > > + > > + sm_slL (RO) Subnet manager SL for port's subnet > > Typo sm_sl: > > > + > > + sm_lid: (RO) Subnet manager LID for port's subnet > > + > > + state: (RO) Port state (DOWN, INIT, ARMED, ACTIVE or > > + ACTIVE_DEFER> + > > + phys_state: (RO) Port physical state (Sleep, Polling, > > + LinkUp, etc) > > + > > + cap_mask: (RO) Port capability mask > > 2 bits here are settable: IsCommunicationManagementSupported and IsSM. Hi Sorry, I don't quite understand this. cap_mask is a read only value which indicates the supported functions. So the two bits- IsCommunicationManagementSupported and IsSM, should not be setttable? Aishwarya
Re: [PATCH] Documentation/ABI: update infiniband sysfs interfaces
On Thu, Feb 01, 2018 at 03:08:11PM -0700, Jason Gunthorpe wrote: > On Thu, Feb 01, 2018 at 07:02:33PM +0530, Aishwarya Pant wrote: > > Add documentation for core and hardware specific infiniband interfaces. > > The descriptions have been collected from git commit logs, reading > > through code and data sheets. Some drivers have incomplete doc and are > > annotated with the comment '[to be documented]'. > > > > Signed-off-by: Aishwarya Pant > > Documentation/ABI/testing/sysfs-class-infiniband | 755 > > +++ > > 1 file changed, 755 insertions(+) > > Wow this looks really great > > Should this patch delete some of the old documentation? Yeah, I should do that because the documentation in Documentation/infiniband/sysfs.txt is out of date. > > > diff --git a/Documentation/ABI/testing/sysfs-class-infiniband > > b/Documentation/ABI/testing/sysfs-class-infiniband > > Lots, maybe even all of of this is considered stable.. Okay, I guess it should belong to the stable directory then. > > > +sysfs interface for Broadcom NetXtreme-E RoCE driver > > + > > + > > +What: /sys/class/infiniband/bnxt_reX/fw_rev > > +What: /sys/class/infiniband/bnxt_reX/hw_rev > > +What: /sys/class/infiniband/bnxt_reX/hca_type > > These are actually common to all drivers > > /sys/class/infiniband/XXX/fw_rev, etc Would make sense to define these at one place- hw_rev, hca_type, board_id are common to a lot of the drivers. Aishwarya > > Jason
Re: [PATCH 2/5] backlight: lp855x: document sysfs attributes
On Thu, Feb 01, 2018 at 11:06:42AM +, Daniel Thompson wrote: > On Fri, Jan 26, 2018 at 08:23:00PM +0530, Aishwarya Pant wrote: > > Add documentation for sysfs interface of Texas Instruments lp855x > > backlight driver by reading code and looking through git commit logs. > > > > Signed-off-by: Aishwarya Pant > > --- > > .../ABI/testing/sysfs-class-backlight-lp855x | 19 > > +++ > > 1 file changed, 19 insertions(+) > > create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x > > > > diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp855x > > b/Documentation/ABI/testing/sysfs-class-backlight-lp855x > > new file mode 100644 > > index ..5b9d38958875 > > --- /dev/null > > +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp855x > > @@ -0,0 +1,19 @@ > > +sysfs interface for Texas Instruments lp855x backlight driver > > + > > + > > +What: /sys/class/backlight//chip_id > > +Date: Mar, 2012 > > +KernelVersion: v3.10 > > +Contact: Milo Kim > > +Description: > > + (RO) Displays the lp8755x chip id. Possible values are: > > + lp8550, lp8551, lp8552, lp8553, lp8555, lp8556 or lp8557. > > + > > + > > +What: /sys/class/backlight//bl_ctl_mode > > +Date: Mar, 2012 > > +KernelVersion: v3.10 > > +Contact: Linux kernel mailing list > > +Description: > > + (RO) Displays whether the brightness is controlled by the pwm > > + input("pwm based) or the i2c register("register based"). > > Since like the first patch in the series, these look like they are for > debugging. That thread is still active but whatever the outcome of that > thread please assume it also applies to this patch. All right, I'll wait for conclusion on that thread before I re-send the patchset with the updates. Aishwarya > > > Daniel.
[PATCH] Documentation/ABI: update infiniband sysfs interfaces
Add documentation for core and hardware specific infiniband interfaces. The descriptions have been collected from git commit logs, reading through code and data sheets. Some drivers have incomplete doc and are annotated with the comment '[to be documented]'. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-class-infiniband | 755 +++ 1 file changed, 755 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-class-infiniband b/Documentation/ABI/testing/sysfs-class-infiniband index a86abe66a316..2e150169633b 100644 --- a/Documentation/ABI/testing/sysfs-class-infiniband +++ b/Documentation/ABI/testing/sysfs-class-infiniband @@ -1,3 +1,194 @@ +sysfs interface common for all infiniband devices +- + +What: /sys/class/infiniband//node_type +What: /sys/class/infiniband//node_guid +What: /sys/class/infiniband//sys_image_guid +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + node_type: (RO) Node type (CA, RNIC, usNIC, usNIC UDP, + switch or router) + + node_guid: (RO) Node GUID + + sys_image_guid: (RO) System image GUID + + +What: /sys/class/infiniband//node_desc +Date: Feb, 2006 +KernelVersion: v2.6.17 +Contact: linux-r...@vger.kernel.org +Description: + (RW) Update the node description with information such as the + node's hostname, so that IB network management software can tie + its view to the real world. + + +What: /sys/class/infiniband//fw_ver +Date: Jun, 2016 +KernelVersion: v4.10 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Display firmware version + + +What: /sys/class/infiniband//ports//lid +What: /sys/class/infiniband//ports//rate +What: /sys/class/infiniband//ports//lid_mask_count +What: /sys/class/infiniband//ports//sm_sl +What: /sys/class/infiniband//ports//sm_lid +What: /sys/class/infiniband//ports//state +What: /sys/class/infiniband//ports//phys_state +What: /sys/class/infiniband//ports//cap_mask +Date: Apr, 2005 +KernelVersion: v2.6.12 +Contact: linux-r...@vger.kernel.org +Description: + + lid:(RO) Port LID + + rate: (RO) Port data rate (active width * active + speed) + + lid_mask_count: (RO) Port LID mask count + + sm_slL (RO) Subnet manager SL for port's subnet + + sm_lid: (RO) Subnet manager LID for port's subnet + + state: (RO) Port state (DOWN, INIT, ARMED, ACTIVE or + ACTIVE_DEFER) + + phys_state: (RO) Port physical state (Sleep, Polling, + LinkUp, etc) + + cap_mask: (RO) Port capability mask + + +What: /sys/class/inifiniband//ports//link_layer +Date: Oct, 2010 +KernelVersion: v2.6.37 +Contact: linux-r...@vger.kernel.org +Description: + (RO) Link layer type information (Infiniband or Ethernet type) + + +What: /sys/class/infiniband//ports//counters/symbol_error +What: /sys/class/infiniband//ports//counters/port_rcv_errors +What: /sys/class/infiniband//ports//counters/port_rcv_remote_physical_errors +What: /sys/class/infiniband//ports//counters/port_rcv_switch_relay_errors +What: /sys/class/infiniband//ports//counters/link_error_recovery +What: /sys/class/infiniband//ports//counters/port_xmit_constraint_errors +What: /sys/class/infiniband//ports//counters/port_rcv_contraint_errors +What: /sys/class/infiniband//ports//counters/local_link_integrity_errors +What: /sys/class/infiniband//ports//counters/ecessive_buffer_overrun_errors +What: /sys/class/infiniband//ports//counters/port_xmit_data +What: /sys/class/infiniband//ports//counters/port_rcv_data +What: /sys/class/infiniband//ports//counters/port_xmit_packets +What: /sys/class/infiniband//ports//counters/port_rcv_packets +What: /sys/class/infiniband//ports//counters/unicast_rcv_packets +What: /sys/class/infiniband//ports//counters/unicast_xmit_packets +What: /sys/class/infiniband//ports//counters/multicast_rcv_packets +What: /sys/class/infiniband//ports//counters/multicast_xmit_packets +What: /sys/class/infiniband//ports//counters/link_downed +What: /sys/class/infiniband//ports//counters/port_xmit_discards +What: /sys/class/infiniband//ports//counters/VL15_dropped +What: /sys/class/infiniband//ports//counters/port_xmit_wait +Date: Apr, 2005 +Kernel
[PATCH 5/5] backlight: adp8860: document sysfs attributes
Add documentation for sysfs interface of adp8860 series backlight devices by reading through code and git commits. Signed-off-by: Aishwarya Pant --- .../ABI/testing/sysfs-class-backlight-adp8860 | 54 ++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860 diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp8860 b/Documentation/ABI/testing/sysfs-class-backlight-adp8860 new file mode 100644 index ..54d61c788b1b --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp8860 @@ -0,0 +1,54 @@ +sysfs interface for analog devices adp8860 backlight driver +--- + +The backlight brightness control operates at three different levels for the +adp8860, adp8861 and adp8863 devices: daylight (level 1), office (level 2) and +dark (level 3). By default the brightness operates at the daylight brightness +level. + +What: /sys/class/backlight//ambient_light_level +Date: Apr, 2010 +KernelVersion: v2.6.35 +Contact: Michael Hennerich +Description: + (RO) 13-bit conversion value for the first light sensor—high + byte (Bit 12 to Bit 8). The value is updated every 80 ms (when + the light sensor is enabled). + + +What: /sys/class/backlight//ambient_light_zone +Date: Apr, 2010 +KernelVersion: v2.6.35 +Contact: Michael Hennerich +Description: + (RW) Read or write the specific level at which the backlight + operates. Value "0" enables automatic ambient light sensing, and + values "1", "2" or "3" set the control to daylight, office or + dark respectively. + + +What: /sys/class/backlight//l1_daylight_max +What: /sys/class/backlight//l2_office_max +What: /sys/class/backlight//l3_dark_max +Date: Apr, 2010 +KernelVersion: v2.6.35 +Contact: Michael Hennerich +Description: + (RW) Maximum current setting for the backlight when brightness + is at one of the three levels (daylight, office or dark). This + is an input code between 0 and 127, which is transformed to a + value between 0 mA and 30 mA using linear or non-linear + algorithms. + + +What: /sys/class/backlight//l1_daylight_dim +What: /sys/class/backlight//l2_office_dim +What: /sys/class/backlight//l3_dark_dim +Date: Apr, 2010 +KernelVersion: v2.6.35 +Contact: Michael Hennerich +Description: + (RW) Dim current setting for the backlight when brightness is at + one of the three levels (daylight, office or dark). This is an + input code between 0 and 127, which is transformed to a value + between 0 mA and 30 mA using linear or non-linear algorithms. -- 2.16.1
[PATCH 4/5] backlight: adp5520: document sysfs attributes
Add documentation for sysfs interface of adp5520/adp5501 analog devices backlight driver by reading code and looking through git commit logs. Signed-off-by: Aishwarya Pant --- .../ABI/testing/sysfs-class-backlight-adp5520 | 31 ++ 1 file changed, 31 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520 diff --git a/Documentation/ABI/testing/sysfs-class-backlight-adp5520 b/Documentation/ABI/testing/sysfs-class-backlight-adp5520 new file mode 100644 index ..34b6ebafa210 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-backlight-adp5520 @@ -0,0 +1,31 @@ +sysfs interface for analog devices adp5520(01) backlight driver +--- + +The backlight brightness control operates at three different levels for the +adp5520 and adp5501 devices: daylight (level 1), office (level 2) and dark +(level 3). By default the brightness operates at the daylight brightness level. + +What: /sys/class/backlight//daylight_max +What: /sys/class/backlight//office_max +What: /sys/class/backlight//dark_max +Date: Sep, 2009 +KernelVersion: v2.6.32 +Contact: Michael Hennerich +Description: + (RW) Maximum current setting for the backlight when brightness + is at one of the three levels (daylight, office or dark). This + is an input code between 0 and 127, which is transformed to a + value between 0 mA and 30 mA using linear or non-linear + algorithms. + +What: /sys/class/backlight//daylight_dim +What: /sys/class/backlight//office_dim +What: /sys/class/backlight//dark_dim +Date: Sep, 2009 +KernelVersion: v2.6.32 +Contact: Michael Hennerich +Description: + (RW) Dim current setting for the backlight when brightness is at + one of the three levels (daylight, office or dark). This is an + input code between 0 and 127, which is transformed to a value + between 0 mA and 30 mA using linear or non-linear algorithms. -- 2.16.1
[PATCH 3/5] backlight: lm3639: document sysfs attributes
Add documentation for sysfs interfaces of Texas Instruments lm3639 backlight + flash led driver chip by looking through git commits and reading code. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-class-backlight-lm3639 | 13 + 1 file changed, 13 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639 diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lm3639 b/Documentation/ABI/testing/sysfs-class-backlight-lm3639 new file mode 100644 index ..ec87dc8f4395 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-backlight-lm3639 @@ -0,0 +1,13 @@ +sysfs interface for Texas Instruments lm3639 backlight + flash led driver chip +-- + +What: /sys/class/backlight//bled_mode +Date: Oct, 2012 +KernelVersion: v3.10 +Contact: Lee Jones , + Daniel Thompson , + Jingoo Han +Description: + (WO) Write to the backlight mapping mode. The backlight current + can be mapped for either exponential (value "0") or linear + mapping modes (default). -- 2.16.1
[PATCH 2/5] backlight: lp855x: document sysfs attributes
Add documentation for sysfs interface of Texas Instruments lp855x backlight driver by reading code and looking through git commit logs. Signed-off-by: Aishwarya Pant --- .../ABI/testing/sysfs-class-backlight-lp855x | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp855x b/Documentation/ABI/testing/sysfs-class-backlight-lp855x new file mode 100644 index ..5b9d38958875 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp855x @@ -0,0 +1,19 @@ +sysfs interface for Texas Instruments lp855x backlight driver + + +What: /sys/class/backlight//chip_id +Date: Mar, 2012 +KernelVersion: v3.10 +Contact: Milo Kim +Description: + (RO) Displays the lp8755x chip id. Possible values are: + lp8550, lp8551, lp8552, lp8553, lp8555, lp8556 or lp8557. + + +What: /sys/class/backlight//bl_ctl_mode +Date: Mar, 2012 +KernelVersion: v3.10 +Contact: Linux kernel mailing list +Description: + (RO) Displays whether the brightness is controlled by the pwm + input("pwm based) or the i2c register("register based"). -- 2.16.1
[PATCH 1/5] backlight: lp8788: document sysfs attributes
Add documentation for sysfs interfaces of lp8788 backlight driver by looking through the code and the git commit history. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-class-backlight-lp8788 | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788 diff --git a/Documentation/ABI/testing/sysfs-class-backlight-lp8788 b/Documentation/ABI/testing/sysfs-class-backlight-lp8788 new file mode 100644 index ..c0e565c8d63d --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-backlight-lp8788 @@ -0,0 +1,10 @@ +sysfs interface for Texas Instruments lp8788 mfd backlight driver +- + +What: /sys/class/backlight//bl_ctl_mode +Date: Feb, 2013 +KernelVersion: v3.10 +Contact: Milo Kim +Description: + (RO) Displays whether the brightness is controlled by the PWM + input("PWM based") or the I2C register("Register based"). -- 2.16.1
[PATCH 0/5] backlight: document sysfs interfaces
Patchset contains documentation of the sysfs interfaces for the following five backlight drivers- 1) lp8788 2) lp855x 3) lm3639 4) adp5520 5) adp8860 It was compiled from data sheets, reading code and git history logs. Aishwarya Pant (5): backlight: lp8788: document sysfs attributes backlight: lp855: document sysfs attributes backlight: lm3639: document sysfs attributes backlight: adp5520: document sysfs attributes backlight: adp8860: document sysfs attributes .../ABI/testing/sysfs-class-backlight-adp5520 | 31 + .../ABI/testing/sysfs-class-backlight-adp8860 | 54 ++ .../ABI/testing/sysfs-class-backlight-lm3639 | 13 ++ .../ABI/testing/sysfs-class-backlight-lp855x | 19 .../ABI/testing/sysfs-class-backlight-lp8788 | 10 5 files changed, 127 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp5520 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-adp8860 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lm3639 create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp855x create mode 100644 Documentation/ABI/testing/sysfs-class-backlight-lp8788 -- 2.16.1
[PATCH v2] Documentation/ABI: clean up sysfs-class-pktcdvd
Clean up the sysfs documentation such that it is in the same format as described in Documentation/ABI/README. Mainly, the patch moves the attribute names to the 'What:' field. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Changes in v2: - Convert spaces to tabs Documentation/ABI/testing/sysfs-class-pktcdvd | 129 +++--- 1 file changed, 75 insertions(+), 54 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-pktcdvd b/Documentation/ABI/testing/sysfs-class-pktcdvd index b1c3f0263359..dde4f26d0780 100644 --- a/Documentation/ABI/testing/sysfs-class-pktcdvd +++ b/Documentation/ABI/testing/sysfs-class-pktcdvd @@ -1,60 +1,81 @@ -What: /sys/class/pktcdvd/ -Date: Oct. 2006 -KernelVersion: 2.6.20 -Contact:Thomas Maier -Description: - sysfs interface --- +The pktcdvd module (packet writing driver) creates the following files in the +sysfs: ( is in the format major:minor) + +What: /sys/class/pktcdvd/add +What: /sys/class/pktcdvd/remove +What: /sys/class/pktcdvd/device_map +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact: Thomas Maier +Description: + + add:(WO) Write a block device id (major:minor) to + create a new pktcdvd device and map it to the + block device. + + remove: (WO) Write the pktcdvd device id (major:minor) + to remove the pktcdvd device. + + device_map: (RO) Shows the device mapping in format: + pktcdvd[0-7] + + +What: /sys/class/pktcdvd/pktcdvd[0-7]/dev +What: /sys/class/pktcdvd/pktcdvd[0-7]/uevent +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact: Thomas Maier +Description: + dev:(RO) Device id + + uevent: (WO) To send a uevent + + +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_started +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_finished +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_written +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read_gather +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/reset +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact: Thomas Maier +Description: + packets_started:(RO) Number of started packets. + + packets_finished: (RO) Number of finished packets. + + kb_written: (RO) kBytes written. + + kb_read:(RO) kBytes read. + + kb_read_gather: (RO) kBytes read to fill write packets. + + reset: (WO) Write any value to it to reset + pktcdvd device statistic values, like + bytes read/written. + + +What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/size +What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_off +What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_on +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact: Thomas Maier +Description: + size: (RO) Contains the size of the bio write queue. + + congestion_off: (RW) If bio write queue size is below this mark, + accept new bio requests from the block layer. -The pktcdvd module (packet writing driver) creates -these files in the sysfs: -( is in format major:minor ) - -/sys/class/pktcdvd/ -add(0200) Write a block device id (major:minor) - to create a new pktcdvd device and map - it to the block device. - -remove (0200) Write the pktcdvd device id (major:minor) - to it to remove the pktcdvd device. - -device_map (0444) Shows the device mapping in format: - pktcdvd[0-7] - -/sys/class/pktcdvd/pktcdvd[0-7]/ -dev (0444) Device id -uevent(0200) To send an uevent. - -/sys/class/pktcdvd/pktcdvd[0-7]/stat/ -packets_started (0444) Number of started packets. -packets_finished (0444) Number of finished packets. - -kb_written(0444) kBytes written. -kb_read (0444) kBytes read. -kb_read_gather(0444) kBytes read to fill write packets. - -reset (0200) Write any value to it to reset - pktcdvd device statistic values, like - bytes read/written. - -/sys/class/pktcdvd/pktcdvd[0-7]/write_queue/ -size (0444) Contains the size of the bio write -
[PATCH v3] Documentation/ABI: update cpuidle sysfs documentation
Update cpuidle documentation using git logs and existing documentation in Documentation/cpuidle/sysfs.txt. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Change in v3: - Fix up the mess up in the subject line of previous version Change in v2: - Merge cpuidle_sysfs_switch attributes' description with the previous entry. Documentation/ABI/testing/sysfs-devices-system-cpu | 80 +- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index bfd29bc8d37a..113402ca9397 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -108,6 +108,8 @@ Description:CPU topology files that describe a logical CPU's relationship What: /sys/devices/system/cpu/cpuidle/current_driver /sys/devices/system/cpu/cpuidle/current_governor_ro + /sys/devices/system/cpu/cpuidle/available_governors + /sys/devices/system/cpu/cpuidle/current_governor Date: September 2007 Contact: Linux kernel mailing list Description: Discover cpuidle policy and mechanism @@ -119,13 +121,87 @@ Description: Discover cpuidle policy and mechanism Idle policy (governor) is differentiated from idle mechanism (driver) - current_driver: displays current idle mechanism + System global cpuidle related information and tunables are under + /sys/devices/system/cpu/cpuidle. Briefly, the attributes are: - current_governor_ro: displays current idle policy + current_driver: (RO) displays current idle mechanism + + current_governor_ro: (RO) displays current idle policy + + With the cpuidle_sysfs_switch boot option enabled (meant for + developer testing), the following three attributes are visible + instead: + + current_driver: same as described above + + available_governors: (RO) displays a space separated list of + available governors + + current_governor: (RW) displays current idle policy. Users can + switch the governor at runtime by writing to this file. See files in Documentation/cpuidle/ for more information. +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name + /sys/devices/system/cpu/cpuX/cpuidle/stateN/latency + /sys/devices/system/cpu/cpuX/cpuidle/stateN/power + /sys/devices/system/cpu/cpuX/cpuidle/stateN/time + /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage +Date: September 2007 +KernelVersion: v2.6.24 +Contact: Linux kernel mailing list +Description: + The directory /sys/devices/system/cpu/cpuX/cpuidle contains per + logical CPU specific cpuidle information for each online cpu X. + The processor idle states which are available for use have the + following attributes: + + name: (RO) Name of the idle state (string). + + latency: (RO) The latency to exit out of this idle state (in + microseconds). + + power: (RO) The power consumed while in this idle state (in + milliwatts). + + time: (RO) The total time spent in this idle state (in microseconds). + + usage: (RO) Number of times this state was entered (a count). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc +Date: February 2008 +KernelVersion: v2.6.25 +Contact: Linux kernel mailing list +Description: + (RO) A small description about the idle state (string). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable +Date: March 2012 +KernelVersion: v3.10 +Contact: Linux kernel mailing list +Description: + (RW) Option to disable this idle state (bool). The behavior and + the effect of the disable variable depends on the implementation + of a particular governor. In the ladder governor, for example, + it is not coherent, i.e. if one is disabling a light state, then + all deeper states are disabled as well, but the disable variable + does not reflect it. Likewise, if one enables a deep state but a + lighter state still is disabled, then this has no effect. + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency +Date: March 2014 +KernelVersion: v3.15 +Contact: Linux kernel mailing list +Description: + (RO) Display the target residency i.e. the minimum amount of + time (in microseconds) this cpu should spend in this idle state +
[PATCH] Documentation/ABI: add sysfs interface for s6e63m0 lcd driver
Document sysfs attributes of s6e63m0 lcd panel driver by looking through git logs and reading code. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 diff --git a/Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 b/Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 new file mode 100644 index ..db056bd38404 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-lcd-s6e63m0 @@ -0,0 +1,22 @@ +sysfs interface for the S6E63M0 AMOLED LCD panel driver +--- + +What: /sys/class/lcd//gamma_mode +Date: May, 2010 +KernelVersion: v2.6.35 +Contact: Linux kernel mailing list +Description: + (RW) Read or write the gamma mode. Following three modes are + supported: + 0 - gamma value 2.2, + 1 - gamma value 1.9 and + 2 - gamma value 1.7. + + +What: /sys/class/lcd//gamma_table +Date: May, 2010 +KernelVersion: v2.6.35 +Contact: Linux kernel mailing list +Description: + (RO) Displays the size of the gamma table i.e. the number of + gamma modes available. -- 2.16.1
[PATCH] Documentation/ABI: clean up sysfs-class-pktcdvd
Clean up the sysfs documentation such that it is in the same format as described in Documentation/ABI/README. Mainly, the patch moves the attribute names to the 'What:' field. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-class-pktcdvd | 122 +++--- 1 file changed, 71 insertions(+), 51 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-pktcdvd b/Documentation/ABI/testing/sysfs-class-pktcdvd index b1c3f0263359..e85ec99c6e31 100644 --- a/Documentation/ABI/testing/sysfs-class-pktcdvd +++ b/Documentation/ABI/testing/sysfs-class-pktcdvd @@ -1,60 +1,80 @@ -What: /sys/class/pktcdvd/ +sysfs interface +--- +The pktcdvd module (packet writing driver) creates the following files in the +sysfs: ( is in format major:minor) + +What: /sys/class/pktcdvd/add +What: /sys/class/pktcdvd/remove +What: /sys/class/pktcdvd/device_map Date: Oct. 2006 KernelVersion: 2.6.20 Contact:Thomas Maier Description: -sysfs interface + add:(WO) Write a block device id (major:minor) to create + a new pktcdvd device and map it to the block device. + + remove: (WO) Write the pktcdvd device id (major:minor) to it to + remove the pktcdvd device. + + device_map: (RO) Shows the device mapping in format: + pktcdvd[0-7] + + +What: /sys/class/pktcdvd/pktcdvd[0-7]/dev +What: /sys/class/pktcdvd/pktcdvd[0-7]/uevent +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact:Thomas Maier +Description: + dev:(RO) Device id + + uevent: (WO) To send an uevent + + +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_started +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/packets_finished +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_written +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/kb_read_gather +What: /sys/class/pktcdvd/pktcdvd[0-7]/stat/reset +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact:Thomas Maier +Description: + packets_started: (RO) Number of started packets. + + packets_finished: (RO) Number of finished packets. + + kb_written: (RO) kBytes written. + + kb_read: (RO) kBytes read. + + kb_read_gather: (RO) kBytes read to fill write packets. + + reset:(WO) Write any value to it to reset pktcdvd + device statistic values, like bytes + read/written. + + +What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/size +What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_off +What: /sys/class/pktcdvd/pktcdvd[0-7]/write_queue/congestion_on +Date: Oct. 2006 +KernelVersion: 2.6.20 +Contact:Thomas Maier +Description: + size: (RO) Contains the size of the bio write queue. + + congestion_off: (RW) If bio write queue size is below this mark, + accept new bio requests from the block layer. -The pktcdvd module (packet writing driver) creates -these files in the sysfs: -( is in format major:minor ) - -/sys/class/pktcdvd/ -add(0200) Write a block device id (major:minor) - to create a new pktcdvd device and map - it to the block device. - -remove (0200) Write the pktcdvd device id (major:minor) - to it to remove the pktcdvd device. - -device_map (0444) Shows the device mapping in format: - pktcdvd[0-7] - -/sys/class/pktcdvd/pktcdvd[0-7]/ -dev (0444) Device id -uevent(0200) To send an uevent. - -/sys/class/pktcdvd/pktcdvd[0-7]/stat/ -packets_started (0444) Number of started packets. -packets_finished (0444) Number of finished packets. - -kb_written(0444) kBytes written. -kb_read (0444) kBytes read. -kb_read_gather(0444) kBytes read to fill write packets. - -reset (0200) Write any value to it to reset - pktcdvd device statistic values, like - bytes read/written. - -/sys/class/pktcdvd/pktcdvd[0-7]/write_queue/ -size (0444) Contains the size of the bio write - queue. - -congestion_off(0644) If bio write queue size is below - this mark, accept new bio requests - from the b
[PATCH v2] Documentation/ABI: update cpuidle sysfs documentationDaniel Lezcano ,
Update cpuidle documentation using git logs and existing documentation in Documentation/cpuidle/sysfs.txt. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Change in v2: - Merge cpuidle_sysfs_switch attributes' description with the previous entry. Documentation/ABI/testing/sysfs-devices-system-cpu | 80 +- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index bfd29bc8d37a..113402ca9397 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -108,6 +108,8 @@ Description:CPU topology files that describe a logical CPU's relationship What: /sys/devices/system/cpu/cpuidle/current_driver /sys/devices/system/cpu/cpuidle/current_governor_ro + /sys/devices/system/cpu/cpuidle/available_governors + /sys/devices/system/cpu/cpuidle/current_governor Date: September 2007 Contact: Linux kernel mailing list Description: Discover cpuidle policy and mechanism @@ -119,13 +121,87 @@ Description: Discover cpuidle policy and mechanism Idle policy (governor) is differentiated from idle mechanism (driver) - current_driver: displays current idle mechanism + System global cpuidle related information and tunables are under + /sys/devices/system/cpu/cpuidle. Briefly, the attributes are: - current_governor_ro: displays current idle policy + current_driver: (RO) displays current idle mechanism + + current_governor_ro: (RO) displays current idle policy + + With the cpuidle_sysfs_switch boot option enabled (meant for + developer testing), the following three attributes are visible + instead: + + current_driver: same as described above + + available_governors: (RO) displays a space separated list of + available governors + + current_governor: (RW) displays current idle policy. Users can + switch the governor at runtime by writing to this file. See files in Documentation/cpuidle/ for more information. +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name + /sys/devices/system/cpu/cpuX/cpuidle/stateN/latency + /sys/devices/system/cpu/cpuX/cpuidle/stateN/power + /sys/devices/system/cpu/cpuX/cpuidle/stateN/time + /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage +Date: September 2007 +KernelVersion: v2.6.24 +Contact: Linux kernel mailing list +Description: + The directory /sys/devices/system/cpu/cpuX/cpuidle contains per + logical CPU specific cpuidle information for each online cpu X. + The processor idle states which are available for use have the + following attributes: + + name: (RO) Name of the idle state (string). + + latency: (RO) The latency to exit out of this idle state (in + microseconds). + + power: (RO) The power consumed while in this idle state (in + milliwatts). + + time: (RO) The total time spent in this idle state (in microseconds). + + usage: (RO) Number of times this state was entered (a count). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc +Date: February 2008 +KernelVersion: v2.6.25 +Contact: Linux kernel mailing list +Description: + (RO) A small description about the idle state (string). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable +Date: March 2012 +KernelVersion: v3.10 +Contact: Linux kernel mailing list +Description: + (RW) Option to disable this idle state (bool). The behavior and + the effect of the disable variable depends on the implementation + of a particular governor. In the ladder governor, for example, + it is not coherent, i.e. if one is disabling a light state, then + all deeper states are disabled as well, but the disable variable + does not reflect it. Likewise, if one enables a deep state but a + lighter state still is disabled, then this has no effect. + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency +Date: March 2014 +KernelVersion: v3.15 +Contact: Linux kernel mailing list +Description: + (RO) Display the target residency i.e. the minimum amount of + time (in microseconds) this cpu should spend in this idle state + to make the transition worth the effort. + + What: /sys/devi
[PATCH] Documentation/ABI: update cpuidle sysfs documentation
Update cpuidle documentation using git logs and existing documentation in Documentation/cpuidle/sysfs.txt. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-devices-system-cpu | 79 ++ 1 file changed, 79 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index bfd29bc8d37a..f38e52d08be1 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu @@ -126,6 +126,85 @@ Description: Discover cpuidle policy and mechanism See files in Documentation/cpuidle/ for more information. +What: /sys/devices/system/cpu/cpuidle/current_driver +What: /sys/devices/system/cpu/cpuidle/available_governors +What: /sys/devices/system/cpu/cpuidle/current_governor +Date: September 2007 +KernelVersion: v2.6.24 +Contact: Linux kernel mailing list +Description: + With the cpuidle_sysfs_switch boot option enabled (meant for + developer testing), the following three attributes are visible + instead: + + current_driver: (RO) Display the current idle mechanism. + + available_governors: (RO) Display a space separated list of + available governors + + current_governor: (RW) Display the current idle policy. Users + can switch the governor at runtime by writing to this file. + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/name +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/latency +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/power +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/time +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/usage +Date: September 2007 +KernelVersion: v2.6.24 +Contact: Linux kernel mailing list +Description: + The directory /sys/devices/system/cpu/cpuX/cpuidle contains per + logical CPU specific cpuidle information for each online cpu X. + The processor idle states which are available for use have the + following attributes: + + name: (RO) Name of the idle state (string). + + latency: (RO) The latency to exit out of this idle state (in + microseconds). + + power: (RO) The power consumed while in this idle state (in + milliwatts). + + time: (RO) The total time spent in this idle state (in microseconds). + + usage: (RO) Number of times this state was entered (a count). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/desc +Date: February 2008 +KernelVersion: v2.6.25 +Contact: Linux kernel mailing list +Description: + (RO) A small description about the idle state (string). + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/disable +Date: March 2012 +KernelVersion: v3.10 +Contact: Linux kernel mailing list +Description: + (RW) Option to disable this idle state (bool). The behavior and + the effect of the disable variable depends on the implementation + of a particular governor. In the ladder governor, for example, + it is not coherent, i.e. if one is disabling a light state, then + all deeper states are disabled as well, but the disable variable + does not reflect it. Likewise, if one enables a deep state but a + lighter state still is disabled, then this has no effect. + + +What: /sys/devices/system/cpu/cpuX/cpuidle/stateN/residency +Date: March 2014 +KernelVersion: v3.15 +Contact: Linux kernel mailing list +Description: + (RO) Display the target residency i.e. the minimum amount of + time (in microseconds) this cpu should spend in this idle state + to make the transition worth the effort. + + What: /sys/devices/system/cpu/cpu#/cpufreq/* Date: pre-git history Contact: linux...@vger.kernel.org -- 2.16.0
[PATCH v2] Documentation: rapidio: move sysfs interface to ABI
Right now, the description of the rapidio sysfs interfaces is in Documentation/rapidio/sysfs.txt. Since these are a part of the ABI, they should be in Documentation/ABI along with the rest. Signed-off-by: Aishwarya Pant --- Movement of sysfs interface is not absolutely necessary but this format adds some metadata (like kernel version, added date) which might be useful in scripting and tracking changes. Changes in v2: -Fix typo typr -> typo -Add context around enumerating devices' destid -Add destid attribute to list of common attributes -Edit description of binary attribute config -Add a line in Documentation/rapidio/sysfs.txt about movement of the sysfs ABI Documentation/ABI/testing/sysfs-bus-rapidio | 198 ++ Documentation/ABI/testing/sysfs-class-rapidio | 55 +++ Documentation/rapidio/sysfs.txt | 161 + 3 files changed, 256 insertions(+), 158 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-rapidio create mode 100644 Documentation/ABI/testing/sysfs-class-rapidio diff --git a/Documentation/ABI/testing/sysfs-bus-rapidio b/Documentation/ABI/testing/sysfs-bus-rapidio new file mode 100644 index ..13208b27dd87 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-rapidio @@ -0,0 +1,198 @@ +What: /sys/bus/rapidio/devices/nn:d: +Description: + For each RapidIO device, the RapidIO subsystem creates files in + an individual subdirectory with the following name format of + device_name "nn:d:", where: + + nn - two-digit hexadecimal ID of RapidIO network where the + device resides + d- device type: 'e' - for endpoint or 's' - for switch + - four-digit device destID for endpoints, or switchID for + switches + + For example, below is a list of device directories that + represents a typical RapidIO network with one switch, one host, + and two agent endpoints, as it is seen by the enumerating host + (with destID = 1): + + /sys/bus/rapidio/devices/00:e: + /sys/bus/rapidio/devices/00:e:0002 + /sys/bus/rapidio/devices/00:s:0001 + + NOTE: An enumerating or discovering endpoint does not create a + sysfs entry for itself, this is why an endpoint with destID=1 is + not shown in the list. + +Attributes Common for All RapidIO Devices +- + +What: /sys/bus/rapidio/devices/nn:d:/did +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns the device identifier + +What: /sys/bus/rapidio/devices/nn:d:/vid +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns the device vendor identifier + +What: /sys/bus/rapidio/devices/nn:d:/device_rev +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns the device revision level + +What: /sys/bus/rapidio/devices/nn:d:/asm_did +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns identifier for the assembly containing the device + +What: /sys/bus/rapidio/devices/nn:d:/asm_rev +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns revision level of the assembly containing the + device + +What: /sys/bus/rapidio/devices/nn:d:/asm_vid +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns vendor identifier of the assembly containing the + device + +What: /sys/bus/rapidio/devices/nn:d:/destid +Date: Mar, 2011 +KernelVersion: v2.6.3 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns device destination ID assigned by the enumeration + routine + +What: /sys/bus/rapidio/devices/nn:d:/lprev +Date: Mar, 2011 +KernelVersion: v2.6.39 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns name of previous device (switch) on the path to the + device that that owns this attribute + +What: /sys/bus/rapidio/devices/nn:d:/modalias +Date: Jul, 2013 +KernelVersion: v3.11 +Contact: Matt Porter , + Alexandre Boun
Re: [PATCH 2/3] power: supply: add cros-ec USB PD charger driver.
On Wed, Jan 17, 2018 at 06:59:31PM +0100, Enric Balletbo i Serra wrote: > From: Sameer Nanda > > This driver gets various bits of information about what is connected to > USB PD ports from the EC and converts that into power_supply properties. > > Signed-off-by: Sameer Nanda > Signed-off-by: Enric Balletbo i Serra > --- > drivers/power/supply/Kconfig | 11 + > drivers/power/supply/Makefile | 1 + > drivers/power/supply/cros_usbpd-charger.c | 953 > ++ > include/linux/mfd/cros_ec.h | 3 + > 4 files changed, 968 insertions(+) > create mode 100644 drivers/power/supply/cros_usbpd-charger.c > +static DEVICE_ATTR(ext_current_lim, 0664, get_ec_ext_current_lim, > +set_ec_ext_current_lim); > +static DEVICE_ATTR(ext_voltage_lim, 0664, get_ec_ext_voltage_lim, > +set_ec_ext_voltage_lim); > + Hi I see that you have added new files to the sysfs ABI. It would probably be a good idea to have these new interfaces documented in Documentation/ABI. Aishwarya > +static struct attribute *__ext_power_cmds_attrs[] = { > + &dev_attr_ext_current_lim.attr, > + &dev_attr_ext_voltage_lim.attr, > + NULL, > +};
Re: [PATCH V3] thermal: Add cooling device's statistics in sysfs
On Thu, Jan 11, 2018 at 03:06:09PM +0530, Viresh Kumar wrote: > This extends the sysfs interface for thermal cooling devices and exposes > some pretty useful statistics. These statistics have proven to be quite > useful specially while doing benchmarks related to the task scheduler, > where we want to make sure that nothing has disrupted the test, > specially the cooling device which may have put constraints on the CPUs. > The information exposed here tells us to what extent the CPUs were > constrained by the thermal framework. > > The read-only "total_trans" file shows the total number of cooling state > transitions the device has gone through since the time the cooling > device is registered or the time when statistics were reset last. > > The read-only "time_in_state_ms" file shows the time spent by the device > in the respective cooling states. > > The write-only "reset" file is used to reset the statistics. > > This is how the directory structure looks like for a single cooling > device: > > $ ls -R /sys/class/thermal/cooling_device0/ > /sys/class/thermal/cooling_device0/: > cur_state max_state power stats subsystem type uevent > > /sys/class/thermal/cooling_device0/power: > autosuspend_delay_ms runtime_active_time runtime_suspended_time > control runtime_status > > /sys/class/thermal/cooling_device0/stats: > reset time_in_state_ms total_trans > > This is tested on ARM 32-bit Hisilicon hikey620 board running Ubuntu and > ARM 64-bit Hisilicon hikey960 board running Android. > > Signed-off-by: Viresh Kumar > --- > V2->V3: > - Total number of states is max_level + 1. The earlier version didn't > take that into account and so the stats for the highest state were > missing. > > V1->V2: > - Move to sysfs from debugfs > > drivers/thermal/thermal_core.c| 3 +- > drivers/thermal/thermal_core.h| 3 + > drivers/thermal/thermal_helpers.c | 5 +- > drivers/thermal/thermal_sysfs.c | 146 > ++ > include/linux/thermal.h | 1 + > 5 files changed, 156 insertions(+), 2 deletions(-) > index 27e3b1df7360..f6eb01e99816 100644 > --- a/drivers/thermal/thermal_core.h > +++ b/drivers/thermal/thermal_core.h + > +static DEVICE_ATTR(total_trans, 0444, > thermal_cooling_device_total_trans_show, > +NULL); > +static DEVICE_ATTR(time_in_state_ms, 0444, > +thermal_cooling_device_time_in_state_show, NULL); > +static DEVICE_ATTR(reset, 0200, NULL, thermal_cooling_device_reset_store); > + Hi I can see that you have added some files to the sysfs ABI. It would be good to have these new interfaces documented in Documentation/ABI. Aishwarya
Re: Documentation: infiniband: move sysfs interface to ABI
On Tue, Jan 09, 2018 at 10:28:20AM -0700, Jason Gunthorpe wrote: > On Mon, Jan 08, 2018 at 02:23:42PM +0530, Aishwarya Pant wrote: > > Hi > > > > In Documentation/infiniband/sysfs.txt, there is a description of the > > infiniband > > sysfs interface and there also exists > > Documentation/ABI/testing/sysfs-class-infiniband which is out of date. > > > > Would it be useful to move out the interface completely from > > Documentation/infiniband/sysfs.txt to the ABI? > > It would be good, but I fear all the documentation files are variously > out of date, so it would be harder to do this task reliably without > having various rdma devices to inspect? > > But if you want to take it on, I could probably get you some sysfs > dumps from some systems to help? Yes, I think that would be useful. I might not be able to fill in the descriptions completely for all attributes but I can create a documentation skeleton for them. Aishwarya > > Jason
Re: [PATCH] drivers: firmware: xilinx: Add ZynqMP firmware driver
On Mon, Jan 08, 2018 at 02:07:07PM -0800, Jolly Shah wrote: > This patch is adding communication layer with firmware. > Firmware driver provides an interface to firmware APIs. > Interface APIs can be used by any driver to communicate to > PMUFW(Platform Management Unit). All requests go through ATF. > Firmware-debug provides debugfs interface to all APIs. > Firmware-ggs provides read/write interface to > global storage registers. > > Signed-off-by: Jolly Shah > Signed-off-by: Rajan Vaja > --- > .../firmware/xilinx/xlnx,zynqmp-firmware.txt | 16 + > arch/arm64/Kconfig.platforms |1 + > drivers/firmware/Kconfig |1 + > drivers/firmware/Makefile |1 + > drivers/firmware/xilinx/Kconfig|4 + > drivers/firmware/xilinx/Makefile |4 + > drivers/firmware/xilinx/zynqmp/Kconfig | 23 + > drivers/firmware/xilinx/zynqmp/Makefile|5 + > drivers/firmware/xilinx/zynqmp/firmware-debug.c| 540 +++ > drivers/firmware/xilinx/zynqmp/firmware-ggs.c | 298 ++ > drivers/firmware/xilinx/zynqmp/firmware.c | 1024 > > .../linux/firmware/xilinx/zynqmp/firmware-debug.h | 32 + > include/linux/firmware/xilinx/zynqmp/firmware.h| 573 +++ > 13 files changed, 2522 insertions(+) > create mode 100644 > Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt > create mode 100644 drivers/firmware/xilinx/Kconfig > create mode 100644 drivers/firmware/xilinx/Makefile > create mode 100644 drivers/firmware/xilinx/zynqmp/Kconfig > create mode 100644 drivers/firmware/xilinx/zynqmp/Makefile > create mode 100644 drivers/firmware/xilinx/zynqmp/firmware-debug.c > create mode 100644 drivers/firmware/xilinx/zynqmp/firmware-ggs.c > create mode 100644 drivers/firmware/xilinx/zynqmp/firmware.c > create mode 100644 include/linux/firmware/xilinx/zynqmp/firmware-debug.h > create mode 100644 include/linux/firmware/xilinx/zynqmp/firmware.h > > diff --git > a/Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt > b/Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt > new file mode 100644 > index 000..ace111c > --- /dev/null > +++ > b/Documentation/devicetree/bindings/firmware/xilinx/xlnx,zynqmp-firmware.txt > @@ -0,0 +1,16 @@ > +Xilinx Zynq MPSoC Firmware Device Tree Bindings > + > +The zynqmp-firmware node describes the interface to platform firmware. > + > +Required properties: > + - compatible: Must contain: "xlnx,zynqmp-firmware" > + - method: The method of calling the PM-API firmware layer. > + Permitted values are: > + - "smc" : To be used in configurations without a hypervisor > + - "hvc" : To be used when hypervisor is present > + > +Examples: > + firmware: firmware { > + compatible = "xlnx,zynqmp-firmware"; > + method = "smc"; > + }; > diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms > index 2401373..3dd3ae9 100644 > --- a/arch/arm64/Kconfig.platforms > +++ b/arch/arm64/Kconfig.platforms > @@ -273,6 +273,7 @@ config ARCH_ZX > > config ARCH_ZYNQMP > bool "Xilinx ZynqMP Family" > + select ZYNQMP_FIRMWARE > help > This enables support for Xilinx ZynqMP Family > > diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig > index fa87a055..18fc2a8 100644 > --- a/drivers/firmware/Kconfig > +++ b/drivers/firmware/Kconfig > @@ -249,5 +249,6 @@ source "drivers/firmware/google/Kconfig" > source "drivers/firmware/efi/Kconfig" > source "drivers/firmware/meson/Kconfig" > source "drivers/firmware/tegra/Kconfig" > +source "drivers/firmware/xilinx/Kconfig" > > endmenu > diff --git a/drivers/firmware/Makefile b/drivers/firmware/Makefile > index feaa890..43a24b5 100644 > --- a/drivers/firmware/Makefile > +++ b/drivers/firmware/Makefile > @@ -30,3 +30,4 @@ obj-$(CONFIG_GOOGLE_FIRMWARE) += google/ > obj-$(CONFIG_EFI)+= efi/ > obj-$(CONFIG_UEFI_CPER) += efi/ > obj-y+= tegra/ > +obj-y+= xilinx/ > diff --git a/drivers/firmware/xilinx/Kconfig b/drivers/firmware/xilinx/Kconfig > new file mode 100644 > index 000..dd3cddb > --- /dev/null > +++ b/drivers/firmware/xilinx/Kconfig > @@ -0,0 +1,4 @@ > +# SPDX-License-Identifier: GPL-2.0+ > +# Kconfig for Xilinx firmwares > + > +source "drivers/firmware/xilinx/zynqmp/Kconfig" > diff --git a/drivers/firmware/xilinx/Makefile > b/drivers/firmware/xilinx/Makefile > new file mode 100644 > index 000..aba1f86 > --- /dev/null > +++ b/drivers/firmware/xilinx/Makefile > @@ -0,0 +1,4 @@ > +# SPDX-License-Identifier: GPL-2.0+ > +# Makefile for Xilinx firmwares > + > +obj-$(CONFIG_ARCH_ZYNQMP) += zynqmp/ > diff --git a/drivers/firmware/xilinx/zynqmp/Kconfig > b/drivers/firmware
[PATCH] Documentation: rapidio: move sysfs interface to ABI
Right now, the description of the rapidio sysfs interfaces is in Documentation/rapidio/sysfs.txt. Since these are a part of the ABI, they should be in Documentation/ABI along with the rest. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-bus-rapidio | 183 ++ Documentation/ABI/testing/sysfs-class-rapidio | 55 Documentation/rapidio/sysfs.txt | 158 -- 3 files changed, 238 insertions(+), 158 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-rapidio create mode 100644 Documentation/ABI/testing/sysfs-class-rapidio delete mode 100644 Documentation/rapidio/sysfs.txt diff --git a/Documentation/ABI/testing/sysfs-bus-rapidio b/Documentation/ABI/testing/sysfs-bus-rapidio new file mode 100644 index ..9b755776c1ab --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-rapidio @@ -0,0 +1,183 @@ +What: /sys/bus/rapidio/devices/00:e: +What: /sys/bus/rapidio/devices/00:e:0002 +What: /sys/bus/rapidio/devices/00:s:0001 +Description: + For each RapidIO device, the RapidIO subsystem creates files in + an individual subdirectory with the following name format of + device_name "nn:d:", where: + + nn - two-digit hexadecimal ID of RapidIO network where the + device resides + d - device typr: 'e' - for endpoint or 's' - for switch + - four-digit device destID for endpoints, or switchID for + switches + + NOTE: An enumerating or discovering endpoint does not create a + sysfs entry for itself, this is why an endpoint with destID=1 is + not shown in the list. + +Attributes Common for All RapidIO Devices +- + +What: /sys/bus/rapidio/devices/nn:d:/did +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns the device identifier + +What: /sys/bus/rapidio/devices/nn:d:/vid +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns the device vendor identifier + +What: /sys/bus/rapidio/devices/nn:d:/device_rev +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns the device revision level + +What: /sys/bus/rapidio/devices/nn:d:/asm_did +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns identifier for the assembly containing the device + +What: /sys/bus/rapidio/devices/nn:d:/asm_rev +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns revision level of the assembly containing the + device + +What: /sys/bus/rapidio/devices/nn:d:/asm_vid +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns vendor identifier of the assembly containing the + device + +What: /sys/bus/rapidio/devices/nn:d:/lprev +Date: Mar, 2011 +KernelVersion: v2.6.39 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns name of previous device (switch) on the path to the + device that that owns this attribute + +What: /sys/bus/rapidio/devices/nn:d:/modalias +Date: Jul, 2013 +KernelVersion: v3.11 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RO) returns the device modalias + +What: /sys/bus/rapidio/devices/nn:d:/config +Date: Nov, 2005 +KernelVersion: v2.6.15 +Contact: Matt Porter , + Alexandre Bounine +Description: + (RW) reads from and writes to the device configuration + registers. Each rapidio device has a binary attribute file that + allows read/write access to the device configuration registers + using the RapidIO maintenance transactions. This attribute is + similar in behavior to the "config" attribute of PCI devices and + provides an access to the RapidIO device registers using + standard file read and write operations. + +RapidIO Switch Device Attributes + + +RapidIO switches have additional attributes in sysfs. RapidIO subsystem supports +common and device-specific sysfs attributes for switches. Because switches are +integrated
Re: Documentation: rapidio: move sysfs interface to ABI
On Mon, Jan 08, 2018 at 11:58:12AM +0300, Ozgur wrote: > > > 08.01.2018, 11:38, "Aishwarya Pant" : > > Hi > > Hello, > > > In Documentation/rapidio/sysfs.txt, there is a description of the sysfs > > interface which could be moved to Documentation/ABI (as a bus interface > > under > > testing). > > > > Would such a change be useful? > > > > The ABI documentation format looks like the following: > > > > What: (the full sysfs path of the attribute) > > Date: (date of creation) > > KernelVersion: (kernel version it first showed up in) > > Contact: (primary contact) > > Description: (long description on usage) > > Please you make the change you want after send your patch it diff format, > right? > I think a better decision can be made. This is the idea. If this change is acceptable, then I can make a patch and send it for review. Aishwarya > > > I am doing this in an exercise to move sysfs ABI interfaces (which are > > documented) to their right place i.e. in Documentation/ABI along with the > > rest. > > > > Aishwarya > > Regards > > Ozgur
Documentation: infiniband: move sysfs interface to ABI
Hi In Documentation/infiniband/sysfs.txt, there is a description of the infiniband sysfs interface and there also exists Documentation/ABI/testing/sysfs-class-infiniband which is out of date. Would it be useful to move out the interface completely from Documentation/infiniband/sysfs.txt to the ABI? The ABI documentation format looks like the following: What: (the full sysfs path of the attribute) Date: (date of creation) KernelVersion: (kernel version it first showed up in) Contact: (primary contact) Description: (long description on usage) I am doing this in an exercise to move sysfs ABI interfaces (which are documented) to their right place i.e. in Documentation/ABI along with the rest. Aishwarya
Documentation: rapidio: move sysfs interface to ABI
Hi In Documentation/rapidio/sysfs.txt, there is a description of the sysfs interface which could be moved to Documentation/ABI (as a bus interface under testing). Would such a change be useful? The ABI documentation format looks like the following: What: (the full sysfs path of the attribute) Date: (date of creation) KernelVersion: (kernel version it first showed up in) Contact: (primary contact) Description: (long description on usage) I am doing this in an exercise to move sysfs ABI interfaces (which are documented) to their right place i.e. in Documentation/ABI along with the rest. Aishwarya
[PATCH 1/5] iio: buffer: use permission specific variants of DEVICE_ATTR
This is a clean-up patch which replaces DEVICE_ATTR macro with the file permission specific DEVICE_ATTR_{RO/WO/RW} macros for compaction and readability. Done using coccinelle. Signed-off-by: Aishwarya Pant --- drivers/iio/industrialio-buffer.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c index d2b465140a6b..ca565fbcff90 100644 --- a/drivers/iio/industrialio-buffer.c +++ b/drivers/iio/industrialio-buffer.c @@ -497,7 +497,7 @@ static int iio_buffer_add_channel_sysfs(struct iio_dev *indio_dev, return ret; } -static ssize_t iio_buffer_read_length(struct device *dev, +static ssize_t length_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -507,7 +507,7 @@ static ssize_t iio_buffer_read_length(struct device *dev, return sprintf(buf, "%d\n", buffer->length); } -static ssize_t iio_buffer_write_length(struct device *dev, +static ssize_t length_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { @@ -540,7 +540,7 @@ static ssize_t iio_buffer_write_length(struct device *dev, return ret ? ret : len; } -static ssize_t iio_buffer_show_enable(struct device *dev, +static ssize_t enable_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -1117,7 +1117,7 @@ void iio_disable_all_buffers(struct iio_dev *indio_dev) iio_buffer_deactivate_all(indio_dev); } -static ssize_t iio_buffer_store_enable(struct device *dev, +static ssize_t enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) @@ -1153,7 +1153,7 @@ static ssize_t iio_buffer_store_enable(struct device *dev, static const char * const iio_scan_elements_group_name = "scan_elements"; -static ssize_t iio_buffer_show_watermark(struct device *dev, +static ssize_t watermark_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -1163,7 +1163,7 @@ static ssize_t iio_buffer_show_watermark(struct device *dev, return sprintf(buf, "%u\n", buffer->watermark); } -static ssize_t iio_buffer_store_watermark(struct device *dev, +static ssize_t watermark_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) @@ -1198,16 +1198,13 @@ static ssize_t iio_buffer_store_watermark(struct device *dev, return ret ? ret : len; } -static DEVICE_ATTR(length, S_IRUGO | S_IWUSR, iio_buffer_read_length, - iio_buffer_write_length); +static DEVICE_ATTR_RW(length); static struct device_attribute dev_attr_length_ro = __ATTR(length, - S_IRUGO, iio_buffer_read_length, NULL); -static DEVICE_ATTR(enable, S_IRUGO | S_IWUSR, - iio_buffer_show_enable, iio_buffer_store_enable); -static DEVICE_ATTR(watermark, S_IRUGO | S_IWUSR, - iio_buffer_show_watermark, iio_buffer_store_watermark); + S_IRUGO, length_show, NULL); +static DEVICE_ATTR_RW(enable); +static DEVICE_ATTR_RW(watermark); static struct device_attribute dev_attr_watermark_ro = __ATTR(watermark, - S_IRUGO, iio_buffer_show_watermark, NULL); + S_IRUGO, watermark_show, NULL); static struct attribute *iio_buffer_attrs[] = { &dev_attr_length.attr, -- 2.15.1
[PATCH 3/5] iio: trigger: use permission specific variants of DEVICE_ATTR
This is a clean-up patch which replaces DEVICE_ATTR macro with the file permission specific DEVICE_ATTR_{RO/WO/RW} macros for compaction and readability. Done using coccinelle. Signed-off-by: Aishwarya Pant --- drivers/iio/industrialio-trigger.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c index ce66699c7fcc..d24e49a4bdcc 100644 --- a/drivers/iio/industrialio-trigger.c +++ b/drivers/iio/industrialio-trigger.c @@ -39,7 +39,7 @@ static LIST_HEAD(iio_trigger_list); static DEFINE_MUTEX(iio_trigger_list_lock); /** - * iio_trigger_read_name() - retrieve useful identifying name + * name_show() - retrieve useful identifying name * @dev: device associated with the iio_trigger * @attr: pointer to the device_attribute structure that is * being processed @@ -48,7 +48,7 @@ static DEFINE_MUTEX(iio_trigger_list_lock); * Return: a negative number on failure or the number of written *characters on success. */ -static ssize_t iio_trigger_read_name(struct device *dev, +static ssize_t name_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -56,7 +56,7 @@ static ssize_t iio_trigger_read_name(struct device *dev, return sprintf(buf, "%s\n", trig->name); } -static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL); +static DEVICE_ATTR_RO(name); static struct attribute *iio_trig_dev_attrs[] = { &dev_attr_name.attr, @@ -358,7 +358,7 @@ void iio_dealloc_pollfunc(struct iio_poll_func *pf) EXPORT_SYMBOL_GPL(iio_dealloc_pollfunc); /** - * iio_trigger_read_current() - trigger consumer sysfs query current trigger + * current_trigger_show() - trigger consumer sysfs query current trigger * @dev: device associated with an industrial I/O device * @attr: pointer to the device_attribute structure that * is being processed @@ -370,7 +370,7 @@ EXPORT_SYMBOL_GPL(iio_dealloc_pollfunc); * Return: a negative number on failure, the number of characters written *on success or 0 if no trigger is available */ -static ssize_t iio_trigger_read_current(struct device *dev, +static ssize_t current_trigger_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -382,7 +382,7 @@ static ssize_t iio_trigger_read_current(struct device *dev, } /** - * iio_trigger_write_current() - trigger consumer sysfs set current trigger + * current_trigger_store() - trigger consumer sysfs set current trigger * @dev: device associated with an industrial I/O device * @attr: device attribute that is being processed * @buf: string buffer that holds the name of the trigger @@ -395,7 +395,7 @@ static ssize_t iio_trigger_read_current(struct device *dev, * Return: negative error code on failure or length of the buffer *on success */ -static ssize_t iio_trigger_write_current(struct device *dev, +static ssize_t current_trigger_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) @@ -456,9 +456,7 @@ static ssize_t iio_trigger_write_current(struct device *dev, return ret; } -static DEVICE_ATTR(current_trigger, S_IRUGO | S_IWUSR, - iio_trigger_read_current, - iio_trigger_write_current); +static DEVICE_ATTR_RW(current_trigger); static struct attribute *iio_trigger_consumer_attrs[] = { &dev_attr_current_trigger.attr, -- 2.15.1
[PATCH 5/5] iio: trigger: sysfs: use permisssion specific variants of DEVICE_ATTR
This is a clean-up patch which replaces DEVICE_ATTR macro with the file permission specific DEVICE_ATTR_{RO/WO/RW} macros for compaction and readability. Done using coccinelle. Signed-off-by: Aishwarya Pant --- drivers/iio/trigger/iio-trig-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/trigger/iio-trig-sysfs.c b/drivers/iio/trigger/iio-trig-sysfs.c index 3f0dc9a1a514..281ed6602f35 100644 --- a/drivers/iio/trigger/iio-trig-sysfs.c +++ b/drivers/iio/trigger/iio-trig-sysfs.c @@ -99,7 +99,7 @@ static void iio_sysfs_trigger_work(struct irq_work *work) iio_trigger_poll(trig->trig); } -static ssize_t iio_sysfs_trigger_poll(struct device *dev, +static ssize_t trigger_now_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct iio_trigger *trig = to_iio_trigger(dev); @@ -110,7 +110,7 @@ static ssize_t iio_sysfs_trigger_poll(struct device *dev, return count; } -static DEVICE_ATTR(trigger_now, S_IWUSR, NULL, iio_sysfs_trigger_poll); +static DEVICE_ATTR_WO(trigger_now); static struct attribute *iio_sysfs_trigger_attrs[] = { &dev_attr_trigger_now.attr, -- 2.15.1
[PATCH 4/5] iio: hrtimer: use permission specific variants of DEVICE_ATTR
This is a clean-up patch which replaces DEVICE_ATTR macro with the file permission specific DEVICE_ATTR_{RO/WO/RW} macros for compaction and readability. Done using coccinelle. Signed-off-by: Aishwarya Pant --- drivers/iio/trigger/iio-trig-hrtimer.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/iio/trigger/iio-trig-hrtimer.c b/drivers/iio/trigger/iio-trig-hrtimer.c index 7accd0187ba1..57e46669a5fb 100644 --- a/drivers/iio/trigger/iio-trig-hrtimer.c +++ b/drivers/iio/trigger/iio-trig-hrtimer.c @@ -35,7 +35,7 @@ static const struct config_item_type iio_hrtimer_type = { }; static -ssize_t iio_hrtimer_show_sampling_frequency(struct device *dev, +ssize_t sampling_frequency_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -46,7 +46,7 @@ ssize_t iio_hrtimer_show_sampling_frequency(struct device *dev, } static -ssize_t iio_hrtimer_store_sampling_frequency(struct device *dev, +ssize_t sampling_frequency_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { @@ -68,9 +68,7 @@ ssize_t iio_hrtimer_store_sampling_frequency(struct device *dev, return len; } -static DEVICE_ATTR(sampling_frequency, S_IRUGO | S_IWUSR, - iio_hrtimer_show_sampling_frequency, - iio_hrtimer_store_sampling_frequency); +static DEVICE_ATTR_RW(sampling_frequency); static struct attribute *iio_hrtimer_attrs[] = { &dev_attr_sampling_frequency.attr, -- 2.15.1
[PATCH 2/5] iio: core: use permission specific variants of DEVICE_ATTR
This is a clean-up patch which replaces DEVICE_ATTR macro with the file permission specific DEVICE_ATTR_{RO/WO/RW} macros for compaction and readability. Done using coccinelle. Signed-off-by: Aishwarya Pant --- drivers/iio/industrialio-core.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 19bdf3d2962a..d2ac544f192d 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -1253,7 +1253,7 @@ void iio_free_chan_devattr_list(struct list_head *attr_list) } } -static ssize_t iio_show_dev_name(struct device *dev, +static ssize_t name_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -1261,9 +1261,9 @@ static ssize_t iio_show_dev_name(struct device *dev, return snprintf(buf, PAGE_SIZE, "%s\n", indio_dev->name); } -static DEVICE_ATTR(name, S_IRUGO, iio_show_dev_name, NULL); +static DEVICE_ATTR_RO(name); -static ssize_t iio_show_timestamp_clock(struct device *dev, +static ssize_t current_timestamp_clock_show(struct device *dev, struct device_attribute *attr, char *buf) { @@ -1309,7 +1309,7 @@ static ssize_t iio_show_timestamp_clock(struct device *dev, return sz; } -static ssize_t iio_store_timestamp_clock(struct device *dev, +static ssize_t current_timestamp_clock_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t len) { @@ -1340,8 +1340,7 @@ static ssize_t iio_store_timestamp_clock(struct device *dev, return len; } -static DEVICE_ATTR(current_timestamp_clock, S_IRUGO | S_IWUSR, - iio_show_timestamp_clock, iio_store_timestamp_clock); +static DEVICE_ATTR_RW(current_timestamp_clock); static int iio_device_register_sysfs(struct iio_dev *indio_dev) { -- 2.15.1
[PATCH 0/5] iio: use permission specific variants of DEVICE_ATTR
Series of clean-up patches which replace all DEVICE_ATTR macros with the permission specific variants DEVICE_ATTR_{RO/WO/RW}. Patches were created using coccinelle. The following script is for conversion to the DEVICE_ATTR_RO macro and the other conversions are similar. The script may require some manual intervention when multiple attributes share the show or store function. @r@ identifier attr, show_fn; declarer name DEVICE_ATTR; @@ DEVICE_ATTR(attr, \(S_IRUGO\|0444\), show_fn, NULL); @script: python p@ attr_show; attr << r.attr; @@ // standardise the show fn name to {attr}_show coccinelle.attr_show = attr + "_show" @@ identifier r.attr, r.show_fn; declarer name DEVICE_ATTR_RO; @@ // change the attr declaration - DEVICE_ATTR(attr, \(S_IRUGO\|0444\), show_fn, NULL); + DEVICE_ATTR_RO(attr); @rr@ identifier r.show_fn, p.attr_show; @@ // rename the show function - show_fn + attr_show (...) { ... } @depends on rr@ identifier r.show_fn, p.attr_show; @@ // rename fn usages - show_fun + attr_show Aishwarya Pant (5): iio: buffer: use permission specific variants of DEVICE_ATTR iio: core: use permission specific variants of DEVICE_ATTR iio: trigger: use permission specific variants of DEVICE_ATTR iio: hrtimer: use permission specific variants of DEVICE_ATTR iio: trigger: sysfs: use permisssion specific variants of DEVICE_ATTR drivers/iio/industrialio-buffer.c | 25 +++-- drivers/iio/industrialio-core.c| 11 +-- drivers/iio/industrialio-trigger.c | 18 -- drivers/iio/trigger/iio-trig-hrtimer.c | 8 +++- drivers/iio/trigger/iio-trig-sysfs.c | 4 ++-- 5 files changed, 29 insertions(+), 37 deletions(-) -- 2.15.1
[PATCH] staging: iio: trigger: replace device_attr with device_attr_rw
This is a clean-up patch which replaces DEVICE_ATTR() macro with the file permission specific DEVICE_ATTR_RW() macro for compaction and readability. Done using coccinelle. Signed-off-by: Aishwarya Pant --- drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c index f389f5cca99d..71f11d7472c0 100644 --- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c +++ b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c @@ -78,9 +78,9 @@ static int iio_bfin_tmr_set_state(struct iio_trigger *trig, bool state) return 0; } -static ssize_t iio_bfin_tmr_frequency_store(struct device *dev, - struct device_attribute *attr, - const char *buf, size_t count) +static ssize_t frequency_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t count) { struct iio_trigger *trig = to_iio_trigger(dev); struct bfin_tmr_state *st = iio_trigger_get_drvdata(trig); @@ -116,9 +116,9 @@ static ssize_t iio_bfin_tmr_frequency_store(struct device *dev, return count; } -static ssize_t iio_bfin_tmr_frequency_show(struct device *dev, - struct device_attribute *attr, - char *buf) +static ssize_t frequency_show(struct device *dev, + struct device_attribute *attr, + char *buf) { struct iio_trigger *trig = to_iio_trigger(dev); struct bfin_tmr_state *st = iio_trigger_get_drvdata(trig); @@ -133,8 +133,7 @@ static ssize_t iio_bfin_tmr_frequency_show(struct device *dev, return sprintf(buf, "%lu\n", val); } -static DEVICE_ATTR(frequency, 0644, iio_bfin_tmr_frequency_show, - iio_bfin_tmr_frequency_store); +static DEVICE_ATTR_RW(frequency); static struct attribute *iio_bfin_tmr_trigger_attrs[] = { &dev_attr_frequency.attr, -- 2.15.1
Documentation: ksm: move sysfs interface to ABI
Hi In Documentation/vm/ksm.txt, there is a description of the kernel samepage merging sysfs interface and there also exists Documentation/ABI/testing/sysfs-kernel-mm-ksm which is out of date. Would it be useful to move out the interface from Documentation/vm/ksm.txt to the ABI? The ABI documentation format looks like the following: What: (the full sysfs path of the attribute) Date: (date of creation) KernelVersion: (kernel version it first showed up in) Contact: (primary contact) Description: (long description on usage) I am doing this in an exercise to move sysfs ABI interfaces (which are documented) to their right place i.e. in Documentation/ABI along with the rest. Aishwarya
Re: misc: bh1770glc: move sysfs interace to Documentation/ABI
On Tue, Jan 02, 2018 at 02:06:36PM +0100, Pavel Machek wrote: > Hi! > > > In Documentation/misc-devices/bh1770glc.txt, there is a description of the > > sysfs > > interface which could be moved to Documentation/ABI. > > > > Would such a change be useful? > > Not at the moment. > > > The ABI documentation format looks like the following: > > > > What: (the full sysfs path of the attribute) > > Date: (date of creation) > > KernelVersion: (kernel version it first showed up in) > > Contact: (primary contact) > > Description: (long description on usage) > > > > I am doing this in an exercise to move sysfs ABI interfaces (which are > > documented) to their right place i.e. in Documentation/ABI along with the > > rest. > > The interface should probably be changed to iio one, to be consistent > with other sensors such as Apds990x. > > If you have the hardware, help would be welcome. Yes, makes sense for this driver to be with the iio light sensors. I don't have the hardware for it. So, I won't move the sysfs interface to ABI. Aishwarya > > Pavel > -- > (english) http://www.livejournal.com/~pavelmachek > (cesky, pictures) > http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Re: Documentation: OMAPDSS: move sysfs documentation to ABI
On Tue, Jan 02, 2018 at 12:16:18PM +0200, Tomi Valkeinen wrote: > Hi, > > On 02/01/18 10:54, Aishwarya Pant wrote: > > Hi > > > > In Documentation/arm/OMAP/DSS, there is a description of the DSS and FB > > sysfs > > interfaces which could be moved to Documentation/ABI. > > > > Would such a change be useful? I can see that the sysfs interface is still > > in > > testing. > > > > The ABI documentation format looks like the following: > > > > What: (the full sysfs path of the attribute) > > Date: (date of creation) > > KernelVersion: (kernel version it first showed up in) > > Contact: (primary contact) > > Description: (long description on usage) > > > > I am doing this in an exercise to move sysfs ABI interfaces (which are > > documented) to their right place i.e. in Documentation/ABI along with the > > rest. > > The Documentation/arm/OMAP/DSS document is for omapfb driver, which is > deprecated by the omapdrm driver. I haven't maintained omapfb for some > time now, but I guess it still works ok. I hope we can drop omapfb at > some point in the future. > > There probably are still omapfb users out there, so the ABI is valid, > but I'd say it's quite at the bottom of the priority list. All right, I will drop this then. > > Tomi > > -- > Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. > Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Documentation: OMAPDSS: move sysfs documentation to ABI
Hi In Documentation/arm/OMAP/DSS, there is a description of the DSS and FB sysfs interfaces which could be moved to Documentation/ABI. Would such a change be useful? I can see that the sysfs interface is still in testing. The ABI documentation format looks like the following: What: (the full sysfs path of the attribute) Date: (date of creation) KernelVersion: (kernel version it first showed up in) Contact: (primary contact) Description: (long description on usage) I am doing this in an exercise to move sysfs ABI interfaces (which are documented) to their right place i.e. in Documentation/ABI along with the rest. Aishwarya
[PATCH 2/2] Documentation: rtc: move iotcl interface documentation to ABI
The ioctl interface should be in Documentation/ABI along with the rest of the interfaces. Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/rtc-cdev | 42 Documentation/rtc.txt | 49 ++ 2 files changed, 44 insertions(+), 47 deletions(-) create mode 100644 Documentation/ABI/testing/rtc-cdev diff --git a/Documentation/ABI/testing/rtc-cdev b/Documentation/ABI/testing/rtc-cdev new file mode 100644 index ..97447283f13b --- /dev/null +++ b/Documentation/ABI/testing/rtc-cdev @@ -0,0 +1,42 @@ +What: /dev/rtcX +Date: April 2005 +KernelVersion: 2.6.12 +Contact: linux-...@vger.kernel.org +Description: + The ioctl interface to drivers for real-time clocks (RTCs). + Following actions are supported: + + * RTC_RD_TIME, RTC_SET_TIME: Read or set the RTC time. Time + format is a Gregorian calendar date and 24 hour wall clock + time. + + * RTC_AIE_ON, RTC_AIE_OFF: Enable or disable the alarm interrupt + for RTCs that support alarms + + * RTC_ALM_READ, RTC_ALM_SET: Read or set the alarm time for + RTCs that support alarms. Can be set upto 24 hours in the + future. Requires a separate RTC_AIE_ON call to enable the + alarm interrupt. (Prefer to use RTC_WKALM_*) + + * RTC_WKALM_RD, RTC_WKALM_SET: For RTCs that support a more + powerful interface, which can issue alarms beyond 24 hours and + enable IRQs in the same request. + + * RTC_PIE_ON, RTC_PIE_OFF: Enable or disable the periodic + interrupt for RTCs that support periodic interrupts. + + * RTC_UIE_ON, RTC_UIE_OFF: Enable or disable the update + interrupt for RTCs that support it. + + * RTC_IRQP_READ, RTC_IRQP_SET: Read or set the frequency for + periodic interrupts for RTCs that support periodic interrupts. + Requires a separate RTC_PIE_ON call to enable the periodic + interrupts. + + The ioctl() calls supported by the older /dev/rtc interface are + also supported by the newer RTC class framework. However, + because the chips and systems are not standardized, some PC/AT + functionality might not be provided. And in the same way, some + newer features -- including those enabled by ACPI -- are exposed + by the RTC class framework, but can't be supported by the older + driver. diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index f521262cdc85..a129acf38537 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt @@ -136,50 +136,5 @@ a high functionality RTC is integrated into the SOC. That system might read the system clock from the discrete RTC, but use the integrated one for all other tasks, because of its greater functionality. -IOCTL interface - -The ioctl() calls supported by /dev/rtc are also supported by the RTC class -framework. However, because the chips and systems are not standardized, -some PC/AT functionality might not be provided. And in the same way, some -newer features -- including those enabled by ACPI -- are exposed by the -RTC class framework, but can't be supported by the older driver. - -* RTC_RD_TIME, RTC_SET_TIME ... every RTC supports at least reading - time, returning the result as a Gregorian calendar date and 24 hour - wall clock time. To be most useful, this time may also be updated. - -* RTC_AIE_ON, RTC_AIE_OFF, RTC_ALM_SET, RTC_ALM_READ ... when the RTC - is connected to an IRQ line, it can often issue an alarm IRQ up to - 24 hours in the future. (Use RTC_WKALM_* by preference.) - -* RTC_WKALM_SET, RTC_WKALM_RD ... RTCs that can issue alarms beyond - the next 24 hours use a slightly more powerful API, which supports - setting the longer alarm time and enabling its IRQ using a single - request (using the same model as EFI firmware). - -* RTC_UIE_ON, RTC_UIE_OFF ... if the RTC offers IRQs, the RTC framework - will emulate this mechanism. - -* RTC_PIE_ON, RTC_PIE_OFF, RTC_IRQP_SET, RTC_IRQP_READ ... these icotls - are emulated via a kernel hrtimer. - -In many cases, the RTC alarm can be a system wake event, used to force -Linux out of a low power sleep state (or hibernation) back to a fully -operational state. For example, a system could enter a deep power saving -state until it's time to execute some scheduled tasks. - -Note that many of these ioctls are handled by the common rtc-dev interface. -Some common examples: - -* RTC_RD_TIME, RTC_SET_TIME: the read_time/set_time functions will be - called with appropriate values. - -* RTC_ALM_SE
[PATCH 1/2] Documentation: rtc: add sysfs file permissions
Annotate the sysfs interface of rtc with file specific permissions (RO/RW). Signed-off-by: Aishwarya Pant --- Documentation/ABI/testing/sysfs-class-rtc | 44 --- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-rtc b/Documentation/ABI/testing/sysfs-class-rtc index df2eca7e2e77..5083841b03d4 100644 --- a/Documentation/ABI/testing/sysfs-class-rtc +++ b/Documentation/ABI/testing/sysfs-class-rtc @@ -18,14 +18,14 @@ Date: March 2006 KernelVersion: 2.6.17 Contact: linux-...@vger.kernel.org Description: - RTC-provided date in -MM-DD format + (RO) RTC-provided date in -MM-DD format What: /sys/class/rtc/rtcX/hctosys Date: September 2009 KernelVersion: 2.6.32 Contact: linux-...@vger.kernel.org Description: - 1 if the RTC provided the system time at boot via the + (RO) 1 if the RTC provided the system time at boot via the CONFIG_RTC_HCTOSYS kernel option, 0 otherwise What: /sys/class/rtc/rtcX/max_user_freq @@ -33,7 +33,7 @@ Date: October 2007 KernelVersion: 2.6.24 Contact: linux-...@vger.kernel.org Description: - The maximum interrupt rate an unprivileged user may request + (RW) The maximum interrupt rate an unprivileged user may request from this RTC. What: /sys/class/rtc/rtcX/name @@ -41,58 +41,60 @@ Date: March 2006 KernelVersion: 2.6.17 Contact: linux-...@vger.kernel.org Description: - The name of the RTC corresponding to this sysfs directory + (RO) The name of the RTC corresponding to this sysfs directory What: /sys/class/rtc/rtcX/range Date: January 2018 KernelVersion: 4.16 Contact: linux-...@vger.kernel.org Description: - Valid time range for the RTC, as seconds from epoch, formatted - as [min, max] + (RO) Valid time range for the RTC, as seconds from epoch, + formatted as [min, max] What: /sys/class/rtc/rtcX/since_epoch Date: March 2006 KernelVersion: 2.6.17 Contact: linux-...@vger.kernel.org Description: - RTC-provided time as the number of seconds since the epoch + (RO) RTC-provided time as the number of seconds since the epoch What: /sys/class/rtc/rtcX/time Date: March 2006 KernelVersion: 2.6.17 Contact: linux-...@vger.kernel.org Description: - RTC-provided time in 24-hour notation (hh:mm:ss) + (RO) RTC-provided time in 24-hour notation (hh:mm:ss) What: /sys/class/rtc/rtcX/*/nvmem Date: February 2016 KernelVersion: 4.6 Contact: linux-...@vger.kernel.org Description: - The non volatile storage exported as a raw file, as described in - Documentation/nvmem/nvmem.txt + (RW) The non volatile storage exported as a raw file, as + described in Documentation/nvmem/nvmem.txt What: /sys/class/rtc/rtcX/offset Date: February 2016 KernelVersion: 4.6 Contact: linux-...@vger.kernel.org Description: - The amount which the rtc clock has been adjusted in firmware. - Visible only if the driver supports clock offset adjustment. - The unit is parts per billion, i.e. The number of clock ticks - which are added to or removed from the rtc's base clock per - billion ticks. A positive value makes a day pass more slowly, - longer, and a negative value makes a day pass more quickly. + (RW) The amount which the rtc clock has been adjusted in + firmware. Visible only if the driver supports clock offset + adjustment. The unit is parts per billion, i.e. The number of + clock ticks which are added to or removed from the rtc's base + clock per billion ticks. A positive value makes a day pass more + slowly, longer, and a negative value makes a day pass more + quickly. What: /sys/class/rtc/rtcX/wakealarm Date: February 2007 KernelVersion: 2.6.20 Contact: linux-...@vger.kernel.org Description: - The time at which the clock will generate a system wakeup event. - This is a one shot wakeup event, so must be reset after wake if - a daily wakeup is required. Format is seconds since the epoch by - default, or if there's a leading +, seconds in the future, or if - there is a leading +=, seconds ahead of the current alarm. + (RW) The time at which the clock will generate a system wakeup + event. This is a one shot wakeup event, so must be reset after +
[PATCH 0/2] Documentation: rtc: move ioctl to ABI
Two documentation changes in rtc: 1) Minor change to add file permissions to sysfs interface 2) Move ioctl interface to Documentation/ABI Aishwarya Pant (2): Documentation: rtc: add sysfs file permissions Documentation: rtc: move iotcl interface documentation to ABI Documentation/ABI/testing/rtc-cdev| 42 ++ Documentation/ABI/testing/sysfs-class-rtc | 44 ++- Documentation/rtc.txt | 49 ++- 3 files changed, 67 insertions(+), 68 deletions(-) create mode 100644 Documentation/ABI/testing/rtc-cdev -- 2.15.1
[PATCH] rtc: sysfs: move sysfs & ioctl interface to Documentation/ABI
Right now, the decription of the rtc and sysfs interfaces is in Documentation/rtc.txt. Since these are a part of the ABI, they should be in Documentation/ABI along with the rest. Signed-off-by: Aishwarya Pant --- Let me know if the contact information should be different. I picked up the module author of drivers/rtc/rtc-sysfs.c as the primary contact of the interfaces. Documentation/ABI/stable/rtc | 135 +++ Documentation/rtc.txt| 80 + 2 files changed, 136 insertions(+), 79 deletions(-) create mode 100644 Documentation/ABI/stable/rtc diff --git a/Documentation/ABI/stable/rtc b/Documentation/ABI/stable/rtc new file mode 100644 index ..799003dfb86e --- /dev/null +++ b/Documentation/ABI/stable/rtc @@ -0,0 +1,135 @@ +SYSFS interface +--- + +The sysfs interface provides access to various +rtc attributes without requiring the use of ioctls. All dates and times +are in the RTC's timezone, rather than in system time. + +What: /sys/class/rtc/rtc[0-*]/date +Date: March 2006 +KernelVersion: 2.6.17 +Contact: Alexandre Belloni +Description: (RO) RTC-provided date + +What: /sys/class/rtc/rtc[0-*]/name +Date: March 2006 +KernelVersion: 2.6.17 +Contact: Alexandre Belloni +Description: (RO) The name of the RTC corresponding to this sysfs directory. + +What: /sys/class/rtc/rtc[0-*]/time +Date: March 2006 +KernelVersion: 2.6.17 +Contact: Alexandre Belloni +Description: (RO) RTC-provided time + +What: /sys/class/rtc/rtc[0-*]/since_epoch +Date: March 2006 +KernelVersion: 2.6.17 +Contact: Alexandre Belloni +Description: (RO) The number of seconds since the epoch according to the RTC. + +What: /sys/class/rtc/rtc[0-*]/wakealarm +Date: February 2007 +KernelVersion: 2.6.21 +Contact: Alexandre Belloni +Description: (RW) The time at which the clock will generate a system wakeup +event. This is a one shot wakeup event, so must be reset +after wake if a daily wakeup is required. Format is seconds +since the epoch by default, or if there's a leading +, seconds +in the future, or if there is a leading +=, seconds ahead of +the current alarm. + +What: /sys/class/rtc/rtc[0-*]/max_user_freq +Date: October 2007 +KernelVersion: 2.6.24 +Contact: Alexandre Belloni +Description: (RW) The maximum interrupt rate an unprivileged user may request +from this RTC. + +What: /sys/class/rtc/rtc[0-*]/hctosys +Date: September 2009 +KernelVersion: 2.6.32 +Contact: Alexandre Belloni +Description: (RO) 1 if the RTC provided the system time at boot via the +CONFIG_RTC_HCTOSYS kernel option, 0 otherwise. + +What: /sys/class/rtc/rtc[0-*]/offset +Date: February 2016 +KernelVersion: 4.6 +Contact: Alexandre Belloni +Description: (RW) The amount which the rtc clock has been adjusted in firmware. +Visible only if the driver supports clock offset adjustment. +The unit is parts per billion, i.e. The number of clock ticks +which are added to or removed from the rtc's base clock per +billion ticks. A positive value makes a day pass more slowly, +longer, and a negative value makes a day pass more quickly. + +What: /sys/bus/nvmem/devices/dev-name/nvmem +Date: July 2017 +KernelVersion: 4.13 +Contact: Alexandre Belloni +Description: (RW) The non volatile storage exported as a raw file, as described +in Documentation/nvmem/nvmem.txt. The previous ABI +/sys/class/rtc/rtc[0-*]/device/nvram will be deprecated. + +IOCTL interface +--- + +What: /dev/rtc[0-*] +Date: April 2005 +KernelVersion: 2.6.12 +Contact: Alexandre Belloni +Description: The ioctl() calls supported by /dev/rtc are also supported by + the RTC class framework. However, because the chips and systems + are not standardized, some PC/AT functionality might not be + provided. And in the same way, some newer features -- including + those enabled by ACPI -- are exposed by the RTC class framework, + but can't be supported by the older driver. + + * RTC_RD_TIME, RTC_SET_TIME ... every RTC supports at + least reading time, returning the result as a Gregorian + calendar date and 24 hour wall clock time. To be most + useful, this time may also be updated. + + * RTC_AIE_ON, RTC_AIE_OFF, RTC_ALM_SET, RTC_ALM_READ ... + when the RTC is connected to an IRQ line, it can often + issue an alarm I
Re: rtc: sysfs: move sysfs interface to Documentation/ABI
On Thu, Dec 28, 2017 at 05:23:33PM +0300, Ozgur wrote: > > > 28.12.2017, 17:22, "Ozgur" : > > 28.12.2017, 16:31, "Aishwarya Pant" : > >> Hi > > Hello, > > >> In Documentation/rtc.txt, there is a description of the sysfs > >> interface which could be moved to Documentation/ABI. > >> > >> Would such a change be useful? > >> > >> The ABI documentation format looks like the following: > >> > >> What: (the full sysfs path of the attribute) > >> Date: (date of creation) > >> KernelVersion: (kernel version it first showed up in) > >> Contact: (primary contact) > >> Description: (long description on usage) > >> > >> I am doing this in an exercise to move sysfs ABI interfaces (which are > >> documented) to their right place i.e. in Documentation/ABI along with the > >> rest. > > Do I understand right? Are you want to make the rtc.txt part the same format > as ABI folder? > for example create to RTC folder and add /dev/rtc what, date, kernelversion, > contact right? Yes I mentioned just the sysfs interface. But both ioctl and sysfs interface should be there in Documentation/ABI. There could a new file called sysfs-rtc in Documentation/ABI/stable with both these interfaces. > > This can be a good idea and I can help. Sure thanks. I can maybe send a patch with these changes. One question: who should be the primary contact for this ABI? > > >> Aishwarya > > Ozgur
rtc: sysfs: move sysfs interface to Documentation/ABI
Hi In Documentation/rtc.txt, there is a description of the sysfs interface which could be moved to Documentation/ABI. Would such a change be useful? The ABI documentation format looks like the following: What: (the full sysfs path of the attribute) Date: (date of creation) KernelVersion: (kernel version it first showed up in) Contact: (primary contact) Description: (long description on usage) I am doing this in an exercise to move sysfs ABI interfaces (which are documented) to their right place i.e. in Documentation/ABI along with the rest. Aishwarya
misc: bh1770glc: move sysfs interace to Documentation/ABI
Hi In Documentation/misc-devices/bh1770glc.txt, there is a description of the sysfs interface which could be moved to Documentation/ABI. Would such a change be useful? The ABI documentation format looks like the following: What: (the full sysfs path of the attribute) Date: (date of creation) KernelVersion: (kernel version it first showed up in) Contact: (primary contact) Description: (long description on usage) I am doing this in an exercise to move sysfs ABI interfaces (which are documented) to their right place i.e. in Documentation/ABI along with the rest. Aishwarya
[PATCH] hwmon: (sht3x) move sysfs documentation to Documentation/ABI
The sysfs documentation for sht3x devices should be with the rest of the interfaces in Documentation/ABI. The motivation behind this is that documentation should be where the user expects it to be, rather than where the developer expects it to be. ABI documentation requires a specific format and this is how the information in it was filled- What: sht3x is an i2c device so it would be connected to the i2c bus Date: from the commit date that introduced the attribute KernelVersion: from the first stable version git tag that contains the commit Contact:module author(s) Description:from Documentation/hwmon/sht3x Signed-off-by: Aishwarya Pant --- There are things that might be wrong here and I am unsure of- 1. Whether this file should be in stable or testing? 2. Contact information, full sysfs path etc I am doing this is in an exercise to move sysfs documentation to its right place and identify places where it might be missing. hwmon drivers seem to have a quite nice documentation, but just not in the ABI format. Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x | 128 + Documentation/hwmon/sht3x | 25 2 files changed, 128 insertions(+), 25 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x diff --git a/Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x b/Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x new file mode 100644 index ..0e8355c625f5 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-bus-i2c-hwmon-sht3x @@ -0,0 +1,128 @@ +What: /sys/bus/i2c/devices/.../temp1_input +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RO) Temperature input value + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_max +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RW) Temperature max value. + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_max_hyst +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RW) Temperature hysteresis value for max limit + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_min +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RW) Temperature min value + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_min_hyst +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RW) Temperature hysteresis value for min limit. + Unit: millidegree Celsius + +What: /sys/bus/i2c/devices/.../temp1_alarm +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RO) Channel alarm + 0: no alarm + 1: alarm is set when the temperature is outside the configured + limits. + Only works in periodic measure mode + +What: /sys/bus/i2c/devices/.../humidity1_input +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RO) humidity input + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_max +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RW) humidity max value + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_max_hyst +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RW) humidity hysteresis value for max limit + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_min +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RW) humidity min value + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_min_hyst +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RW) humidity hysteresis value for min limit + Unit: milli-percent + +What: /sys/bus/i2c/devices/.../humidity1_alarm +Date: June 2016 +KernelVersion: 4.8 +Contact: David Frey , + Pascal Sachs +Description:(RO) humidity alarm + 0: no alarm + 1: alarm is set when the humidity is outside the configured + limits + Only works in periodic measure mode + +What: /sys/bus/i2c/devices/.../heater_enable +Date: July
Re: [PATCH] staging: fbtft: replace __ATTR() with DEVICE_ATTR()
On Wed, Dec 13, 2017 at 12:50:00PM +0100, Greg Kroah-Hartman wrote: > On Mon, Dec 11, 2017 at 03:24:30PM +0530, Aishwarya Pant wrote: > > This is a clean-up patch which replaces the uses of raw __ATTR(...) > > macro with the more conventional DEVICE_ATTR(...) for defining device > > attributes. > > > > Done using coccinelle- > > > > @r@ > > identifier foo, n; > > @@ > > > > struct device_attribute foo = __ATTR(n, ...); > > > > @script:python p@ > > id; > > foo << r.foo; > > n << r.n; > > @@ > > > > // standardise the variable name to dev_attr_{name} > > coccinelle.id = "dev_attr_" + n > > > > @@ > > identifier r.foo; > > declarer name DEVICE_ATTR; > > @@ > > > > //change definition > > - struct device_attribute foo = __ATTR > > + DEVICE_ATTR > > (...); > > > > @depends on r@ > > identifier r.foo, p.id; > > @@ > > > > // replace usages everywhere > > - foo > > + id > > > > Signed-off-by: Aishwarya Pant > > --- > > drivers/staging/fbtft/fbtft-sysfs.c | 7 +++ > > 1 file changed, 3 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/staging/fbtft/fbtft-sysfs.c > > b/drivers/staging/fbtft/fbtft-sysfs.c > > index 712096659aa0..506d604d01bb 100644 > > --- a/drivers/staging/fbtft/fbtft-sysfs.c > > +++ b/drivers/staging/fbtft/fbtft-sysfs.c > > @@ -197,19 +197,18 @@ static ssize_t show_debug(struct device *device, > > return snprintf(buf, PAGE_SIZE, "%lu\n", par->debug); > > } > > > > -static struct device_attribute debug_device_attr = > > - __ATTR(debug, 0660, show_debug, store_debug); > > +static DEVICE_ATTR(debug, 0660, show_debug, store_debug); > > This should be DEVICE_ATTR_RW(), right? 0660 makes no sense... If it doesn't make sense here, I can replace it with DEVICE_ATTR_RW. Though, 0660 has more open permissions than 0644. > > thanks, > > greg k-h
[PATCH] staging: atomisp2: replace DEVICE_ATTR with DEVICE_ATTR_RO
This is a clean-up patch which replaces DEVICE_ATTR() macro with file permission specific DEVICE_ATTR_RO() macro for compaction and readability. Done using coccinelle: @r@ identifier attr, show_fn; declarer name DEVICE_ATTR; @@ DEVICE_ATTR(attr, \(S_IRUGO\|0444\), show_fn, NULL); @script: python p@ attr_show; attr << r.attr; @@ // standardise the show fn name to {attr}_show coccinelle.attr_show = attr + "_show" @@ identifier r.attr, r.show_fn; declarer name DEVICE_ATTR_RO; @@ // change the attr declaration - DEVICE_ATTR(attr, \(S_IRUGO\|0444\), show_fn, NULL); + DEVICE_ATTR_RO(attr); @rr@ identifier r.show_fn, p.attr_show; @@ // rename the show function - show_fn + attr_show (...) { ... } @depends on rr@ identifier r.show_fn, p.attr_show; @@ // rename fn usages - show_fun + attr_show Signed-off-by: Aishwarya Pant --- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c index a1c81c12718c..4338b8a1309f 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm.c @@ -158,10 +158,10 @@ static ssize_t dynamic_pool_show(struct device *dev, return ret; }; -static DEVICE_ATTR(active_bo, 0444, active_bo_show, NULL); -static DEVICE_ATTR(free_bo, 0444, free_bo_show, NULL); -static DEVICE_ATTR(reserved_pool, 0444, reserved_pool_show, NULL); -static DEVICE_ATTR(dynamic_pool, 0444, dynamic_pool_show, NULL); +static DEVICE_ATTR_RO(active_bo); +static DEVICE_ATTR_RO(free_bo); +static DEVICE_ATTR_RO(reserved_pool); +static DEVICE_ATTR_RO(dynamic_pool); static struct attribute *sysfs_attrs_ctrl[] = { &dev_attr_active_bo.attr, -- 2.15.1
[PATCH] staging: fbtft: replace __ATTR() with DEVICE_ATTR()
This is a clean-up patch which replaces the uses of raw __ATTR(...) macro with the more conventional DEVICE_ATTR(...) for defining device attributes. Done using coccinelle- @r@ identifier foo, n; @@ struct device_attribute foo = __ATTR(n, ...); @script:python p@ id; foo << r.foo; n << r.n; @@ // standardise the variable name to dev_attr_{name} coccinelle.id = "dev_attr_" + n @@ identifier r.foo; declarer name DEVICE_ATTR; @@ //change definition - struct device_attribute foo = __ATTR + DEVICE_ATTR (...); @depends on r@ identifier r.foo, p.id; @@ // replace usages everywhere - foo + id Signed-off-by: Aishwarya Pant --- drivers/staging/fbtft/fbtft-sysfs.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/fbtft/fbtft-sysfs.c b/drivers/staging/fbtft/fbtft-sysfs.c index 712096659aa0..506d604d01bb 100644 --- a/drivers/staging/fbtft/fbtft-sysfs.c +++ b/drivers/staging/fbtft/fbtft-sysfs.c @@ -197,19 +197,18 @@ static ssize_t show_debug(struct device *device, return snprintf(buf, PAGE_SIZE, "%lu\n", par->debug); } -static struct device_attribute debug_device_attr = - __ATTR(debug, 0660, show_debug, store_debug); +static DEVICE_ATTR(debug, 0660, show_debug, store_debug); void fbtft_sysfs_init(struct fbtft_par *par) { - device_create_file(par->info->dev, &debug_device_attr); + device_create_file(par->info->dev, &dev_attr_debug); if (par->gamma.curves && par->fbtftops.set_gamma) device_create_file(par->info->dev, &gamma_device_attrs[0]); } void fbtft_sysfs_exit(struct fbtft_par *par) { - device_remove_file(par->info->dev, &debug_device_attr); + device_remove_file(par->info->dev, &dev_attr_debug); if (par->gamma.curves && par->fbtftops.set_gamma) device_remove_file(par->info->dev, &gamma_device_attrs[0]); } -- 2.15.1
[PATCH v2] coccinelle: boolconv: improve script to handle more cases
Given expressions A, B and a binary operator op, the current script checks for cases where A op B ? true : false can be replaced by A op B This can be extended to handle the other case where A op B ? false : true can be replaced by !(A op B) Moreover we can use the binary operator type to catch all desirable comparisons in one go instead of writing them down. Signed-off-by: Aishwarya Pant Acked-by: Julia Lawall --- Changes in v2: Re-send after addding the appropriate mailing lists scripts/coccinelle/misc/boolconv.cocci | 43 -- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/scripts/coccinelle/misc/boolconv.cocci b/scripts/coccinelle/misc/boolconv.cocci index 33c464d6bc71..9b32b5fd31d4 100644 --- a/scripts/coccinelle/misc/boolconv.cocci +++ b/scripts/coccinelle/misc/boolconv.cocci @@ -16,27 +16,19 @@ virtual report @depends on patch@ expression A, B; +binary operator op = {==,!=,>,<,>=,<=,&&,||}; symbol true, false; @@ ( - A == B -| - A != B -| - A > B -| - A < B -| - A >= B -| - A <= B -| - A && B + A op B +- ? true : false | - A || B ++ !( + A op B ++ ) +- ? false : true ) -- ? true : false //-- // For context mode @@ -44,28 +36,13 @@ symbol true, false; @r depends on !patch@ expression A, B; +binary operator op = {==,!=,>,<,>=,<=,&&,||}; symbol true, false; position p; @@ -( - A == B -| - A != B -| - A > B -| - A < B -| - A >= B -| - A <= B -| - A && B -| - A || B -) -* ? true : false@p + A op B +* ? \(true\|false\) : \(false@p\|true@p\) //-- // For org mode -- 2.11.0
[PATCH v3 2/2] staging: atomisp: cleanup out of memory messages
Logging of explicit out of memory messages is redundant since memory allocation failures produce a backtrace. Done with the help of the following cocci script: @@ expression ex, ret; statement s; constant char[] c; constant err; identifier f, l; @@ ex = \(kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ... when != ex if ( ( !ex | unlikely(!ex) ) ) - { - f(..., c, ...); ( return ex; | return; | return err; | goto l; ) - } else s Another case where if branch has multiple statements was handled with the following condition: { ... - f(..., c, ...); ... } Signed-off-by: Aishwarya Pant --- Changes in v3: Rebase changes over atomisp-next branch of the media tree drivers/staging/media/atomisp/i2c/atomisp-ap1302.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c| 4 +--- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 4 +--- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 4 +--- drivers/staging/media/atomisp/i2c/imx/imx.c| 4 +--- drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 +--- drivers/staging/media/atomisp/i2c/ov8858.c | 6 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 9 ++--- .../media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c| 10 ++ .../staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c | 6 +- .../staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 5 + drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_vm.c| 4 +--- .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 4 +--- 18 files changed, 20 insertions(+), 68 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-ap1302.c b/drivers/staging/media/atomisp/i2c/atomisp-ap1302.c index 2f772a020c8b..bfbf85122c3b 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-ap1302.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-ap1302.c @@ -1153,10 +1153,8 @@ static int ap1302_probe(struct i2c_client *client, /* allocate device & init sub device */ dev = devm_kzalloc(&client->dev, sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&client->dev, "%s: out of memory\n", __func__); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c index 35ed51ffe944..291565451bfe 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c @@ -1385,10 +1385,8 @@ static int gc0310_probe(struct i2c_client *client, pr_info("%s S\n", __func__); dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&client->dev, "out of memory\n"); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c index e43d31ea9676..f51535eee091 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-gc2235.c @@ -1123,10 +1123,8 @@ static int gc2235_probe(struct i2c_client *client, unsigned int i; dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&client->dev, "out of memory\n"); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c index 679176f7c542..37876d245a02 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c +++ b/drivers/staging/media/atomisp/i2c/atomisp-lm3554.c @@ -871,10 +871,8 @@ static int lm3554_probe(struct i2c_client *client, int ret; flash = kzalloc(sizeof(*flash), GFP_KERNEL); - if (!flash) { - dev_err(&client->dev, "out of memory\n"); + if (!flash) return -ENOMEM; - } flash->pdata = client->dev.platform_data; diff --git a/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c b/drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c index 3c837cb8859c..e204238ae06b 100644 --- a/drivers/staging/media/atomisp/i2c/atomisp-mt9m11
[PATCH v3 1/2] staging: atomisp2: cleanup null check on memory allocation
For memory allocation functions that fail with a NULL return value, it is preferred to use the (!x) test in place of (x == NULL). Changes in atomisp2/css2400/sh_css.c were done by hand. Done with the help of the following cocci script: @@ type T; T* p; statement s,s1; @@ p = \(devm_kzalloc\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\| kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ...when != p if ( - p == NULL + !p ) s else s1 Signed-off-by: Aishwarya Pant Acked-by: Julia Lawall -- Changes in v3: Rebase changes over atomisp-next branch of the media tree Changes in atomisp2/css2400/sh_css.c were done by hand, the above script was not able to match the pattern if (a->b != null). --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 36 +++--- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 7 ++--- .../pci/atomisp2/css2400/sh_css_param_shading.c| 2 +- 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index bee30438e6fd..e61009faff27 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c @@ -5605,13 +5605,13 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe) mycs->num_yuv_scaler = cas_scaler_descr.num_stage; mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage * sizeof(struct ia_css_binary), GFP_KERNEL); - if (mycs->yuv_scaler_binary == NULL) { + if (!mycs->yuv_scaler_binary) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; return err; } mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage * sizeof(bool), GFP_KERNEL); - if (mycs->is_output_stage == NULL) { + if (!mycs->is_output_stage) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; return err; } @@ -6256,14 +6256,14 @@ static enum ia_css_err load_primary_binaries( mycs->num_yuv_scaler = cas_scaler_descr.num_stage; mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage * sizeof(struct ia_css_binary), GFP_KERNEL); - if (mycs->yuv_scaler_binary == NULL) { + if (!mycs->yuv_scaler_binary) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; IA_CSS_LEAVE_ERR_PRIVATE(err); return err; } mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage * sizeof(bool), GFP_KERNEL); - if (mycs->is_output_stage == NULL) { + if (!mycs->is_output_stage) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; IA_CSS_LEAVE_ERR_PRIVATE(err); return err; @@ -6980,27 +6980,27 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output( } descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->in_info == NULL) { + if (!descr->in_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->internal_out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->internal_out_info == NULL) { + if (!descr->internal_out_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->out_info == NULL) { + if (!descr->out_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->vf_info == NULL) { + if (!descr->vf_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL); - if (descr->is_output_stage == NULL) { + if (!descr->is_output_stage) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } @@ -7116,22 +7116,22 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi descr->num_stage = num_stages; descr->in_info = kmalloc(descr->num_stage *
[PATCH v3 0/2] staging: atomisp: memory allocation cleanups
Patch series performs minor code cleanups using coccinelle to simplify memory allocation tests and remove redundant OOM log messages. Changes in v3: Rebase changes over atomisp-next branch of the media tree Changes in v2: Rebase and re-send patches Aishwarya Pant (2): staging: atomisp2: cleanup null check on memory allocation staging: atomisp: cleanup out of memory messages drivers/staging/media/atomisp/i2c/atomisp-ap1302.c | 4 +-- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 4 +-- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 4 +-- drivers/staging/media/atomisp/i2c/atomisp-lm3554.c | 4 +-- .../staging/media/atomisp/i2c/atomisp-mt9m114.c| 4 +-- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 4 +-- drivers/staging/media/atomisp/i2c/atomisp-ov2722.c | 4 +-- drivers/staging/media/atomisp/i2c/imx/imx.c| 4 +-- .../media/atomisp/i2c/ov5693/atomisp-ov5693.c | 4 +-- drivers/staging/media/atomisp/i2c/ov8858.c | 6 +--- .../media/atomisp/pci/atomisp2/atomisp_fops.c | 4 +-- .../media/atomisp/pci/atomisp2/atomisp_ioctl.c | 9 ++ .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 36 +++--- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 7 ++--- .../pci/atomisp2/css2400/sh_css_param_shading.c| 4 +-- .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c| 10 ++ .../atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c| 6 +--- .../atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 5 +-- .../media/atomisp/pci/atomisp2/hmm/hmm_vm.c| 4 +-- .../platform/intel-mid/atomisp_gmin_platform.c | 4 +-- 20 files changed, 41 insertions(+), 90 deletions(-) -- 2.11.0
[PATCH v2 2/2] staging: atomisp: cleanup out of memory messages
Logging of explicit out of memory messages is redundant since memory allocation failures produce a backtrace. Done with the help of the following cocci script: @@ expression ex, ret; statement s; constant char[] c; constant err; identifier f, l; @@ ex = \(kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ... when != ex if ( ( !ex | unlikely(!ex) ) ) - { - f(..., c, ...); ( return ex; | return; | return err; | goto l; ) - } else s Another case where if branch has multiple statements was handled with the following condition: { ... - f(..., c, ...); ... } Signed-off-by: Aishwarya Pant --- v2 changes: None, just rebase and re-send drivers/staging/media/atomisp/i2c/ap1302.c | 4 +--- drivers/staging/media/atomisp/i2c/gc0310.c | 4 +--- drivers/staging/media/atomisp/i2c/gc2235.c | 4 +--- drivers/staging/media/atomisp/i2c/imx/imx.c| 4 +--- drivers/staging/media/atomisp/i2c/lm3554.c | 4 +--- drivers/staging/media/atomisp/i2c/mt9m114.c| 4 +--- drivers/staging/media/atomisp/i2c/ov2680.c | 4 +--- drivers/staging/media/atomisp/i2c/ov2722.c | 4 +--- drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 4 +--- drivers/staging/media/atomisp/i2c/ov8858.c | 6 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 9 ++--- .../media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c| 10 ++ .../staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c | 6 +- .../staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 5 + drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_vm.c| 4 +--- .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 4 +--- 18 files changed, 20 insertions(+), 68 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/ap1302.c b/drivers/staging/media/atomisp/i2c/ap1302.c index 2f772a020c8b..bfbf85122c3b 100644 --- a/drivers/staging/media/atomisp/i2c/ap1302.c +++ b/drivers/staging/media/atomisp/i2c/ap1302.c @@ -1153,10 +1153,8 @@ static int ap1302_probe(struct i2c_client *client, /* allocate device & init sub device */ dev = devm_kzalloc(&client->dev, sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&client->dev, "%s: out of memory\n", __func__); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/gc0310.c b/drivers/staging/media/atomisp/i2c/gc0310.c index 35ed51ffe944..291565451bfe 100644 --- a/drivers/staging/media/atomisp/i2c/gc0310.c +++ b/drivers/staging/media/atomisp/i2c/gc0310.c @@ -1385,10 +1385,8 @@ static int gc0310_probe(struct i2c_client *client, pr_info("%s S\n", __func__); dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&client->dev, "out of memory\n"); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c index e43d31ea9676..f51535eee091 100644 --- a/drivers/staging/media/atomisp/i2c/gc2235.c +++ b/drivers/staging/media/atomisp/i2c/gc2235.c @@ -1123,10 +1123,8 @@ static int gc2235_probe(struct i2c_client *client, unsigned int i; dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&client->dev, "out of memory\n"); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/imx/imx.c b/drivers/staging/media/atomisp/i2c/imx/imx.c index 49ab0af87096..957fb1863b40 100644 --- a/drivers/staging/media/atomisp/i2c/imx/imx.c +++ b/drivers/staging/media/atomisp/i2c/imx/imx.c @@ -2365,10 +2365,8 @@ static int imx_probe(struct i2c_client *client, /* allocate sensor device & init sub device */ dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) { - v4l2_err(client, "%s: out of memory\n", __func__); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/lm3554.c b/drivers/staging/media/atomisp/i2c/lm3554.c index 679176f7c542..37876d245a02 100644 --- a/drivers/staging/media/atomisp/i2c/lm3554.c +++ b/drivers/staging/media/atomisp/i2c/lm3554.c @@ -871,10 +871,8 @@ static int lm3554_probe(struct i2c_client *client, int ret; flash =
[PATCH v2 1/2] staging: atomisp2: cleanup null check on memory allocation
For memory allocation functions that fail with a NULL return value, it is preferred to use the (!x) test in place of (x == NULL). Changes in atomisp2/css2400/sh_css.c were done by hand. Done with the help of the following cocci script: @@ type T; T* p; statement s,s1; @@ p = \(devm_kzalloc\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\| kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ...when != p if ( - p == NULL + !p ) s else s1 Signed-off-by: Aishwarya Pant -- Changes in atomisp2/css2400/sh_css.c were done by hand, the above script was not able to match the pattern if (a->b != null). v2 changes: None, just rebase and re-send --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 36 +++--- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 6 ++-- .../pci/atomisp2/css2400/sh_css_param_shading.c| 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index e882b5596813..56de641d8848 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c @@ -5607,13 +5607,13 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe) mycs->num_yuv_scaler = cas_scaler_descr.num_stage; mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage * sizeof(struct ia_css_binary), GFP_KERNEL); - if (mycs->yuv_scaler_binary == NULL) { + if (!mycs->yuv_scaler_binary) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; return err; } mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage * sizeof(bool), GFP_KERNEL); - if (mycs->is_output_stage == NULL) { + if (!mycs->is_output_stage) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; return err; } @@ -6258,14 +6258,14 @@ static enum ia_css_err load_primary_binaries( mycs->num_yuv_scaler = cas_scaler_descr.num_stage; mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage * sizeof(struct ia_css_binary), GFP_KERNEL); - if (mycs->yuv_scaler_binary == NULL) { + if (!mycs->yuv_scaler_binary) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; IA_CSS_LEAVE_ERR_PRIVATE(err); return err; } mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage * sizeof(bool), GFP_KERNEL); - if (mycs->is_output_stage == NULL) { + if (!mycs->is_output_stage) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; IA_CSS_LEAVE_ERR_PRIVATE(err); return err; @@ -6982,27 +6982,27 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output( } descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->in_info == NULL) { + if (!descr->in_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->internal_out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->internal_out_info == NULL) { + if (!descr->internal_out_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->out_info == NULL) { + if (!descr->out_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->vf_info == NULL) { + if (!descr->vf_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL); - if (descr->is_output_stage == NULL) { + if (!descr->is_output_stage) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } @@ -7118,22 +7118,22 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi descr->num_stage = num_stages; descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_
[PATCH v2 0/2] staging: atomisp: memory allocation cleanups
Patch series performs minor code cleanups using coccinelle to simplify memory allocation tests and remove redundant OOM log messages. Changes in v2: Rebase and re-send patches Aishwarya Pant (2): staging: atomisp2: cleanup null check on memory allocation staging: atomisp: cleanup out of memory messages drivers/staging/media/atomisp/i2c/ap1302.c | 4 +-- drivers/staging/media/atomisp/i2c/gc0310.c | 4 +-- drivers/staging/media/atomisp/i2c/gc2235.c | 4 +-- drivers/staging/media/atomisp/i2c/imx/imx.c| 4 +-- drivers/staging/media/atomisp/i2c/lm3554.c | 4 +-- drivers/staging/media/atomisp/i2c/mt9m114.c| 4 +-- drivers/staging/media/atomisp/i2c/ov2680.c | 4 +-- drivers/staging/media/atomisp/i2c/ov2722.c | 4 +-- drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 4 +-- drivers/staging/media/atomisp/i2c/ov8858.c | 6 +--- .../media/atomisp/pci/atomisp2/atomisp_fops.c | 4 +-- .../media/atomisp/pci/atomisp2/atomisp_ioctl.c | 9 ++ .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 36 +++--- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 6 ++-- .../pci/atomisp2/css2400/sh_css_param_shading.c| 4 +-- .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c| 10 ++ .../atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c| 6 +--- .../atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 5 +-- .../media/atomisp/pci/atomisp2/hmm/hmm_vm.c| 4 +-- .../platform/intel-mid/atomisp_gmin_platform.c | 4 +-- 20 files changed, 41 insertions(+), 89 deletions(-) -- 2.11.0
[PATCH v2] power: supply: replace pr_* with dev_*
Use kernel preferred dev_* family of functions in place of pr_*, wherever a device object is present. Done with the help of coccinelle. Signed-off-by: Aishwarya Pant --- Changes in v2: - Remove device name from log message as it is already present in the dev_* functions The following cocci script was used to make the patch: @r exists@ identifier f, s, x; position p; @@ f(..., struct s *x,...) { <+... when != x == NULL \(pr_err@p\|pr_debug@p\|pr_info@p\|pr_warn@p\)(...); ...+> } @struc@ identifier dev, r.s; @@ struct s { ... struct device *dev; ... }; @@ identifier r.x, struc.dev; position r.p; @@ ( - pr_err@p + dev_err | - pr_warn@p + dev_warn | - pr_info@p + dev_info | - pr_debug@p + dev_dbg ) ( + x->dev, ...) @rr exists@ local idexpression struct device *dev; @@ <+... dev ...+> ( - pr_err + dev_err | - pr_info + dev_info | - pr_warn + dev_warn | - pr_debug + dev_dbg ) ( + dev, ...) --- drivers/power/supply/power_supply_core.c | 2 +- drivers/power/supply/twl4030_charger.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c index 02c6340ae36f..82f998ab5a52 100644 --- a/drivers/power/supply/power_supply_core.c +++ b/drivers/power/supply/power_supply_core.c @@ -669,7 +669,7 @@ EXPORT_SYMBOL_GPL(power_supply_powers); static void power_supply_dev_release(struct device *dev) { struct power_supply *psy = container_of(dev, struct power_supply, dev); - pr_debug("device: '%s': %s\n", dev_name(dev), __func__); + dev_dbg(dev, "%s\n", __func__); kfree(psy); } diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c index a5915f498eea..bbcaee56db9d 100644 --- a/drivers/power/supply/twl4030_charger.c +++ b/drivers/power/supply/twl4030_charger.c @@ -743,7 +743,7 @@ static int twl4030bci_state(struct twl4030_bci *bci) ret = twl4030_bci_read(TWL4030_BCIMSTATEC, &state); if (ret) { - pr_err("twl4030_bci: error reading BCIMSTATEC\n"); + dev_err(bci->dev, "error reading BCIMSTATEC\n"); return ret; } -- 2.11.0
[PATCH] power: supply: replace pr_* with dev_*
Use kernel preferred dev_* family of functions in place of pr_*, wherever a device object is present. Done with the help of coccinelle. Signed-off-by: Aishwarya Pant --- The following cocci script was used to make the patch: @r exists@ identifier f, s, x; position p; @@ f(..., struct s *x,...) { <+... when != x == NULL \(pr_err@p\|pr_debug@p\|pr_info@p\|pr_warn@p\)(...); ...+> } @struc@ identifier dev, r.s; @@ struct s { ... struct device *dev; ... }; @@ identifier r.x, struc.dev; position r.p; @@ ( - pr_err@p + dev_err | - pr_warn@p + dev_warn | - pr_info@p + dev_info | - pr_debug@p + dev_dbg ) ( + x->dev, ...) @rr exists@ local idexpression struct device *dev; @@ <+... dev ...+> ( - pr_err + dev_err | - pr_info + dev_info | - pr_warn + dev_warn | - pr_debug + dev_dbg ) ( + dev, ...) --- drivers/power/supply/power_supply_core.c | 2 +- drivers/power/supply/twl4030_charger.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c index 02c6340ae36f..4b57fa9779ae 100644 --- a/drivers/power/supply/power_supply_core.c +++ b/drivers/power/supply/power_supply_core.c @@ -669,7 +669,7 @@ EXPORT_SYMBOL_GPL(power_supply_powers); static void power_supply_dev_release(struct device *dev) { struct power_supply *psy = container_of(dev, struct power_supply, dev); - pr_debug("device: '%s': %s\n", dev_name(dev), __func__); + dev_dbg(dev, "device: '%s': %s\n", dev_name(dev), __func__); kfree(psy); } diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c index a5915f498eea..7ed2bc3039c4 100644 --- a/drivers/power/supply/twl4030_charger.c +++ b/drivers/power/supply/twl4030_charger.c @@ -743,7 +743,7 @@ static int twl4030bci_state(struct twl4030_bci *bci) ret = twl4030_bci_read(TWL4030_BCIMSTATEC, &state); if (ret) { - pr_err("twl4030_bci: error reading BCIMSTATEC\n"); + dev_err(bci->dev, "twl4030_bci: error reading BCIMSTATEC\n"); return ret; } -- 2.11.0
[PATCH 2/2] staging: atomisp: cleanup out of memory messages
Logging of explicit out of memory messages is redundant since memory allocation failures produce a backtrace. Done with the help of the following cocci script: @@ expression ex, ret; statement s; constant char[] c; constant err; identifier f, l; @@ ex = \(kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ... when != ex if ( ( !ex | unlikely(!ex) ) ) - { - f(..., c, ...); ( return ret; | return; | return err; | goto l; ) - } else s Another case where if branch has multiple statements was handled with the following condition: { ... - f(..., c, ...); ... } Signed-off-by: Aishwarya Pant --- drivers/staging/media/atomisp/i2c/ap1302.c | 4 +--- drivers/staging/media/atomisp/i2c/gc0310.c | 4 +--- drivers/staging/media/atomisp/i2c/gc2235.c | 4 +--- drivers/staging/media/atomisp/i2c/imx/imx.c| 4 +--- drivers/staging/media/atomisp/i2c/lm3554.c | 4 +--- drivers/staging/media/atomisp/i2c/mt9m114.c| 4 +--- drivers/staging/media/atomisp/i2c/ov2680.c | 4 +--- drivers/staging/media/atomisp/i2c/ov2722.c | 4 +--- drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 4 +--- drivers/staging/media/atomisp/i2c/ov8858.c | 6 +- drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c | 9 ++--- .../media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c | 4 +--- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c| 10 ++ .../staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c | 6 +- .../staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 5 + drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_vm.c| 4 +--- .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c | 4 +--- 18 files changed, 20 insertions(+), 68 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/ap1302.c b/drivers/staging/media/atomisp/i2c/ap1302.c index 2f772a020c8b..bfbf85122c3b 100644 --- a/drivers/staging/media/atomisp/i2c/ap1302.c +++ b/drivers/staging/media/atomisp/i2c/ap1302.c @@ -1153,10 +1153,8 @@ static int ap1302_probe(struct i2c_client *client, /* allocate device & init sub device */ dev = devm_kzalloc(&client->dev, sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&client->dev, "%s: out of memory\n", __func__); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/gc0310.c b/drivers/staging/media/atomisp/i2c/gc0310.c index 35ed51ffe944..291565451bfe 100644 --- a/drivers/staging/media/atomisp/i2c/gc0310.c +++ b/drivers/staging/media/atomisp/i2c/gc0310.c @@ -1385,10 +1385,8 @@ static int gc0310_probe(struct i2c_client *client, pr_info("%s S\n", __func__); dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&client->dev, "out of memory\n"); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c b/drivers/staging/media/atomisp/i2c/gc2235.c index e43d31ea9676..f51535eee091 100644 --- a/drivers/staging/media/atomisp/i2c/gc2235.c +++ b/drivers/staging/media/atomisp/i2c/gc2235.c @@ -1123,10 +1123,8 @@ static int gc2235_probe(struct i2c_client *client, unsigned int i; dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) { - dev_err(&client->dev, "out of memory\n"); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/imx/imx.c b/drivers/staging/media/atomisp/i2c/imx/imx.c index 49ab0af87096..957fb1863b40 100644 --- a/drivers/staging/media/atomisp/i2c/imx/imx.c +++ b/drivers/staging/media/atomisp/i2c/imx/imx.c @@ -2365,10 +2365,8 @@ static int imx_probe(struct i2c_client *client, /* allocate sensor device & init sub device */ dev = kzalloc(sizeof(*dev), GFP_KERNEL); - if (!dev) { - v4l2_err(client, "%s: out of memory\n", __func__); + if (!dev) return -ENOMEM; - } mutex_init(&dev->input_lock); diff --git a/drivers/staging/media/atomisp/i2c/lm3554.c b/drivers/staging/media/atomisp/i2c/lm3554.c index 679176f7c542..37876d245a02 100644 --- a/drivers/staging/media/atomisp/i2c/lm3554.c +++ b/drivers/staging/media/atomisp/i2c/lm3554.c @@ -871,10 +871,8 @@ static int lm3554_probe(struct i2c_client *client, int ret; flash = kzalloc(sizeof(*flash), GFP_KERNEL); -
[PATCH 1/2] staging: atomisp2: cleanup null check on memory allocation
For memory allocation functions that fail with a NULL return value, it is preferred to use the (!x) test in place of (x == NULL). Changes in atomisp2/css2400/sh_css.c were done by hand. Done with the help of the following cocci script: @@ type T; T* p; statement s,s1; @@ p = \(devm_kzalloc\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\| kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\| kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...) ...when != p if ( - p == NULL + !p ) s else s1 Signed-off-by: Aishwarya Pant -- Changes in atomisp2/css2400/sh_css.c were done by hand, the above script was not able to match the pattern if (a->b != null). --- .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 36 +++--- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 6 ++-- .../pci/atomisp2/css2400/sh_css_param_shading.c| 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c index e882b5596813..56de641d8848 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c @@ -5607,13 +5607,13 @@ static enum ia_css_err load_video_binaries(struct ia_css_pipe *pipe) mycs->num_yuv_scaler = cas_scaler_descr.num_stage; mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage * sizeof(struct ia_css_binary), GFP_KERNEL); - if (mycs->yuv_scaler_binary == NULL) { + if (!mycs->yuv_scaler_binary) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; return err; } mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage * sizeof(bool), GFP_KERNEL); - if (mycs->is_output_stage == NULL) { + if (!mycs->is_output_stage) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; return err; } @@ -6258,14 +6258,14 @@ static enum ia_css_err load_primary_binaries( mycs->num_yuv_scaler = cas_scaler_descr.num_stage; mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage * sizeof(struct ia_css_binary), GFP_KERNEL); - if (mycs->yuv_scaler_binary == NULL) { + if (!mycs->yuv_scaler_binary) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; IA_CSS_LEAVE_ERR_PRIVATE(err); return err; } mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage * sizeof(bool), GFP_KERNEL); - if (mycs->is_output_stage == NULL) { + if (!mycs->is_output_stage) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; IA_CSS_LEAVE_ERR_PRIVATE(err); return err; @@ -6982,27 +6982,27 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc_single_output( } descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->in_info == NULL) { + if (!descr->in_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->internal_out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->internal_out_info == NULL) { + if (!descr->internal_out_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->out_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->out_info == NULL) { + if (!descr->out_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->vf_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->vf_info == NULL) { + if (!descr->vf_info) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), GFP_KERNEL); - if (descr->is_output_stage == NULL) { + if (!descr->is_output_stage) { err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY; goto ERR; } @@ -7118,22 +7118,22 @@ static enum ia_css_err ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi descr->num_stage = num_stages; descr->in_info = kmalloc(descr->num_stage * sizeof(struct ia_css_frame_info), GFP_KERNEL); - if (descr->in_info == NUL
[PATCH 0/2] staginng: atomisp: memory allocation cleanups
Patch series performs minor code cleanups using coccinelle to simplify memory allocation tests and remove redundant OOM log messages. Aishwarya Pant (2): staging: atomisp2: cleanup null check on memory allocation staging: atomisp: cleanup out of memory messages drivers/staging/media/atomisp/i2c/ap1302.c | 4 +-- drivers/staging/media/atomisp/i2c/gc0310.c | 4 +-- drivers/staging/media/atomisp/i2c/gc2235.c | 4 +-- drivers/staging/media/atomisp/i2c/imx/imx.c| 4 +-- drivers/staging/media/atomisp/i2c/lm3554.c | 4 +-- drivers/staging/media/atomisp/i2c/mt9m114.c| 4 +-- drivers/staging/media/atomisp/i2c/ov2680.c | 4 +-- drivers/staging/media/atomisp/i2c/ov2722.c | 4 +-- drivers/staging/media/atomisp/i2c/ov5693/ov5693.c | 4 +-- drivers/staging/media/atomisp/i2c/ov8858.c | 6 +--- .../media/atomisp/pci/atomisp2/atomisp_fops.c | 4 +-- .../media/atomisp/pci/atomisp2/atomisp_ioctl.c | 9 ++ .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 36 +++--- .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c | 6 ++-- .../pci/atomisp2/css2400/sh_css_param_shading.c| 4 +-- .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c| 10 ++ .../atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c| 6 +--- .../atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c | 5 +-- .../media/atomisp/pci/atomisp2/hmm/hmm_vm.c| 4 +-- .../platform/intel-mid/atomisp_gmin_platform.c | 4 +-- 20 files changed, 41 insertions(+), 89 deletions(-) -- 2.11.0
[PATCH 3/3] staging: rtl8188eu: fix sparse signedness warnings in rtw_generate_ie
Changed the type of wpa_ie_len from (int *) to (unsigned int *) in the function rtw_get_wpa_ie(..) to suppress signedness mismatch warnings in rtw_generate_ie of the type- drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60: warning: incorrect type in argument 2 (different signedness) drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60:expected int *wpa_ie_len drivers/staging/rtl8188eu//core/rtw_ieee80211.c:1009:60:got unsigned int * Signed-off-by: Aishwarya Pant --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 2 +- drivers/staging/rtl8188eu/include/ieee80211.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index 79dda83..d1dafe0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -292,7 +292,7 @@ int rtw_generate_ie(struct registry_priv *pregistrypriv) return sz; } -unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit) +unsigned char *rtw_get_wpa_ie(unsigned char *pie, uint *wpa_ie_len, int limit) { uint len; u16 val16; diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h b/drivers/staging/rtl8188eu/include/ieee80211.h index b3f331a..22ab0c4 100644 --- a/drivers/staging/rtl8188eu/include/ieee80211.h +++ b/drivers/staging/rtl8188eu/include/ieee80211.h @@ -861,7 +861,7 @@ u8 *rtw_get_ie(u8 *pbuf, int index, uint *len, int limit); void rtw_set_supported_rate(u8 *SupportedRates, uint mode); -unsigned char *rtw_get_wpa_ie(unsigned char *pie, int *wpa_ie_len, int limit); +unsigned char *rtw_get_wpa_ie(unsigned char *pie, uint *wpa_ie_len, int limit); unsigned char *rtw_get_wpa2_ie(unsigned char *pie, uint *rsn_ie_len, int limit); int rtw_get_wpa_cipher_suite(u8 *s); int rtw_get_wpa2_cipher_suite(u8 *s); -- 2.7.4