1. 04 4月, 2015 2 次提交
    • R
      device property: Introduce firmware node type for platform data · 16ba08d5
      Rafael J. Wysocki 提交于
      Introduce data structures and code allowing "built-in" properties
      to be associated with devices in such a way that they will be used
      by the device_property_* API if no proper firmware node (neither DT
      nor ACPI) is present for the given device.
      
      Each property is to be represented by a property_entry structure.
      An array of property_entry structures (terminated with a null
      entry) can be pointed to by the properties field of struct
      property_set that can be added as a firmware node to a struct
      device using device_add_property_set().  That will cause the
      device_property_* API to use that property_set as the source
      of properties if the given device does not have a DT node or
      an ACPI companion device object associated with it.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      16ba08d5
    • R
      device property: Make it possible to use secondary firmware nodes · 97badf87
      Rafael J. Wysocki 提交于
      Add a secondary pointer to struct fwnode_handle so as to make it
      possible for a device to have two firmware nodes associated with
      it at the same time, for example, an ACPI node and a node with
      a set of properties provided by platform initialization code.
      
      In the future that will allow device property lookup to fall back
      from the primary firmware node to the secondary one if the given
      property is not present there to make it easier to provide defaults
      for device properties used by device drivers.
      
      Introduce two helper routines, set_primary_fwnode() and
      set_secondary_fwnode() allowing callers to add a primary/secondary
      firmware node to the given device in such a way that
      
       (1) If there's only one firmware node for that device, it will be
           pointed to by the device's firmware node pointer.
       (2) If both the primary and secondary firmware nodes are present,
           the primary one will be pointed to by the device's firmware
           node pointer, while the secondary one will be pointed to by the
           primary node's secondary pointer.
       (3) If one of these nodes is removed (by calling one of the new
           nelpers with NULL as the second argument), the other one will
           be preserved.
      
      Make ACPI use set_primary_fwnode() for attaching its firmware nodes
      to devices.
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Tested-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      97badf87
  2. 17 3月, 2015 1 次提交