• R
    Driver core: Unified device properties interface for platform firmware · b31384fa
    Rafael J. Wysocki 提交于
    Add a uniform interface by which device drivers can request device
    properties from the platform firmware by providing a property name
    and the corresponding data type.  The purpose of it is to help to
    write portable code that won't depend on any particular platform
    firmware interface.
    
    The following general helper functions are added:
    
    device_property_present()
    device_property_read_u8()
    device_property_read_u16()
    device_property_read_u32()
    device_property_read_u64()
    device_property_read_string()
    device_property_read_u8_array()
    device_property_read_u16_array()
    device_property_read_u32_array()
    device_property_read_u64_array()
    device_property_read_string_array()
    
    The first one allows the caller to check if the given property is
    present.  The next 5 of them allow single-valued properties of
    various types to be retrieved in a uniform way.  The remaining 5 are
    for reading properties with multiple values (arrays of either numbers
    or strings).
    
    The interface covers both ACPI and Device Trees.
    
    This change set includes material from Mika Westerberg and Aaron Lu.
    Signed-off-by: NAaron Lu <aaron.lu@intel.com>
    Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
    Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Acked-by: NGrant Likely <grant.likely@linaro.org>
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    b31384fa
acpi.h 22.5 KB