1. 25 1月, 2018 2 次提交
  2. 22 1月, 2018 4 次提交
    • M
      device property: Allow iterating over available child fwnodes · 3395de96
      Marcin Wojtas 提交于
      Implement a new helper function fwnode_get_next_available_child_node(),
      which enables obtaining next enabled child fwnode, which
      works on a similar basis to OF's of_get_next_available_child().
      
      This commit also introduces a macro, thanks to which it is
      possible to iterate over the available fwnodes, using the
      new function described above.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3395de96
    • M
      device property: Introduce fwnode_irq_get() · 7c6c57f2
      Marcin Wojtas 提交于
      Until now there were two very similar functions allowing
      to get Linux IRQ number from ACPI handle (acpi_irq_get())
      and OF node (of_irq_get()). The first one appeared to be used
      only as a subroutine of platform_irq_get(), which (in the generic
      code) limited IRQ obtaining from _CRS method only to nodes
      associated to kernel's struct platform_device.
      
      This patch introduces a new helper routine - fwnode_irq_get(),
      which allows to get the IRQ number directly from the fwnode
      to be used as common for OF/ACPI worlds. It is usable not
      only for the parents fwnodes, but also for the child nodes
      comprising their own _CRS methods with interrupts description.
      
      In order to be able o satisfy compilation with !CONFIG_ACPI
      and also simplify the new code, introduce a helper macro
      (ACPI_HANDLE_FWNODE), with which it is possible to reach
      an ACPI handle directly from its fwnode.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7c6c57f2
    • M
      device property: Introduce fwnode_get_phy_mode() · b28f263b
      Marcin Wojtas 提交于
      Until now there were two almost identical functions for
      obtaining network PHY mode - of_get_phy_mode() and,
      more generic, device_get_phy_mode(). However it is not uncommon,
      that the network interface is represented as a child
      of the actual controller, hence it is not associated
      directly to any struct device, required by the latter
      routine.
      
      This commit allows for getting the PHY mode for
      children nodes in the ACPI world by introducing a new function -
      fwnode_get_phy_mode(). This commit also changes
      device_get_phy_mode() routine to be its wrapper, in order
      to prevent unnecessary duplication.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b28f263b
    • M
      device property: Introduce fwnode_get_mac_address() · babe2dbb
      Marcin Wojtas 提交于
      Until now there were two almost identical functions for
      obtaining MAC address - of_get_mac_address() and, more generic,
      device_get_mac_address(). However it is not uncommon,
      that the network interface is represented as a child
      of the actual controller, hence it is not associated
      directly to any struct device, required by the latter
      routine.
      
      This commit allows for getting the MAC address for
      children nodes in the ACPI world by introducing a new function -
      fwnode_get_mac_address(). This commit also changes
      device_get_mac_address() routine to be its wrapper, in order
      to prevent unnecessary duplication.
      Signed-off-by: NMarcin Wojtas <mw@semihalf.com>
      Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      babe2dbb
  3. 13 12月, 2017 1 次提交
  4. 08 12月, 2017 2 次提交
    • G
      driver core: Remove redundant license text · 32825709
      Greg Kroah-Hartman 提交于
      Now that the SPDX tag is in all driver core files, that identifies the
      license in a specific and legally-defined manner.  So the extra GPL text
      wording can be removed as it is no longer needed at all.
      
      This is done on a quest to remove the 700+ different ways that files in
      the kernel describe the GPL license text.  And there's unneeded stuff
      like the address (sometimes incorrect) for the FSF which is never
      needed.
      
      No copyright headers or other non-license-description text was removed.
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      32825709
    • G
      driver core: add SPDX identifiers to all driver core files · 989d42e8
      Greg Kroah-Hartman 提交于
      It's good to have SPDX identifiers in all files to make it easier to
      audit the kernel tree for correct licenses.
      
      Update the driver core files files with the correct SPDX license
      identifier based on the license text in the file itself.  The SPDX
      identifier is a legally binding shorthand, which can be used instead of
      the full boiler plate text.
      
      This work is based on a script and data from Thomas Gleixner, Philippe
      Ombredanne, and Kate Stewart.
      
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>
      Cc: William Breathitt Gray <vilhelm.gray@gmail.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Kate Stewart <kstewart@linuxfoundation.org>
      Cc: Philippe Ombredanne <pombredanne@nexb.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      989d42e8
  5. 09 11月, 2017 1 次提交
  6. 12 10月, 2017 1 次提交
  7. 10 10月, 2017 1 次提交
    • J
      device property: Track owner device of device property · 5ab894ae
      Jarkko Nikula 提交于
      Deletion of subdevice will remove device properties associated to parent
      when they share the same firmware node after commit 478573c9 (driver
      core: Don't leak secondary fwnode on device removal).  This was observed
      with a driver adding subdevice that driver wasn't able to read device
      properties after rmmod/modprobe cycle.
      
      Consider the lifecycle of it:
      
      parent device registration
      	ACPI_COMPANION_SET()
      	device_add_properties()
      		pset_copy_set()
      		set_secondary_fwnode(dev, &p->fwnode)
      	device_add()
      
      parent probe
      	read device properties
      	ACPI_COMPANION_SET(subdevice, ACPI_COMPANION(parent))
      	device_add(subdevice)
      
      parent remove
      	device_del(subdevice)
      		device_remove_properties()
      			set_secondary_fwnode(dev, NULL);
      			pset_free()
      
      Parent device will have its primary firmware node pointing to an ACPI
      node and secondary firmware node point to device properties.
      
      ACPI_COMPANION_SET() call in parent probe will set the subdevice's
      firmware node to point to the same 'struct fwnode_handle' and the
      associated secondary firmware node, i.e. the device properties as the
      parent.
      
      When subdevice is deleted in parent remove that will remove those
      device properties and attempt to read device properties in next
      parent probe call will fail.
      
      Fix this by tracking the owner device of device properties and delete
      them only when owner device is being deleted.
      
      Fixes: 478573c9 (driver core: Don't leak secondary fwnode on device removal)
      Cc: 4.9+ <stable@vger.kernel.org> # 4.9+
      Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5ab894ae
  8. 22 7月, 2017 4 次提交
  9. 12 7月, 2017 1 次提交
  10. 22 6月, 2017 5 次提交
  11. 30 3月, 2017 1 次提交
  12. 29 3月, 2017 11 次提交
  13. 07 2月, 2017 3 次提交
  14. 26 6月, 2016 1 次提交
  15. 28 4月, 2016 1 次提交
  16. 09 4月, 2016 1 次提交