• Rafael J. Wysocki's avatar
    ACPI: property: Support using strings in reference properties · 9880702d
    Rafael J. Wysocki authored
    In order to allow referencing data nodes directly, which is not possible
    currently, add support for representing references in device properties
    as strings (relative or absolute name paths).  For example, after this
    change, the "mipi-img-flash-leds" property in the ASL snippet below will
    be treated as a proper reference to the LED0 object under LEDD.
    
     Package ()
     {
         "mipi-img-flash-leds",  "\\_SB.PCI0.I2C2.LEDD.LED0",
     }
    
     Device (LEDD)
     {
         Name (_DSD, Package ()  // _DSD: Device-Specific Data
         {
             ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), /* Hierarchical Data Extension */,
             Package ()
             {
                 Package ()
                 {
                     "mipi-img-flash-led-0",
                     "LED0",
                 }
             },
         })
         Name (LED0, Package ()  // _DSD: Device-Specific Data
         {
             ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties */,
             Package ()
             {
                 Package ()
                 {
                     "mipi-img-max-current",
                     1000000,
                 }
             }
         })
     }
    
    Also remove the mechanism allowing data nodes to be referenced
    indirectly, with the help of an object reference pointing to the
    "ancestor" device and a path relative to it (this mechanism is not
    expected to be in use in any production platform firmware in the field).
    
    Note that this change allows also using strings for referencing device
    objects, in addition to object references that have been supported
    already.
    
    While at it, add pr_fmt() macro to prefix printouts and update
    copyright.
    Co-developed-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Tested-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    9880702d
property.c 43.5 KB