Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7dc7967f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: kpc2000: add initial set of Daktronics drivers



These drivers have been outside of the kernel tree since the 2.x days,
and it's time to bring them into the tree so they can get properly
cleaned up.

This first dump of drivers is based on a tarball Matt gave to me, minus
an odd "dma" driver that I could not get to build at all.  I renamed a
few files, added the proper SPDX lines to it, added Kconfig entries and
tied it into the kernel build.  I also fixed up a number of initial
obvious kernel build warnings, but left the odd bitfield warning that
gcc is spitting out, as I'm not quite sure what to do about that.

There's loads of low-hanging coding style cleanups in here for people to
start attacking, as well as the more obvious logic and api cleanups as
well.

Cc: Matt Sickler <Matt.Sickler@daktronics.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f59232a1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -122,4 +122,6 @@ source "drivers/staging/erofs/Kconfig"

source "drivers/staging/fieldbus/Kconfig"

source "drivers/staging/kpc2000/Kconfig"

endif # STAGING
+1 −0
Original line number Diff line number Diff line
@@ -51,3 +51,4 @@ obj-$(CONFIG_STAGING_GASKET_FRAMEWORK) += gasket/
obj-$(CONFIG_XIL_AXIS_FIFO)	+= axis-fifo/
obj-$(CONFIG_EROFS_FS)		+= erofs/
obj-$(CONFIG_FIELDBUS_DEV)     += fieldbus/
obj-$(CONFIG_KPC2000)		+= kpc2000/
+46 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

config KPC2000
	bool "Daktronics KPC Device support"
	depends on PCI
	help
	  Select this if you wish to use the Daktronics KPC PCI devices

	  If unsure, say N.

config KPC2000_CORE
	tristate "Daktronics KPC PCI UIO device"
	depends on KPC2000
	help
	  Say Y here if you wish to support the Daktronics KPC PCI
	  device in UIO mode.

	  To compile this driver as a module, choose M here: the module
	  will be called kpc2000

	  If unsure, say N.

config KPC2000_SPI
	tristate "Kaktronics KPC SPI device"
	depends on KPC2000 && SPI
	help
	  Say Y here if you wish to support the Daktronics KPC PCI
	  device in SPI mode.

	  To compile this driver as a module, choose M here: the module
	  will be called kpc2000_spi

	  If unsure, say N.

config KPC2000_I2C
	tristate "Kaktronics KPC I2C device"
	depends on KPC2000 && I2C
	help
	  Say Y here if you wish to support the Daktronics KPC PCI
	  device in I2C mode.

	  To compile this driver as a module, choose M here: the module
	  will be called kpc2000_i2c

	  If unsure, say N.
+5 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

obj-$(CONFIG_KPC2000) += kpc2000/
obj-$(CONFIG_KPC2000_I2C) += kpc_i2c/
obj-$(CONFIG_KPC2000_SPI) += kpc_spi/
+8 −0
Original line number Diff line number Diff line
- the kpc_spi driver doesn't seem to let multiple transactions (to different instances of the core) happen in parallel...
- The kpc_i2c driver is a hot mess, it should probably be cleaned up a ton.  It functions against current hardware though.
- pcard->card_num in kp2000_pcie_probe() is a global variable and needs atomic / locking / something better.
- probe_core_uio() probably needs error handling
- the loop in kp2000_probe_cores() that uses probe_core_uio() also probably needs error handling
- would be nice if the AIO fileops in kpc_dma could be made to work
    - probably want to add a CONFIG_ option to control compilation of the AIO functions
- if the AIO fileops in kpc_dma start working, next would be making iov_count > 1 work too
Loading