23 Jul, 2018

6 commits

  • Instead of port and endpoint properties for representing ports and
    endpoints, use the keys of the hierarchical data extension references
    when referring to the port and endpoint nodes. Additionally, use "reg"
    properties as in Device Tree to specify the number of the port or the
    endpoint.

    The keys of the port nodes begin with "port" and the keys of the endpoint
    nodes begin with "endpoint", both followed by "@" character and the number
    of the port or the endpoint.

    These changes have the advantage that no ACPI specific properties need to
    be added to refer to non-device nodes. Additionally, using the name of the
    node instead of an integer property inside the node is easier to parse in
    code and easier for humans to understand.

    Signed-off-by: Sakari Ailus
    Signed-off-by: Rafael J. Wysocki

    Sakari Ailus
     
  • Document that if a port has a single endpoint only, its value shall be
    zero. Similarly, if a device object only has a single port, its value
    shlla be zero.

    Signed-off-by: Sakari Ailus
    Signed-off-by: Rafael J. Wysocki

    Sakari Ailus
     
  • Address a few issues in the ACPI _DSD properties graph documentation:

    - the extension for port nodes is a data extension (and not property
    extension),

    - clean up language in port hierarchical data extension definition,

    - add examples of port and endpoint packages,

    - port property value is the number of the "port" and not the number
    of the "port node",

    - remove word "individual" from endpoint data node description, it
    was redundant,

    - remove the extra "The" in the endpoint property description,

    - refer to hierarchical data extension keys and targets instead of
    first and second package list entries.

    Signed-off-by: Sakari Ailus
    Signed-off-by: Rafael J. Wysocki

    Sakari Ailus
     
  • Hierarchical data extension 1.1 allows using references as the second
    entries of the hierearchical data extension packages. Update the
    references and the examples.

    The quotes are left in documentation for clarity.

    Signed-off-by: Sakari Ailus
    Signed-off-by: Rafael J. Wysocki

    Sakari Ailus
     
  • As part of the hierarchical data extension key naming, introduce numbering
    scheme for the nodes that may be referred to using hierarchical data
    extension references. This allows iterating over particular kind of nodes
    recognised by the node name whilst allowing numbering the nodes, bringing
    ACPI to feature parity with DT in this respect.

    Signed-off-by: Sakari Ailus
    Signed-off-by: Rafael J. Wysocki

    Sakari Ailus
     
  • Add documentation on how to refer to hierarchical data nodes in a
    generic way. This brings ACPI to feature parity with Device Tree in
    terms of being able to refer to any node in the tree.

    Signed-off-by: Sakari Ailus
    Signed-off-by: Rafael J. Wysocki

    Sakari Ailus
     

06 Jun, 2018

1 commit


24 Apr, 2018

1 commit


11 Oct, 2017

1 commit

  • Add functionality to read LPIT table, which provides:

    - Sysfs interface to read residency counters via
    /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us
    /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us

    Here the count "low_power_idle_cpu_residency_us" shows the time spent
    by CPU package in low power state. This is read via MSR interface,
    which points to MSR for PKG C10.

    Here the count "low_power_idle_system_residency_us" show the count the
    system was in low power state. This is read via MMIO interface. This
    is mapped to SLP_S0 residency on modern Intel systems. This residency
    is achieved only when CPU is in PKG C10 and all functional blocks are
    in low power state.

    It is possible that none of the above counters present or anyone of the
    counter present or all counters present.

    For example: On my Kabylake system both of the above counters present.
    After suspend to idle these counts updated and prints:

    6916179
    6998564

    This counter can be read by tools like turbostat to display. Or it can
    be used to debug, if modern systems are reaching desired low power state.

    - Provides an interface to read residency counter memory address

    This address can be used to get the base address of PMC memory
    mapped IO. This is utilized by intel_pmc_core driver to print
    more debug information.

    In addition, to avoid code duplication to read iomem, removed the read of
    iomem from acpi_os_read_memory() in osl.c and made a common function
    acpi_os_read_iomem(). This new function is used for reading iomem in
    in both osl.c and acpi_lpit.c.

    Link: http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf
    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Rafael J. Wysocki

    Srinivas Pandruvada
     

08 Jul, 2017

