Commit Graph

42 Commits

Author SHA1 Message Date
Nícolas F. R. A. Prado f1cebae1db firmware: coreboot: Generate aliases for coreboot modules
Generate aliases for coreboot modules to allow automatic module probing.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Acked-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20240212-coreboot-mod-defconfig-v4-2-d14172676f6d@collabora.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2024-02-17 08:53:05 +08:00
Linus Torvalds 4c7a0c95ad Staging driver updates for 6.7-rc1
Here is the big set of staging driver updates for 6.7-rc1.  A bit bigger
 than 6.6 this time around, as it coincided with the Outreachy and
 mentorship application process, so we got a bunch of new developers
 sending in their first changes, which is nice to see.
 
 Also in here is a removal of the qlge ethernet driver, and the rtl8192u
 wireless driver.  Both of these were very old and no one was maintaining
 them, the wireless driver removal was due to no one using it anymore,
 and no hardware to be found, and is part of a larger effort to remove
 unused and old wifi drivers from the system.
 
 The qlge ethernet driver did have one user pop up after it was dropped,
 and we are working with the network mainainers to figure out what tree
 it will come back in from and who will be responsible for it, and if it
 really is being used or not.  Odds are it will show up in a network
 subsystem pull request after -rc1 is out, but we aren't sure yet.
 
 Other smaller changes in here are:
   - Lots of vc04_services work by Umang to clean up the mess created by
     the rpi developers long ago, bringing it almost into good enough
     shape to get out of staging, hopefully next major release, it's
     getting close.
   - rtl8192e variable cleanups and removal of unused code and structures
   - vme_user coding style cleanups
   - other small coding style cleanups to lots of the staging drivers
   - octeon typedef removals, and then last-minute revert when it was
     found to break the build in some configurations (it's a hard driver
     to build properly, none of the normal automated testing catches it.)
 
 All of these have been in linux-next for a while with no reported
 issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZUTg9w8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymL+QCg2YS9Mbr7W6zNAdRTbDybzp08ZzUAnRHQXUfB
 WbZERHQpNOSTE3HwuW1D
 =tZpl
 -----END PGP SIGNATURE-----

Merge tag 'staging-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here is the big set of staging driver updates for 6.7-rc1. A bit
  bigger than 6.6 this time around, as it coincided with the Outreachy
  and mentorship application process, so we got a bunch of new
  developers sending in their first changes, which is nice to see.

  Also in here is a removal of the qlge ethernet driver, and the
  rtl8192u wireless driver. Both of these were very old and no one was
  maintaining them, the wireless driver removal was due to no one using
  it anymore, and no hardware to be found, and is part of a larger
  effort to remove unused and old wifi drivers from the system.

  The qlge ethernet driver did have one user pop up after it was
  dropped, and we are working with the network mainainers to figure out
  what tree it will come back in from and who will be responsible for
  it, and if it really is being used or not. Odds are it will show up in
  a network subsystem pull request after -rc1 is out, but we aren't sure
  yet.

  Other smaller changes in here are:

   - Lots of vc04_services work by Umang to clean up the mess created by
     the rpi developers long ago, bringing it almost into good enough
     shape to get out of staging, hopefully next major release, it's
     getting close.

   - rtl8192e variable cleanups and removal of unused code and
     structures

   - vme_user coding style cleanups

   - other small coding style cleanups to lots of the staging drivers

   - octeon typedef removals, and then last-minute revert when it was
     found to break the build in some configurations (it's a hard driver
     to build properly, none of the normal automated testing catches
     it.)

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'staging-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (256 commits)
  Revert "staging: octeon: remove typedef in enum cvmx_spi_mode_t"
  Revert "staging: octeon: remove typedef in enum cvmx_helper_interface_mode_t"
  Revert "staging: octeon: remove typedef in enum cvmx_pow_wait_t"
  Revert "staging: octeon: remove typedef in struct cvmx_pko_lock_t"
  Revert "staging: octeon: remove typedef in enum cvmx_pko_status_t"
  Revert "staging: octeon: remove typedef in structs cvmx_pip_port_status_t and cvmx_pko_port_status_t"
  staging: vt6655: Type encoding info dropped from variable name "byRxRate"
  staging: vt6655: Type encoding info dropped from function name "CARDbUpdateTSF"
  staging: vt6655: Type encoding info dropped from function name "CARDvSetRSPINF"
  staging: vt6655: Type encoding info dropped from function name "CARDbyGetPktType"
  staging: vt6655: Type encoding info dropped from variable name "byPacketType"
  staging: vt6655: Type encoding info dropped from function name "CARDbSetPhyParameter"
  staging: vt6655: Type encoding info dropped from variable name "pbyRsvTime"
  staging: vt6655: Type encoding info dropped from variable name "pbyTxRate"
  staging: vt6655: Type encoding info dropped from function name "s_vCalculateOFDMRParameter"
  staging: vt6655: Type encoding info dropped from array name "cwRXBCNTSFOff"
  staging: fbtft: Convert to platform remove callback returning void
  staging: olpc_dcon: Remove I2C_CLASS_DDC support
  staging: vc04_services: use snprintf instead of sprintf
  staging: rtl8192e: Fix line break issue at priv->rx_buf[priv->rx_idx]
  ...
2023-11-03 15:31:04 -10:00
Abhijit Gangurde fa10f41309 cdx: add sysfs for subsystem, class and revision
CDX controller provides subsystem vendor, subsystem device, class and
revision info of the device along with vendor and device ID in native
endian format. CDX Bus system uses this information to bind the cdx
device to the cdx device driver.

Co-developed-by: Puneet Gupta <puneet.gupta@amd.com>
Signed-off-by: Puneet Gupta <puneet.gupta@amd.com>
Co-developed-by: Nipun Gupta <nipun.gupta@amd.com>
Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Tested-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
Link: https://lore.kernel.org/r/20231017160505.10640-8-abhijit.gangurde@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-27 13:23:24 +02:00
Umang Jain 1fa0587758 staging: vc04_services: Support module autoloading using MODULE_DEVICE_TABLE
VC04 has now a independent bus vchiq_bus to register its devices.
However, the module auto-loading for bcm2835-audio and bcm2835-camera
currently happens through MODULE_ALIAS() macro specified explicitly.

The correct way to auto-load a module, is when the alias is picked
out from MODULE_DEVICE_TABLE(). In order to get there, we need to
introduce  vchiq_device_id and add relevant entries in file2alias.c
infrastructure so that aliases can be generated. This patch targets
adding vchiq_device_id and do_vchiq_entry, in order to
generate those alias using the /script/mod/file2alias.c.

Going forward the MODULE_ALIAS() from bcm2835-camera and bcm2835-audio
will be dropped, in favour of MODULE_DEVICE_TABLE being used there.

The alias format for vchiq_bus devices will be "vchiq:<dev_name>".
Adjust the vchiq_bus_uevent() to reflect that.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Link: https://lore.kernel.org/r/20231019090128.430297-2-umang.jain@ideasonboard.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-21 11:56:26 +02:00
Nipun Gupta 234489ac56 vfio/cdx: add support for CDX bus
vfio-cdx driver enables IOCTLs for user space to query
MMIO regions for CDX devices and mmap them. This change
also adds support for reset of CDX devices. With VFIO
enabled on CDX devices, user-space applications can also
exercise DMA securely via IOMMU on these devices.

This change adds the VFIO CDX driver and enables the following
ioctls for CDX devices:
 - VFIO_DEVICE_GET_INFO:
 - VFIO_DEVICE_GET_REGION_INFO
 - VFIO_DEVICE_RESET

Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Tested-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
Link: https://lore.kernel.org/r/20230531124557.11009-1-nipun.gupta@amd.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2023-06-16 12:27:04 -06:00
Nipun Gupta 2959ab2470 cdx: add the cdx bus driver
Introduce AMD CDX bus, which provides a mechanism for scanning
and probing CDX devices. These devices are memory mapped on
system bus for Application Processors(APUs).

CDX devices can be changed dynamically in the Fabric and CDX
bus interacts with CDX controller to rescan the bus and
rediscover the devices.

Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Tested-by: Nikhil Agarwal <nikhil.agarwal@amd.com>
Link: https://lore.kernel.org/r/20230313132636.31850-2-nipun.gupta@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-29 12:26:32 +02:00
Thomas Weißschuh fa443bc3c1 HID: intel-ish-hid: add support for MODULE_DEVICE_TABLE()
This allows to selectively autoload drivers for ISH devices.
Currently all ISH drivers are loaded for all systems having any ISH
device.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2021-11-09 11:41:46 +01:00
Max Gurtovoy cc6711b0bf PCI / VFIO: Add 'override_only' support for VFIO PCI sub system
Expose an 'override_only' helper macro (i.e.
PCI_DRIVER_OVERRIDE_DEVICE_VFIO) for VFIO PCI sub system and add the
required code to prefix its matching entries with "vfio_" in
modules.alias file.

It allows VFIO device drivers to include match entries in the
modules.alias file produced by kbuild that are not used for normal
driver autoprobing and module autoloading. Drivers using these match
entries can be connected to the PCI device manually, by userspace, using
the existing driver_override sysfs.

For example the resulting modules.alias may have:

  alias pci:v000015B3d00001021sv*sd*bc*sc*i* mlx5_core
  alias vfio_pci:v000015B3d00001021sv*sd*bc*sc*i* mlx5_vfio_pci
  alias vfio_pci:v*d*sv*sd*bc*sc*i* vfio_pci

In this example mlx5_core and mlx5_vfio_pci match to the same PCI
device. The kernel will autoload and autobind to mlx5_core but the
kernel and udev mechanisms will ignore mlx5_vfio_pci.

When userspace wants to change a device to the VFIO subsystem it can
implement a generic algorithm:

   1) Identify the sysfs path to the device:
    /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0

   2) Get the modalias string from the kernel:
    $ cat /sys/bus/pci/devices/0000:01:00.0/modalias
    pci:v000015B3d00001021sv000015B3sd00000001bc02sc00i00

   3) Prefix it with vfio_:
    vfio_pci:v000015B3d00001021sv000015B3sd00000001bc02sc00i00

   4) Search modules.alias for the above string and select the entry that
      has the fewest *'s:
    alias vfio_pci:v000015B3d00001021sv*sd*bc*sc*i* mlx5_vfio_pci

   5) modprobe the matched module name:
    $ modprobe mlx5_vfio_pci

   6) cat the matched module name to driver_override:
    echo mlx5_vfio_pci > /sys/bus/pci/devices/0000:01:00.0/driver_override

   7) unbind device from original module
     echo 0000:01:00.0 > /sys/bus/pci/devices/0000:01:00.0/driver/unbind

   8) probe PCI drivers (or explicitly bind to mlx5_vfio_pci)
    echo 0000:01:00.0 > /sys/bus/pci/drivers_probe

The algorithm is independent of bus type. In future the other buses with
VFIO device drivers, like platform and ACPI, can use this algorithm as
well.

This patch is the infrastructure to provide the information in the
modules.alias to userspace. Convert the only VFIO pci_driver which results
in one new line in the modules.alias:

  alias vfio_pci:v*d*sv*sd*bc*sc*i* vfio_pci

Later series introduce additional HW specific VFIO PCI drivers, such as
mlx5_vfio_pci.

Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>  # for pci.h
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20210826103912.128972-11-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2021-08-26 10:36:51 -06:00
Linus Torvalds e229b429bb Char/Misc driver patches for 5.12-rc1
Here is the large set of char/misc/whatever driver subsystem updates for
 5.12-rc1.  Over time it seems like this tree is collecting more and more
 tiny driver subsystems in one place, making it easier for those
 maintainers, which is why this is getting larger.
 
 Included in here are:
 	- coresight driver updates
 	- habannalabs driver updates
 	- virtual acrn driver addition (proper acks from the x86
 	  maintainers)
 	- broadcom misc driver addition
 	- speakup driver updates
 	- soundwire driver updates
 	- fpga driver updates
 	- amba driver updates
 	- mei driver updates
 	- vfio driver updates
 	- greybus driver updates
 	- nvmeem driver updates
 	- phy driver updates
 	- mhi driver updates
 	- interconnect driver udpates
 	- fsl-mc bus driver updates
 	- random driver fix
 	- some small misc driver updates (rtsx, pvpanic, etc.)
 
 All of these have been in linux-next for a while, with the only reported
 issue being a merge conflict in include/linux/mod_devicetable.h that you
 will hit in your tree due to the dfl_device_id addition from the fpga
 subsystem in here.  The resolution should be simple.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYDZf9w8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yk3xgCcCEN+pCJTum+uAzSNH3YKs/onaDgAnRSVwOUw
 tNW6n1JhXLYl9f5JdhvS
 =MOHs
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver updates from Greg KH:
 "Here is the large set of char/misc/whatever driver subsystem updates
  for 5.12-rc1. Over time it seems like this tree is collecting more and
  more tiny driver subsystems in one place, making it easier for those
  maintainers, which is why this is getting larger.

  Included in here are:

   - coresight driver updates

   - habannalabs driver updates

   - virtual acrn driver addition (proper acks from the x86 maintainers)

   - broadcom misc driver addition

   - speakup driver updates

   - soundwire driver updates

   - fpga driver updates

   - amba driver updates

   - mei driver updates

   - vfio driver updates

   - greybus driver updates

   - nvmeem driver updates

   - phy driver updates

   - mhi driver updates

   - interconnect driver udpates

   - fsl-mc bus driver updates

   - random driver fix

   - some small misc driver updates (rtsx, pvpanic, etc.)

  All of these have been in linux-next for a while, with the only
  reported issue being a merge conflict due to the dfl_device_id
  addition from the fpga subsystem in here"

* tag 'char-misc-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (311 commits)
  spmi: spmi-pmic-arb: Fix hw_irq overflow
  Documentation: coresight: Add PID tracing description
  coresight: etm-perf: Support PID tracing for kernel at EL2
  coresight: etm-perf: Clarify comment on perf options
  ACRN: update MAINTAINERS: mailing list is subscribers-only
  regmap: sdw-mbq: use MODULE_LICENSE("GPL")
  regmap: sdw: use no_pm routines for SoundWire 1.2 MBQ
  regmap: sdw: use _no_pm functions in regmap_read/write
  soundwire: intel: fix possible crash when no device is detected
  MAINTAINERS: replace my with email with replacements
  mhi: Fix double dma free
  uapi: map_to_7segment: Update example in documentation
  uio: uio_pci_generic: don't fail probe if pdev->irq equals to IRQ_NOTCONNECTED
  drivers/misc/vmw_vmci: restrict too big queue size in qp_host_alloc_queue
  firewire: replace tricky statement by two simple ones
  vme: make remove callback return void
  firmware: google: make coreboot driver's remove callback return void
  firmware: xilinx: Use explicit values for all enum values
  sample/acrn: Introduce a sample of HSM ioctl interface usage
  virt: acrn: Introduce an interface for Service VM to control vCPU
  ...
2021-02-24 10:25:37 -08:00
Xu Yilun 4a224acec5 fpga: dfl: add dfl bus support to MODULE_DEVICE_TABLE()
Device Feature List (DFL) is a linked list of feature headers within the
device MMIO space. It is used by FPGA to enumerate multiple sub features
within it. Each feature can be uniquely identified by DFL type and
feature id, which can be read out from feature headers.

A dfl bus helps DFL framework modularize DFL device drivers for
different sub features. The dfl bus matches its devices and drivers by
DFL type and feature id.

This patch adds dfl bus support to MODULE_DEVICE_TABLE() by adding info
about struct dfl_device_id in devicetable-offsets.c and add a dfl entry
point in file2alias.c.

Acked-by: Wu Hao <hao.wu@intel.com>
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Wu Hao <hao.wu@intel.com>
Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Link: https://lore.kernel.org/r/20210107043714.991646-6-mdf@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-07 15:21:27 +01:00
Maximilian Luz eb0e90a820 platform/surface: aggregator: Add dedicated bus and device type
The Surface Aggregator EC provides varying functionality, depending on
the Surface device. To manage this functionality, we use dedicated
client devices for each subsystem or virtual device of the EC. While
some of these clients are described as standard devices in ACPI and the
corresponding client drivers can be implemented as platform drivers in
the kernel (making use of the controller API already present), many
devices, especially on newer Surface models, cannot be found there.

To simplify management of these devices, we introduce a new bus and
client device type for the Surface Aggregator subsystem. The new device
type takes care of managing the controller reference, essentially
guaranteeing its validity for as long as the client device exists, thus
alleviating the need to manually establish device links for that purpose
in the client driver (as has to be done with the platform devices).

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20201221183959.1186143-7-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2021-01-07 00:06:39 +01:00
Dave Ertman 7de3697e9c Add auxiliary bus support
Add support for the Auxiliary Bus, auxiliary_device and auxiliary_driver.
It enables drivers to create an auxiliary_device and bind an
auxiliary_driver to it.

The bus supports probe/remove shutdown and suspend/resume callbacks.
Each auxiliary_device has a unique string based id; driver binds to
an auxiliary_device based on this id through the bus.

Co-developed-by: Kiran Patil <kiran.patil@intel.com>
Co-developed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Co-developed-by: Fred Oh <fred.oh@linux.intel.com>
Co-developed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Martin Habets <mhabets@solarflare.com>
Link: https://lore.kernel.org/r/20201113161859.1775473-2-david.m.ertman@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/160695681289.505290.8978295443574440604.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-04 12:23:25 +01:00
Pierre-Louis Bossart b5924268d6 soundwire: extend SDW_SLAVE_ENTRY
The SoundWire 1.2 specification adds new capabilities that were not
present in previous version, such as the class ID.

To enable support for class drivers, and well as drivers that address
a specific version, all fields of the sdw_device_id structure need to
be exposed. For SoundWire 1.0 and 1.1 devices, a wildcard is used so
class and version information are ignored.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20200608205436.2402-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-06-30 21:26:17 +05:30
Linus Torvalds 0ad5b053d4 Char/Misc driver patches for 5.7-rc1
Here is the big set of char/misc/other driver patches for 5.7-rc1.
 
 Lots of things in here, and it's later than expected due to some reverts
 to resolve some reported issues.  All is now clean with no reported
 problems in linux-next.
 
 Included in here is:
 	- interconnect updates
 	- mei driver updates
 	- uio updates
 	- nvmem driver updates
 	- soundwire updates
 	- binderfs updates
 	- coresight updates
 	- habanalabs updates
 	- mhi new bus type and core
 	- extcon driver updates
 	- some Kconfig cleanups
 	- other small misc driver cleanups and updates
 
 As mentioned, all have been in linux-next for a while, and with the last
 two reverts, all is calm and good.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXodfvA8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynzCQCfROhar3E8EhYEqSOP6xq6uhX9uegAnRgGY2rs
 rN4JJpOcTddvZcVlD+vo
 =ocWk
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver updates from Greg KH:
 "Here is the big set of char/misc/other driver patches for 5.7-rc1.

  Lots of things in here, and it's later than expected due to some
  reverts to resolve some reported issues. All is now clean with no
  reported problems in linux-next.

  Included in here is:
   - interconnect updates
   - mei driver updates
   - uio updates
   - nvmem driver updates
   - soundwire updates
   - binderfs updates
   - coresight updates
   - habanalabs updates
   - mhi new bus type and core
   - extcon driver updates
   - some Kconfig cleanups
   - other small misc driver cleanups and updates

  As mentioned, all have been in linux-next for a while, and with the
  last two reverts, all is calm and good"

* tag 'char-misc-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (174 commits)
  Revert "driver core: platform: Initialize dma_parms for platform devices"
  Revert "amba: Initialize dma_parms for amba devices"
  amba: Initialize dma_parms for amba devices
  driver core: platform: Initialize dma_parms for platform devices
  bus: mhi: core: Drop the references to mhi_dev in mhi_destroy_device()
  bus: mhi: core: Initialize bhie field in mhi_cntrl for RDDM capture
  bus: mhi: core: Add support for reading MHI info from device
  misc: rtsx: set correct pcr_ops for rts522A
  speakup: misc: Use dynamic minor numbers for speakup devices
  mei: me: add cedar fork device ids
  coresight: do not use the BIT() macro in the UAPI header
  Documentation: provide IBM contacts for embargoed hardware
  nvmem: core: remove nvmem_sysfs_get_groups()
  nvmem: core: use is_bin_visible for permissions
  nvmem: core: use device_register and device_unregister
  nvmem: core: add root_only member to nvmem device struct
  extcon: axp288: Add wakeup support
  extcon: Mark extcon_get_edev_name() function as exported symbol
  extcon: palmas: Hide error messages if gpio returns -EPROBE_DEFER
  dt-bindings: extcon: usbc-cros-ec: convert extcon-usbc-cros-ec.txt to yaml format
  ...
2020-04-03 13:22:40 -07:00
Manivannan Sadhasivam e6b0de469c bus: mhi: core: Add uevent support for module autoloading
Add uevent support to MHI bus so that the client drivers can be autoloaded
by udev when the MHI devices gets created. The client drivers are
expected to provide MODULE_DEVICE_TABLE with the MHI id_table struct so
that the alias can be exported.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org>
Tested-by: Jeffrey Hugo <jhugo@codeaurora.org>
Link: https://lore.kernel.org/r/20200220095854.4804-13-manivannan.sadhasivam@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-19 07:41:05 +01:00
Boris Brezillon 1ce589ad39 i3c: Generate aliases for i3c modules
This part was missing, thus preventing user space from loading modules
automatically when MODALIAS uevents are received.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Vitor Soares <vitor.soares@synopsys.com>
Link: https://lore.kernel.org/linux-i3c/79687073b915182e06fccfb18adcedfd0fadbc99.1582796652.git.vitor.soares@synopsys.com
2020-02-28 09:36:00 +01:00
Linus Torvalds dbbdf54c72 platform-drivers-x86 for v5.1-1
Use MODULE_DEVICE_TABLE across several wmi drivers, keeping
 wmi_device_id and MODULE_ALIAS() declarations in sync. Add several
 Ideapad models to the no_hw_rfkill list. Add support for new Mellanox
 platforms, including new fan and LED functionality. Address Dell
 keyboard backlight change event and power button release issues. Update
 dell_rbu to use appropriate memory allocation mechanisms. Several small
 fixes and Ice Lake support for intel_pmc_core. Fix a suspend regression
 for Cherry Trail based devices in intel_int0002_vgpio. A few other
 routine fixes.
 
 The following is an automated git shortlog grouped by driver:
 
 ACPI / scan:
  -  Create platform device for BSG2150 ACPI nodes
 
 Documentation/ABI:
  -  Add new attribute for mlxreg-io sysfs interfaces
  -  Correct mlxreg-io KernelVersion for 5.0
 
 MAINTAINERS:
  -  Include mlxreg.h in Mellanox Platform Driver files
 
 asus-wmi:
  -  Allow loading on systems without the Asus Management GUID
 
 dell-smbios-wmi:
  -  use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
 
 dell-wmi:
  -  use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  -  Ignore new keyboard backlight change event
 
 dell-wmi-descriptor:
  -  use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
 
 dell_rbu:
  -  fix lock imbalance in img_update_realloc
  -  stop abusing the DMA API
 
 huawei-wmi:
  -  use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
 
 ideapad-laptop:
  -  Add ideapad 330-15ICH to no_hw_rfkill
  -  Add S130-14IGM to no_hw_rfkill list
  -  Add Ideapad 530S-14ARR to no_hw_rfkill list
  -  Add Yoga C930 to no_hw_rfkill_list
  -  Add Y530-I5ICH-1060 to no_hw_rfkill list
  -  Fix no_hw_rfkill_list for Lenovo RESCUER R720-15IKBN
 
 intel-hid:
  -  Missing power button release on some Dell models
 
 intel-wmi-thunderbolt:
  -  use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
 
 intel_int0002_vgpio:
  -  Only implement irq_set_wake on Bay Trail
 
 intel_pmc_core:
  -  Quirk to ignore XTAL shutdown
  -  Add Package cstates residency info
  -  Add ICL platform support
  -  Convert to INTEL_CPU_FAM6 macro
  -  Avoid a u32 overflow
  -  Include Reserved IP for LTR
  -  Fix file permissions for ltr_show
  -  Fix PCH IP name
  -  Fix PCH IP sts reading
  -  Handle CFL regmap properly
 
 leds:
  -  mlxreg: Add support for capability register
 
 mlx-platform:
  -  Fix access mode for fan_dir attribute
  -  Add UID LED for the next generation systems
  -  Add extra CPLD for next generation systems
  -  Add support for new VMOD0007 board name
  -  Add support for fan capability registers
  -  Add support for fan direction register
 
 modpost:
  -  file2alias: define size of alias
 
 platform/mellanox:
  -  mlxreg-hotplug: Fix KASAN warning
 
 platform_data/mlxreg:
  -  Add capability field to core platform data
  -  Document fixes for core platform data
 
 touchscreen_dmi:
  -  Add info for the CHUWI Hi10 Air tablet
  -  Add info for the Chuwi Hi8 Air tablet
  -  Add info for the PoV Wintab P1006w (v1.0) tablet
 
 wmi:
  -  add WMI support to MODULE_DEVICE_TABLE()
  -  move struct wmi_device_id to mod_devicetable.h
  -  fix potential null pointer dereference
 
 wmi-bmof:
  -  use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
 
 x86/CPU:
  -  Add Icelake model number
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEE9M1dh6j+oEL41EZIXFIlAfdBhuEFAlyCu1EACgkQXFIlAfdB
 huFASAf/d0Y6uqhLD3G7cL2kXjOWoTE9ouWUwv19bBpnohGmD3OMMap4y1lb6nRR
 thCJRhpmX4ObS2adAC4otiOxTzmVoYGsuS9kfBwhKIby2VYHCCxxaTUs6bzMdOfV
 GsbaMA+vfb29bU4DcWlRtYZIz2FC5oyjW4ZmcMA6KtuBGjG9K1fG5zANQe4H8I0e
 zCdcrXhpDGIBJgaJR2N42EUCJruPoEXYfHa1G4B/QKvuW0CXHAdSE0YrN4ju+S3e
 Ew9ZXhoxRaqlu+ZB7H5Kyy6Mg3ZGMzbeYyQFLk5f2yiKSTFNiqwTEJl1aE2JSpy3
 g8Im+6E44/4G8QOL40g5XwmrxHw5mA==
 =Bx4o
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v5.1-1' of git://git.infradead.org/linux-platform-drivers-x86

Pull x86 platform driver updates from Darren Hart:

 - use MODULE_DEVICE_TABLE across several wmi drivers, keeping
   wmi_device_id and MODULE_ALIAS() declarations in sync

 - add several Ideapad models to the no_hw_rfkill list

 - add support for new Mellanox platforms, including new fan and LED
   functionality

 - address Dell keyboard backlight change event and power button release
   issues

 - update dell_rbu to use appropriate memory allocation mechanisms

 - several small fixes and Ice Lake support for intel_pmc_core

 - fix a suspend regression for Cherry Trail based devices in
   intel_int0002_vgpio

 - a few other routine fixes

* tag 'platform-drivers-x86-v5.1-1' of git://git.infradead.org/linux-platform-drivers-x86: (50 commits)
  MAINTAINERS: Include mlxreg.h in Mellanox Platform Driver files
  platform/x86: ideapad-laptop: Add S130-14IGM to no_hw_rfkill list
  platform/x86: mlx-platform: Fix access mode for fan_dir attribute
  platform/x86: mlx-platform: Add UID LED for the next generation systems
  platform/x86: mlx-platform: Add extra CPLD for next generation systems
  platform/x86: wmi-bmof: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: intel-wmi-thunderbolt: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: huawei-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: dell-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: dell-wmi-descriptor: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: dell-smbios-wmi: use MODULE_DEVICE_TABLE() instead of MODULE_ALIAS()
  platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE()
  platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
  modpost: file2alias: define size of alias
  platform/x86: touchscreen_dmi: Add info for the CHUWI Hi10 Air tablet
  platform/x86: ideapad-laptop: Add Ideapad 530S-14ARR to no_hw_rfkill list
  platform/x86: ideapad-laptop: Add Yoga C930 to no_hw_rfkill_list
  platform/x86: intel_pmc_core: Quirk to ignore XTAL shutdown
  platform/x86: intel_pmc_core: Add Package cstates residency info
  platform/x86: intel_pmc_core: Add ICL platform support
  ...
2019-03-10 13:16:37 -07:00
Mattias Jacobsson 0bc44b2b8b platform/x86: wmi: add WMI support to MODULE_DEVICE_TABLE()
The kernel provides the macro MODULE_DEVICE_TABLE() where driver authors
can specify their device type and their array of device_ids and thereby
trigger the generation of the appropriate MODULE_ALIAS() output. This is
opposed to having to specify one MODULE_ALIAS() for each device. The WMI
device type is currently not supported.

While using MODULE_DEVICE_TABLE() does increase the complexity as well
as spreading out the implementation across the kernel, it does come with
some benefits too;
* It makes different drivers look more similar; if you can specify the
  array of device_ids any device type specific input to MODULE_ALIAS()
  will automatically be generated for you.
* It helps each driver avoid keeping multiple versions of the same
  information in sync. That is, both the array of device_ids and the
  potential multitude of MODULE_ALIAS()'s.

Add WMI support to MODULE_DEVICE_TABLE() by adding info about struct
wmi_device_id in devicetable-offsets.c and add a WMI entry point in
file2alias.c.

The type argument for MODULE_DEVICE_TABLE(type, name) is wmi.

Suggested-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
2019-03-07 08:46:29 -08:00
Sumit Garg 0fc1db9d10 tee: add bus driver framework for TEE based devices
Introduce a generic TEE bus driver concept for TEE based kernel drivers
which would like to communicate with TEE based devices/services. Also
add support in module device table for these new TEE based devices.

In this TEE bus concept, devices/services are identified via Universally
Unique Identifier (UUID) and drivers register a table of device UUIDs
which they can support.

So this TEE bus framework registers following apis:
- match(): Iterates over the driver UUID table to find a corresponding
  match for device UUID. If a match is found, then this particular device
  is probed via corresponding probe api registered by the driver. This
  process happens whenever a device or a driver is registered with TEE
  bus.
- uevent(): Notifies user-space (udev) whenever a new device is registered
  on this bus for auto-loading of modularized drivers.

Also this framework allows for device enumeration to be specific to
corresponding TEE implementation like OP-TEE etc.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Bhupesh Sharma <bhsharma@redhat.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
2019-02-01 15:12:46 +01:00
Heikki Krogerus 8a37d87d72 usb: typec: Bus type for alternate modes
Introducing a simple bus for the alternate modes. Bus allows
binding drivers to the discovered alternate modes the
partners support.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02 17:42:36 +02:00
Andrew F. Davis 5b7d127726 rpmsg: Correct support for MODULE_DEVICE_TABLE()
Due to missing a missing entry in file2alias.c MODULE_DEVICE_TABLE() are
not generating the proper module aliases. Add the needed entry here.

Fixes: bcabbccabf ("rpmsg: add virtio-based remote processor messaging bus")
Reported-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 16:33:48 +02:00
Vinod Koul 9251345dca soundwire: Add SoundWire bus type
This adds the base SoundWire bus type, bus and driver registration.
along with changes to module device table for new SoundWire
device type.

Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Acked-By: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-19 11:14:56 +01:00
David S. Miller 2a171788ba Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Files removed in 'net-next' had their license header updated
in 'net'.  We take the remove from 'net-next'.

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-11-04 09:26:51 +09:00
Greg Kroah-Hartman b24413180f License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained >5
   lines of source
 - File already had some variant of a license header in it (even if <5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02 11:10:55 +01:00
David S. Miller e1ea2f9856 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several conflicts here.

NFP driver bug fix adding nfp_netdev_is_nfp_repr() check to
nfp_fl_output() needed some adjustments because the code block is in
an else block now.

Parallel additions to net/pkt_cls.h and net/sch_generic.h

A bug fix in __tcp_retransmit_skb() conflicted with some of
the rbtree changes in net-next.

The tc action RCU callback fixes in 'net' had some overlap with some
of the recent tcf_block reworking.

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-30 21:09:24 +09:00
Dmitry Torokhov 09c3e01b25 Input: do not use property bits when generating module alias
The commit 8724ecb072 ("Input: allow matching device IDs on property
bits") started using property bits when generating module aliases for input
handlers, but did not adjust the generation of MODALIAS attribute on input
device uevents, breaking automatic module loading. Given that no handler
currently uses property bits in their module tables, let's revert this part
of the commit for now.

Reported-by: Damien Wyart <damien.wyart@gmail.com>
Tested-by: Damien Wyart <damien.wyart@gmail.com>
Fixes: 8724ecb072 ("Input: allow matching device IDs on property bits")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-22 12:49:59 -07:00
David S. Miller f8ddadc4db Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
There were quite a few overlapping sets of changes here.

Daniel's bug fix for off-by-ones in the new BPF branch instructions,
along with the added allowances for "data_end > ptr + x" forms
collided with the metadata additions.

Along with those three changes came veritifer test cases, which in
their final form I tried to group together properly.  If I had just
trimmed GIT's conflict tags as-is, this would have split up the
meta tests unnecessarily.

In the socketmap code, a set of preemption disabling changes
overlapped with the rename of bpf_compute_data_end() to
bpf_compute_data_pointers().

Changes were made to the mv88e6060.c driver set addr method
which got removed in net-next.

The hyperv transport socket layer had a locking change in 'net'
which overlapped with a change of socket state macro usage
in 'net-next'.

Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-22 13:39:14 +01:00
Dmitry Torokhov 8724ecb072 Input: allow matching device IDs on property bits
Let's allow matching input devices on their property bits, both in-kernel
and when generating module aliases.

Tested-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-19 16:54:49 -07:00
Mika Westerberg d1ff70241a thunderbolt: Add support for XDomain discovery protocol
When two hosts are connected over a Thunderbolt cable, there is a
protocol they can use to communicate capabilities supported by the host.
The discovery protocol uses automatically configured control channel
(ring 0) and is build on top of request/response transactions using
special XDomain primitives provided by the Thunderbolt base protocol.

The capabilities consists of a root directory block of basic properties
used for identification of the host, and then there can be zero or more
directories each describing a Thunderbolt service and its capabilities.

Once both sides have discovered what is supported the two hosts can
setup high-speed DMA paths and transfer data to the other side using
whatever protocol was agreed based on the properties. The software
protocol used to communicate which DMA paths to enable is service
specific.

This patch adds support for the XDomain discovery protocol to the
Thunderbolt bus. We model each remote host connection as a Linux XDomain
device. For each Thunderbolt service found supported on the XDomain
device, we create Linux Thunderbolt service device which Thunderbolt
service drivers can then bind to based on the protocol identification
information retrieved from the property directory describing the
service.

This code is based on the work done by Amir Levy and Michael Jamet.

Signed-off-by: Michael Jamet <michael.jamet@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-10-02 11:24:41 -07:00
Stuart Yoder 0afef45654 staging: fsl-mc: add support for device table matching
Move the definition of fsl_mc_device_id to its proper location in
mod_devicetable.h, and add fsl-mc bus support to devicetable-offsets.c
and file2alias.c to enable device table matching.  With this patch udev
based module loading of fsl-mc drivers is supported.

Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-26 17:14:03 -07:00
Linus Torvalds 0280d1a099 sound updates for 4.4-rc1
Here is the first batch of updates for sound system on 4.4-rc1.
 Again at this time, the update looks fairly calm; no big changes in
 either ALSA core or ASoC infrastructures, rather all small cleanups,
 in addition to the new stuff as usual.
 
 The biggest changes are about Firewire sound devices.  It gained lots
 of new device support, and MIDI functionality.  Also there are updates
 for a few still working-in-progress stuff (topology API and ASoC
 skylake), too.  But overall, this update should give no big surprise.
 
 Some highlight is below:
 
 Core:
  - A few more Kconfig items for tinification; it's marked as EXPERT,
    so normal user should't be bothered :)
  - Refactoring with a new PCM hw_constraint helper
  - Removal of unused transfer_ack_{begin,end} PCM callbacks
 
 Firewire:
  - Restructuring of code subtree, lots of refactoring
  - Support AMDTP variants
  - New driver for Digidesign 002/003 family
  - Adds support for TASCAM FireOne to ALSA OXFW driver
  - Add MIDI support to TASCAM and Digi00x devices
 
 HD-Audio:
  - Automated modalias generation for codec drivers, finally
  - Improvement on heuristics for setting mixer name
  - A few fixes for longstanding bugs on Creative CA0132 cards
  - Addition of audio rate callback with i915 communication
  - Fix suspend issue on recent Dell XPS
  - Intel Lewisburg controller support
 
 ASoC:
  - Updates to the topology userspace interface
  - Big updates to the Renesas support (rcar)
  - More updates for supporting Intel Sky Lake systems
  - New drivers for Asahi Kasei Microdevices AK4613, Allwinnner A10,
    Cirrus Logic WM8998, Dialog DA7219, Nuvoton NAU8825, Rockchip
    S/PDIF, and Atmel class D amplifier
 
 USB-Audio:
  - A fix for newer Roland MIDI devices
  - Quirks and workarounds for Zoom R16/24 device
 
 Misc:
  - A few fixes for some old Cirrus CS46xx PCI sound boards
  - Yet another fixes for some old ESS Maestro3 PCI sound boards
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWPNI9AAoJEGwxgFQ9KSmkOGIP+wUX4eIWwV4BK3mTjdPgvB+i
 M7niITY+baN6WqoX8Impe6CyvdOed/pQyHqkT8NFthhmYrgVU9iJBykgF1+BOPt3
 ZtYb0qi2mOPbTL0mwFv6oDu8Nvh6hBdCz6ZepQQdjyG4QBdLs7Cea3o3ncJEgsqI
 H9LHcCjwSIi4wAcIFVCiD2rJnI/sqhyH2jm9ay8TWDPkBnUBC0Pz1aE+DIbb5x5G
 m53rVTjE2dU5MQJrG+rQyH5ngR51Qs6XLYLSnkMXBrZPSP5UQxM282pG19ILumFK
 b5uOKWC2DyeWkmDTglAQXaSSbI+3Sj+W+oo05z51Pz2b8YEvehl2XjJpeB0Nlez/
 q+i/c8LnUYV8MPlJdldC1jZO8MVRYEX5fEWm1Hwie+q1YozFkhxIfwKCdXnazpYE
 ga9E5t/Utg0Rclb2vlYuHv3A4RmY1CW7VazP6PwZjhrahPMxN6zU8aTe+OzBJxkT
 i8Ka+R7mMCVyAfauNuBcQtJ+cY+6JbOXsT/5BWTGW0qsa9V17uUOXriAYyNBLwFL
 zcBa8OXHtYoiPbWIgE5rJUmRqTXJaOlNYyuot+AT2K7bOW9KMXmEROaSXyVNoqR8
 AVZHVmByViI8TuQ98L7vakvyHSKoi4x1Aq/ODrS4Ya4+5T60PmVTyCxT7UUE0FNo
 V39cwMFp8TCMifTeRP/+
 =l9SO
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "Here is the first batch of updates for sound system on 4.4-rc1.

  Again at this time, the update looks fairly calm; no big changes in
  either ALSA core or ASoC infrastructures, rather all small cleanups,
  in addition to the new stuff as usual.

  The biggest changes are about Firewire sound devices.  It gained lots
  of new device support, and MIDI functionality.  Also there are updates
  for a few still working-in-progress stuff (topology API and ASoC
  skylake), too.  But overall, this update should give no big surprise.

  Some highlights are below:

  Core:
   - A few more Kconfig items for tinification; it's marked as EXPERT,
     so normal user should't be bothered :)
   - Refactoring with a new PCM hw_constraint helper
   - Removal of unused transfer_ack_{begin,end} PCM callbacks

  Firewire:
   - Restructuring of code subtree, lots of refactoring
   - Support AMDTP variants
   - New driver for Digidesign 002/003 family
   - Adds support for TASCAM FireOne to ALSA OXFW driver
   - Add MIDI support to TASCAM and Digi00x devices

  HD-Audio:
   - Automated modalias generation for codec drivers, finally
   - Improvement on heuristics for setting mixer name
   - A few fixes for longstanding bugs on Creative CA0132 cards
   - Addition of audio rate callback with i915 communication
   - Fix suspend issue on recent Dell XPS
   - Intel Lewisburg controller support

  ASoC:
   - Updates to the topology userspace interface
   - Big updates to the Renesas support (rcar)
   - More updates for supporting Intel Sky Lake systems
   - New drivers for Asahi Kasei Microdevices AK4613, Allwinnner A10,
     Cirrus Logic WM8998, Dialog DA7219, Nuvoton NAU8825, Rockchip
     S/PDIF, and Atmel class D amplifier

  USB-Audio:
   - A fix for newer Roland MIDI devices
   - Quirks and workarounds for Zoom R16/24 device

  Misc:
   - A few fixes for some old Cirrus CS46xx PCI sound boards
   - Yet another fixes for some old ESS Maestro3 PCI sound boards"

* tag 'sound-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (330 commits)
  ALSA: hda - Add Intel Lewisburg device IDs Audio
  ALSA: hda - Apply pin fixup for HP ProBook 6550b
  ALSA: hda - Fix lost 4k BDL boundary workaround
  ALSA: maestro3: Fix Allegro mute until master volume/mute is touched
  ALSA: maestro3: Enable docking support for Dell Latitude C810
  ALSA: firewire-digi00x: add another rawmidi character device for MIDI control ports
  ALSA: firewire-digi00x: add MIDI operations for MIDI control port
  ALSA: firewire-digi00x: rename identifiers of MIDI operation for physical ports
  ALSA: cs46xx: Fix suspend for all channels
  ALSA: cs46xx: Fix Duplicate front for CS4294 and CS4298 codecs
  ALSA: DocBook: Add soc-ops.c and soc-compress.c
  ALSA: hda - Add / fix kernel doc comments
  ALSA: Constify ratden/ratnum constraints
  ALSA: hda - Disable 64bit address for Creative HDA controllers
  ALSA: hda/realtek - Dell XPS one ALC3260 speaker no sound after resume back
  ALSA: hda/ca0132 - Convert leftover pr_info() and pr_err()
  ASoC: fsl: Use #ifdef instead of #if for CONFIG_PM_SLEEP
  ASoC: rt5645: Sort the order for register bit defines
  ASoC: dwc: add check for master/slave format
  ASoC: rt5645: Add the HWEQ for the speaker output
  ...
2015-11-06 11:04:07 -08:00
Subhransu S. Prusty da23ac1e40 ALSA: hda - Add hduadio support to DEVTABLE
For generating modalias entries automatically, move the definition of
struct hda_device_id to linux/mod_devicetable.h and add the handling
of this record in file2alias helper.  The new modalias is represented
with combination of vendor id, device id, and api version as
"hdaudio:vNrNaN".

This patch itself doesn't convert the existing modaliases.  Since they
were added manually, this patch won't give any regression by itself at
this point.

[Modified the modalias format to adapt the api_version field, and drop
 invalid ANY_ID definition by tiwai]

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Reviewed-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-10-20 10:14:42 +02:00
Tomas Winkler b26864cad1 mei: bus: add client protocol version to the device alias
The device alias now looks like mei:S:uuid:N:*
In that way we can bind different drivers to clients with
different protocol versions if required.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-20 19:30:10 -07:00
Suthikulpanit, Suravee 26095a01d3 ACPI / scan: Add support for ACPI _CLS device matching
Device drivers typically use ACPI _HIDs/_CIDs listed in struct device_driver
acpi_match_table to match devices. However, for generic drivers, we do not
want to list _HID for all supported devices. Also, certain classes of devices
do not have _CID (e.g. SATA, USB). Instead, we can leverage ACPI _CLS,
which specifies PCI-defined class code (i.e. base-class, subclass and
programming interface). This patch adds support for matching ACPI devices using
the _CLS method.

To support loadable module, current design uses _HID or _CID to match device's
modalias. With the new way of matching with _CLS this would requires modification
to the current ACPI modalias key to include _CLS. This patch appends PCI-defined
class-code to the existing ACPI modalias as following.

    acpi:<HID>:<CID1>:<CID2>:..:<CIDn>:<bbsspp>:
E.g:
    # cat /sys/devices/platform/AMDI0600:00/modalias
    acpi:AMDI0600:010601:

where bb is th base-class code, ss is te sub-class code, and pp is the
programming interface code

Since there would not be _HID/_CID in the ACPI matching table of the driver,
this patch adds a field to acpi_device_id to specify the matching _CLS.

    static const struct acpi_device_id ahci_acpi_match[] = {
        { ACPI_DEVICE_CLASS(PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff) },
        {},
    };

In this case, the corresponded entry in modules.alias file would be:

    alias acpi*:010601:* ahci_platform

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-07 01:55:20 +02:00
Linus Torvalds 2a298679b4 USB patches for 4.2-rc1
Here's the big USB patchset for 4.2-rc1.  As is normal these days, the
 majority of changes are in the gadget drivers, with a bunch of other
 small driver changes.
 
 All of these have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlWNobIACgkQMUfUDdst+ylXtQCgwTnzFBzly+3h1Npa2CWkr/Lw
 TWAAn31qEP28MLjm8iVJLNPwdVd2kt1w
 =hrdz
 -----END PGP SIGNATURE-----

Merge tag 'usb-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB updates from Greg KH:
 "Here's the big USB patchset for 4.2-rc1.  As is normal these days, the
  majority of changes are in the gadget drivers, with a bunch of other
  small driver changes.

  All of these have been in linux-next with no reported issues"

* tag 'usb-4.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (175 commits)
  usb: dwc3: Use ASCII space in Kconfig
  usb: chipidea: add work-around for Marvell HSIC PHY startup
  usb: chipidea: allow multiple instances to use default ci_default_pdata
  dt-bindings: Consolidate ChipIdea USB ci13xxx bindings
  phy: add Marvell HSIC 28nm PHY
  phy: Add Marvell USB 2.0 OTG 28nm PHY
  dt-bindings: Add Marvell PXA1928 USB and HSIC PHY bindings
  USB: ssb: use devm_kzalloc
  USB: ssb: fix error handling in ssb_hcd_create_pdev()
  usb: isp1760: check for null return from kzalloc
  cdc-acm: Add support of ATOL FPrint fiscal printers
  usb: chipidea: usbmisc_imx: Remove unneeded semicolon
  USB: usbtmc: add device quirk for Rigol DS6104
  USB: serial: mos7840: Use setup_timer
  phy: twl4030-usb: add ABI documentation
  phy: twl4030-usb: remove incorrect pm_runtime_get_sync() in probe function.
  phy: twl4030-usb: remove pointless 'suspended' test in 'suspend' callback.
  phy: twl4030-usb: make runtime pm more reliable.
  drivers:usb:fsl: Fix compilation error for fsl ehci drv
  usb: renesas_usbhs: Don't disable the pipe if Control write status stage
  ...
2015-06-26 15:59:26 -07:00
Tomas Winkler c93b76b34b mei: bus: report also uuid in module alias
In order to automate modules matching add device uuid
which is reported in client enumeration, keep also
the name that is needed in for nfc distinguishing radio vendor

Report mei:name:uuid

Cc: linux-api@vger.kernel.org
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24 11:15:54 -07:00
Heikki Krogerus 289fcff4bc usb: add bus type for USB ULPI
UTMI+ Low Pin Interface (ULPI) is a commonly used PHY
interface for USB 2.0. The ULPI specification describes a
standard set of registers which the vendors can extend for
their specific needs. ULPI PHYs provide often functions
such as charger detection and ADP sensing and probing.

There are two major issues that the bus type is meant to
tackle:

Firstly, ULPI registers are accessed from the controller.
The bus provides convenient method for the controller
drivers to share that access with the actual PHY drivers.

Secondly, there are already platforms that assume ULPI PHYs
are runtime detected, such as many Intel Baytrail based
platforms. They do not provide any kind of hardware
description for the ULPI PHYs like separate ACPI device
object that could be used to enumerate a device from.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-13 12:04:55 -05:00
James Hogan 8286ae0330 MIPS: Add CDMM bus support
Add MIPS Common Device Memory Map (CDMM) support in the form of a bus in
the standard Linux device model. Each device attached via CDMM is
discoverable via an 8-bit type identifier and may contain a number of
blocks of memory mapped registers in the CDMM region. IRQs are expected
to be handled separately.

Due to the per-cpu (per-VPE for MT cores) nature of the CDMM devices,
all the driver callbacks take place from workqueues which are run on the
right CPU for the device in question, so that the driver doesn't need to
be as concerned about which CPU it is running on. Callbacks also exist
for when CPUs are taken offline, so that any per-CPU resources used by
the driver can be disabled so they don't get forcefully migrated. CDMM
devices are created as children of the CPU device they are attached to.

Any existing CDMM configuration by the bootloader will be inherited,
however platforms wishing to enable CDMM should implement the weak
mips_cdmm_phys_base() function (see asm/cdmm.h) so that the bus driver
knows where it should put the CDMM region in the physical address space
if the bootloader hasn't already enabled it.

A mips_cdmm_early_probe() function is also provided to allow early boot
or particularly low level code to set up the CDMM region and probe for a
specific device type, for example early console or KGDB IO drivers for
the EJTAG Fast Debug Channel (FDC) CDMM device.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/9599/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2015-03-31 12:04:12 +02:00
Ard Biesheuvel 67bad2fdb7 cpu: add generic support for CPU feature based module autoloading
This patch adds support for advertising optional CPU features over udev
using the modalias, and for declaring compatibility with/dependency upon
such a feature in a module.

The mapping between feature numbers and actual features should be provided
by the architecture in a file called <asm/cpufeature.h> which exports the
following functions/macros:
- cpu_feature(FEAT), a preprocessor macro that maps token FEAT to a
  numeric index;
- bool cpu_have_feature(n), returning whether this CPU has support for
  feature #n;
- MAX_CPU_FEATURES, an upper bound for 'n' in the previous function.

The feature can then be enabled by setting CONFIG_GENERIC_CPU_AUTOPROBE
for the architecture.

For instance, a module that registers its module init function using

  module_cpu_feature_match(FEAT_X, module_init_function)

will be probed automatically when the CPU's support for the 'FEAT_X'
feature is advertised over udev, and will only allow the module to be
loaded by hand if the 'FEAT_X' feature is supported.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18 12:38:37 -08:00
Alexandre Bounine 3bdbb62fe9 rapidio: add udev notification
Add RapidIO-specific modalias generation to enable udev notifications
about RapidIO-specific events.

The RapidIO modalias string format is shown below:

"rapidio:vNNNNdNNNNavNNNNadNNNN"

Where:
v  - Device Vendor ID (16 bit),
d  - Device ID (16 bit),
av - Assembly Vendor ID (16 bit),
ad - Assembly ID (16 bit),

as they are reported in corresponding Capability Registers (CARs)
of each RapidIO device.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Li Yang <leoli@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Andre van Herk <andre.van.herk@Prodrive.nl>
Cc: Micha Nelissen <micha.nelissen@Prodrive.nl>
Cc: Stef van Os <stef.van.os@Prodrive.nl>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-07-03 16:08:05 -07:00
Samuel Ortiz e5354107e1 mei: bus: Initial MEI Client bus type implementation
mei client bus will present some of the mei clients
as devices for other standard subsystems

Implement the probe, remove, match, device addtion routines, along with
the sysfs and uevent ones. mei_cl_device_id is also added to
mod_devicetable.h
A mei-cleint-bus.txt document describing the rationale and the API usage
is also added while ABI/testing/sysfs-bus-mei describeis the modalias ABI.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-29 08:35:47 -07:00
Andreas Schwab 6543becf26 mod/file2alias: make modalias generation safe for cross compiling
Use the target compiler to compute the offsets for the fields of the
device_id structures, so that it won't be broken by different alignments
between the host and target ABIs.

This also fixes missing endian corrections for some modaliases.

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2013-01-24 22:48:04 +01:00