1 commit

  • Pull GPIO updates from Linus Walleij:
    "This is the bulk of GPIO changes for the v4.13 series.

    Some administrativa:

    I have a slew of 8250 serial patches and the new IOT2040 serial+GPIO
    driver coming in through this tree, along with a whole bunch of Exar
    8250 fixes. These are ACKed by Greg and also hit drivers/platform/*
    where they are ACKed by Andy Shevchenko.

    Speaking about drivers/platform/* there is also a bunch of ACPI stuff
    coming through that route, again ACKed by Andy.

    The MCP23S08 changes are coming in here as well. You already have the
    commits in your tree, so this is just a result of sharing an immutable
    branch between pin control and GPIO.

    Core:
    - Export add/remove for lookup tables so that modules can export GPIO
    descriptor tables.
    - Handle GPIO sleep states: it is now possible to flag that a GPIO
    line may loose its state during suspend/resume of the system to
    save power. This is used in the Wolfson Micro Arizona driver.
    - ACPI-based GPIO was tightened up a lot around the edges.
    - Use bitmap_fill() to speed up a loop.

    New drivers:
    - Exar XRA1403 SPI-based GPIO.
    - MVEBU driver now supports Armada 7K and 8K.
    - LP87565 PMIC GPIO.
    - Renesas R-CAR R8A7743 (RZ/G1M).
    - The new IOT2040 8250 serial/GPIO also comes in through this
    changeset.

    Substantial driver changes:
    - Seriously fix the Exar 8250 GPIO portions to work.
    - The MCP23S08 was moved out to a pin control driver.
    - Convert MEVEBU to use regmap for register access.
    - Drop Vulcan support from the Broadcom driver.
    - Serious cleanup and improvement of the mockup driver, giving us a
    better test coverage.

    Misc:
    - Lots of janitorial clean up.
    - A bunch of documentation fixes"

    * tag 'gpio-v4.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (70 commits)
    serial: exar: Add support for IOT2040 device
    gpio-exar/8250-exar: Make set of exported GPIOs configurable
    platform: Accept const properties
    serial: exar: Factor out platform hooks
    gpio-exar/8250-exar: Rearrange gpiochip parenthood
    gpio: exar: Fix iomap request
    gpio-exar/8250-exar: Do not even instantiate a GPIO device for Commtech cards
    serial: uapi: Add support for bus termination
    gpio: rcar: Add R8A7743 (RZ/G1M) support
    gpio: gpio-wcove: Fix GPIO control register offset calculation
    gpio: lp87565: Add support for GPIO
    gpio: dwapb: fix missing first irq for edgeboth irq type
    MAINTAINERS: Take maintainership for GPIO ACPI support
    gpio: exar: Fix reading of directions and values
    gpio: exar: Allocate resources on behalf of the platform device
    gpio-exar/8250-exar: Fix passing in of parent PCI device
    gpio: mockup: use devm_kcalloc() where applicable
    gpio: mockup: add myself as author
    gpio: mockup: improve the error message
    gpio: mockup: don't return magic numbers from probe()
    ...

    Linus Torvalds
     

29 May, 2017

1 commit


23 May, 2017

1 commit


13 May, 2017

1 commit

  • This reverts commit ecb10b694b72ca5ea51b3c90a71ff2a11963425a.

    The only expected ACPI control method lid device's usage model is

    1. Listen to the lid notification,
    2. Evaluate _LID after being notified by BIOS,
    3. Suspend the system (if users configure to do so) after seeing "close".

    It's not ensured that BIOS will notify OS after boot/resume, and
    it's not ensured that BIOS will always generate "open" event upon
    opening the lid.

    But there are 2 wrong usage models:

    1. When the lid device is responsible for suspend/resume the system,
    userspace requires to see "open" event to be paired with "close" after
    the system is resumed, or it will suspend the system again.

    2. When an external monitor connects to the laptop attached docks,
    userspace requires to see "close" event after the system is resumed so
    that it can determine whether the internal display should remain dark
    and the external display should be lit on.

    After we made default kernel behavior to be suitable for usage model 1,
    users of usage model 2 start to report regressions for such behavior
    change.

    Reversion of button.lid_init_state=method doesn't actually reverts to old
    default behavior as doing so can enter a regression loop, but facilitates
    users to work the reported regressions around with
    button.lid_init_state=method.

    Fixes: ecb10b694b72 (ACPI / button: Remove lid_init_state=method mode)
    Cc: 4.11+ # 4.11+
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=195455
    Link: https://bugzilla.redhat.com/show_bug.cgi?id=1430259
    Tested-by: Steffen Weber
    Tested-by: Julian Wiedmann
    Reported-by: Joachim Frieben
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     

03 May, 2017

1 commit

  • Pull documentation update from Jonathan Corbet:
    "A reasonably busy cycle for documentation this time around. There is a
    new guide for user-space API documents, rather sparsely populated at
    the moment, but it's a start. Markus improved the infrastructure for
    converting diagrams. Mauro has converted much of the USB documentation
    over to RST. Plus the usual set of fixes, improvements, and tweaks.

    There's a bit more than the usual amount of reaching out of
    Documentation/ to fix comments elsewhere in the tree; I have acks for
    those where I could get them"

    * tag 'docs-4.12' of git://git.lwn.net/linux: (74 commits)
    docs: Fix a couple typos
    docs: Fix a spelling error in vfio-mediated-device.txt
    docs: Fix a spelling error in ioctl-number.txt
    MAINTAINERS: update file entry for HSI subsystem
    Documentation: allow installing man pages to a user defined directory
    Doc/PM: Sync with intel_powerclamp code behavior
    zr364xx.rst: usb/devices is now at /sys/kernel/debug/
    usb.rst: move documentation from proc_usb_info.txt to USB ReST book
    convert philips.txt to ReST and add to media docs
    docs-rst: usb: update old usbfs-related documentation
    arm: Documentation: update a path name
    docs: process/4.Coding.rst: Fix a couple of document refs
    docs-rst: fix usb cross-references
    usb: gadget.h: be consistent at kernel doc macros
    usb: composite.h: fix two warnings when building docs
    usb: get rid of some ReST doc build errors
    usb.rst: get rid of some Sphinx errors
    usb/URB.txt: convert to ReST and update it
    usb/persist.txt: convert to ReST and add to driver-api book
    usb/hotplug.txt: convert to ReST and add to driver-api book
    ...

    Linus Torvalds
     

02 May, 2017

1 commit

  • Pull generic device properties framework updates from Rafael Wysocki:
    "These add support for the ports and endpoints concepts, based on the
    existing DT support for them, to the generic device properties
    framework and update the ACPI _DSD properties code to recognize ports
    and endpoints accordingly.

    Specifics:

    - Extend the ACPI _DSD properties code and the generic device
    properties framework to support the concept of remote endponts
    (Mika Westerberg, Sakari Ailus).

    - Document the support for ports and endpoints in _DSD properties and
    extend the generic device properties framework to make it more
    suitable for the handling of ports and endpoints (Sakari Ailus)"

    * tag 'devprop-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    device property: Read strings using string array reading functions
    device property: fwnode_property_read_string_array() returns nr of strings
    device property: Fix reading pset strings using array access functions
    device property: fwnode_property_read_string_array() may return -EILSEQ
    ACPI / DSD: Document references, ports and endpoints
    device property: Add fwnode_get_next_parent()
    device property: Add support for fwnode endpoints
    device property: Make dev_fwnode() public
    of: Add of_fwnode_handle() to convert device nodes to fwnode_handle
    device property: Add fwnode_handle_get()
    device property: Add support for remote endpoints
    ACPI / property: Add support for remote endpoints
    device property: Add fwnode_get_named_child_node()
    ACPI / property: Add fwnode_get_next_child_node()
    device property: Add fwnode_get_parent()
    ACPI / property: Add possiblity to retrieve parent firmware node

    Linus Torvalds
     

19 Apr, 2017

1 commit


29 Mar, 2017

1 commit


18 Mar, 2017

1 commit


28 Feb, 2017

2 commits

  • Fix typos and add the following to the scripts/spelling.txt:

    followings||following

    While we are here, add a missing colon in the boilerplate in DT binding
    documents. The "you SoC" in allwinner,sunxi-pinctrl.txt was fixed as
    well.

    I reworded "as the followings:" to "as follows:" for
    drivers/usb/gadget/udc/renesas_usb3.c.

    Link: http://lkml.kernel.org/r/1481573103-11329-32-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     
  • Fix typos and add the following to the scripts/spelling.txt:

    overrided||overridden

    Link: http://lkml.kernel.org/r/1481573103-11329-22-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     

01 Feb, 2017

1 commit


14 Dec, 2016

1 commit

  • Pull ACPI updates from Rafael Wysocki:
    "The ACPICA code in the kernel gets updated as usual (included is
    upstream revision 20160930 and a few commits from the next one, with
    the rest waiting for an issue discovered in linux-next to be
    addressed) which brings in a couple of fixes and cleanups

    On top of that initial support for APEI on ARM64 is added, two new
    pieces of documentation are introduced, the properties-parsing code is
    updated to follow changes in the (external) documentation it is based
    on and there are a few updates of SoC drivers, some new blacklist
    entries, plus some assorted fixes and cleanups

    Specifics:

    - ACPICA update including upstream revision 20160930 and several
    commits beyond it (Bob Moore, Lv Zheng)

    - Initial support for ACPI APEI on ARM64 (Tomasz Nowicki)

    - New document describing the handling of _OSI and _REV in Linux (Len
    Brown)

    - New document describing the usage rules for _DSD properties (Rafael
    Wysocki)

    - Update of the ACPI properties-parsing code to reflect recent
    changes in the (external) documentation it is based on (Rafael
    Wysocki)

    - Updates of the ACPI LPSS and ACPI APD SoC drivers for additional
    hardware support (Andy Shevchenko, Nehal Shah)

    - New blacklist entries for _REV and video handling (Alex Hung, Hans
    de Goede, Michael Pobega)

    - ACPI battery driver fix to fall back to _BIF if _BIX fails (Dave
    Lambley)

    - NMI notifications handling fix for APEI (Prarit Bhargava)

    - Error code path fix for the ACPI CPPC library (Dan Carpenter)

    - Assorted cleanups (Andy Shevchenko, Longpeng Mike)"

    * tag 'acpi-4.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (31 commits)
    ACPICA: Utilities: Add new decode function for parser values
    ACPI / osl: Refactor acpi_os_get_root_pointer() to drop 'else':s
    ACPI / osl: Propagate actual error code for kstrtoul()
    ACPI / property: Document usage rules for _DSD properties
    ACPI: Document _OSI and _REV for Linux BIOS writers
    ACPI / APEI / ARM64: APEI initial support for ARM64
    ACPI / APEI: Fix NMI notification handling
    ACPICA: Tables: Add an error message complaining driver bugs
    ACPICA: Tables: Add acpi_tb_unload_table()
    ACPICA: Tables: Cleanup acpi_tb_install_and_load_table()
    ACPICA: Events: Fix acpi_ev_initialize_region() return value
    ACPICA: Back port of "ACPICA: Dispatcher: Tune interpreter lock around AcpiEvInitializeRegion()"
    ACPICA: Namespace: Add acpi_ns_handle_to_name()
    ACPI / CPPC: set an error code on probe error path
    ACPI / video: Add force_native quirk for HP Pavilion dv6
    ACPI / video: Add force_native quirk for Dell XPS 17 L702X
    ACPI / property: Hierarchical properties support update
    ACPI / LPSS: enable hard LLP for DMA
    ACPI / battery: If _BIX fails, retry with _BIF
    ACPI / video: Move ACPI_VIDEO_NOTIFY_* defines to acpi/video.h
    ..

    Linus Torvalds
     

13 Dec, 2016

2 commits

  • Pull GPIO updates from Luinus Walleij:
    "Bulk GPIO changes for the v4.10 kernel cycle:

    Core changes:

    - Simplify threaded interrupt handling: instead of passing numbed
    parameters to gpiochip_irqchip_add_chained() we create a new call:
    gpiochip_irqchip_add_nested() so the two types are clearly
    semantically different. Also make sure that all nested chips call
    gpiochip_set_nested_irqchip() which is necessary for IRQ resend to
    work properly if it happens.

    - Return error on seek operations for the chardev.

    - Clamp values set as part of gpio[d]_direction_output() so that
    anything != 0 will be send down to the driver as "1" not the value
    passed in.

    - ACPI can now support naming of GPIO lines, hogs and holes in the
    GPIO lists.

    New drivers:

    - The SX150x driver was deemed unfit for the GPIO subsystem and was
    moved over to a combined GPIO+pinctrl driver in the pinctrl
    subsystem.

    New features:

    - Various cleanups to various drivers"

    * tag 'gpio-v4.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (49 commits)
    gpio: merrifield: Implement gpio_get_direction callback
    gpio: merrifield: Add support for hardware debouncer
    gpio: chardev: Return error for seek operations
    gpio: arizona: Tidy up probe error path
    gpio: arizona: Remove pointless set of platform drvdata
    gpio: pl061: delete platform data handling
    gpio: pl061: move platform data into driver
    gpio: pl061: rename variable from chip to pl061
    gpio: pl061: rename state container struct
    gpio: pl061: use local state for parent IRQ storage
    gpio: set explicit nesting on drivers
    gpio: simplify adding threaded interrupts
    gpio: vf610: use builtin_platform_driver
    gpio: axp209: use correct register for GPIO input status
    gpio: stmpe: fix interrupt handling bug
    gpio: em: depnd on ARCH_SHMOBILE
    gpio: zx: depend on ARCH_ZX
    gpio: x86: update config dependencies for x86 specific hardware
    gpio: mb86s7x: use builtin_platform_driver
    gpio: etraxfs: use builtin_platform_driver
    ...

    Linus Torvalds
     
  • * device-properties:
    ACPI / property: Document usage rules for _DSD properties
    ACPI / property: Hierarchical properties support update

    Rafael J. Wysocki
     

06 Dec, 2016

1 commit


03 Dec, 2016

1 commit


24 Oct, 2016

4 commits

  • Now that we have the new helper function that sets nice names for GPIO
    lines based on "gpio-line-names" device property, we can take advantage of
    this in acpi_gpiochip_add().

    Signed-off-by: Mika Westerberg
    Signed-off-by: Linus Walleij

    Mika Westerberg
     
  • GPIO hogging means that the GPIO controller can "hog" and configure certain
    GPIOs without need for a driver or userspace to do that. This is useful in
    open-connected boards where BIOS cannot possibly know beforehand which
    devices will be connected to the board.

    This adds GPIO hogging mechanism to ACPI analogous to Device Tree.

    Signed-off-by: Mika Westerberg
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Linus Walleij

    Mika Westerberg
     
  • Make it possible to have an empty GPIOs in a GPIO list for device. For
    example a SPI master may use both GPIOs and native pins as chip selects and
    we need to be able to distinguish between the two.

    This makes it mandatory to have exactly 3 arguments for GPIOs and then
    converts gpiolib to use of __acpi_node_get_property_reference() instead. In
    addition we make acpi_gpio_package_count() to handle holes as well (this
    matches the DT version).

    Signed-off-by: Mika Westerberg
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Linus Walleij

    Mika Westerberg
     
  • The previous patch renamed several files that are cross-referenced
    along the Kernel documentation. Adjust the links to point to
    the right places.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

02 Oct, 2016

1 commit


29 Sep, 2016

1 commit


31 Aug, 2016

1 commit


25 Jul, 2016

1 commit

  • * acpi-bus:
    ACPI / bus: Support for platform initiated graceful shutdown
    ACPI / bus: Correct the comments about acpi_subsystem_init()
    ACPI / bus: Use acpi_handle_debug() in acpi_print_osc_error()

    * acpi-pci:
    ACPI / PCI: make pci_slot explicitly non-modular
    ACPI / PCI: pci_slot: Use generic pr_debug utility
    ACPI / PCI: pci_slot: Use more common logging style

    * acpica:
    ACPICA: Linux: Enable ACPI_MUTEX_DEBUG for Linux kernel

    * acpi-doc:
    ACPI / debugger: Add AML debugger documentation
    ACPI: Add documentation describing ACPICA release automation

    Rafael J. Wysocki
     

09 Jul, 2016

5 commits


19 Apr, 2016

1 commit

  • This patch converts the initrd table override mechanism to the table
    upgrade mechanism by restricting its usage to the tables released with
    compatibility and more recent revision.

    This use case has been encouraged by the ACPI specification:

    1. OEMID:
    An OEM-supplied string that identifies the OEM.

    2. OEM Table ID:
    An OEM-supplied string that the OEM uses to identify the particular data
    table. This field is particularly useful when defining a definition
    block to distinguish definition block functions. OEM assigns each
    dissimilar table a new OEM Table Id.

    3. OEM Revision:
    An OEM-supplied revision number. Larger numbers are assumed to be newer
    revisions.

    For OEMs, good practices will ensure consistency when assigning OEMID and
    OEM Table ID fields in any table. The intent of these fields is to allow
    for a binary control system that support services can use. Because many
    support function can be automated, it is useful when a tool can
    programatically determine which table release is a compatible and more
    recent revision of a prior table on the same OEMID and OEM Table ID.

    The facility can now be used by the vendors to upgrade wrong tables for bug
    fixing purpose, thus lockdep disabling taint is not suitable for it and it
    should be a default 'y' option to implement the spec encouraged use case.

    Note that, by implementing table upgrade inside of ACPICA itself, it is
    possible to remove acpi_table_initrd_override() and tables can be upgraded
    by acpi_install_table() automatically. Though current ACPICA impelentation
    hasn't implemented this, this patched changes the table flag setting timing
    to allow this to be implemented in ACPICA without changing the code here.

    Documentation of initrd override mechanism is upgraded accordingly.

    Original-by: Octavian Purdila
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng