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

Commit 9a69f508 authored by Simon Que's avatar Simon Que Committed by Greg Kroah-Hartman
Browse files

drivers/staging: Gasket driver framework + Apex driver



The Gasket (Google ASIC Software, Kernel Extensions, and Tools) kernel
framework is a generic, flexible system that supports thin kernel
drivers. Gasket kernel drivers are expected to handle opening and
closing devices, mmap'ing BAR space as requested, a small selection of
ioctls, and handling page table translation (covered below). Any other
functions should be handled by userspace code.

The Gasket common module is not enough to run a device. In order to
customize the Gasket code for a given piece of hardware, a device
specific module must be created. At a minimum, this module must define a
struct gasket_driver_desc containing the device-specific data for use by
the framework; in addition, the module must declare an __init function
that calls gasket_register_device with the module's gasket_driver_desc
struct. Finally, the driver must define an exit function that calls
gasket_unregister_device with the module's gasket_driver_desc struct.

One of the core assumptions of the Gasket framework is that precisely
one process is allowed to have an open write handle to the device node
at any given time. (That process may, once it has one write handle, open
any number of additional write handles.) This is accomplished by
tracking open and close data for each driver instance.

Signed-off-by: default avatarRob Springer <rspringer@google.com>
Signed-off-by: default avatarJohn Joseph <jnjoseph@google.com>
Signed-off-by: default avatarSimon Que <sque@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ee55fe55
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -5928,6 +5928,13 @@ F: scripts/gcc-plugin.sh
F:	scripts/Makefile.gcc-plugins
F:	scripts/Makefile.gcc-plugins
F:	Documentation/gcc-plugins.txt
F:	Documentation/gcc-plugins.txt


GASKET DRIVER FRAMEWORK
M:	Rob Springer <rspringer@google.com>
M:	John Joseph <jnjoseph@google.com>
M:	Ben Chan <benchan@chromium.org>
S:	Maintained
F:	drivers/staging/gasket/

GCOV BASED KERNEL PROFILING
GCOV BASED KERNEL PROFILING
M:	Peter Oberparleiter <oberpar@linux.ibm.com>
M:	Peter Oberparleiter <oberpar@linux.ibm.com>
S:	Maintained
S:	Maintained
+2 −0
Original line number Original line Diff line number Diff line
@@ -124,4 +124,6 @@ source "drivers/staging/mt7621-eth/Kconfig"


source "drivers/staging/mt7621-dts/Kconfig"
source "drivers/staging/mt7621-dts/Kconfig"


source "drivers/staging/gasket/Kconfig"

endif # STAGING
endif # STAGING
+1 −0
Original line number Original line Diff line number Diff line
@@ -53,3 +53,4 @@ obj-$(CONFIG_SOC_MT7621) += mt7621-dma/
obj-$(CONFIG_SOC_MT7621)	+= mt7621-mmc/
obj-$(CONFIG_SOC_MT7621)	+= mt7621-mmc/
obj-$(CONFIG_SOC_MT7621)	+= mt7621-eth/
obj-$(CONFIG_SOC_MT7621)	+= mt7621-eth/
obj-$(CONFIG_SOC_MT7621)	+= mt7621-dts/
obj-$(CONFIG_SOC_MT7621)	+= mt7621-dts/
obj-$(CONFIG_STAGING_GASKET_FRAMEWORK)	+= gasket/
+23 −0
Original line number Original line Diff line number Diff line
menu "Gasket devices"

config STAGING_GASKET_FRAMEWORK
	tristate "Gasket framework"
	depends on PCI && X86_64
	help
	  This framework supports Gasket-compatible devices, such as Apex.
	  It is required for any of the following module(s).

	  To compile this driver as a module, choose M here.  The module
	  will be called "gasket".

config STAGING_APEX_DRIVER
	tristate "Apex Driver"
	depends on STAGING_GASKET_FRAMEWORK
	help
	  This driver supports the Apex device.  Say Y if you want to
	  include this driver in the kernel.

	  To compile this driver as a module, choose M here.  The module
	  will be called "apex".

endmenu
+9 −0
Original line number Original line Diff line number Diff line
#
#  Makefile for Gasket framework and dependent drivers.
#

obj-$(CONFIG_STAGING_GASKET_FRAMEWORK)	+= gasket.o
obj-$(CONFIG_STAGING_APEX_DRIVER)	+= apex.o

gasket-objs	:= gasket_core.o gasket_ioctl.o gasket_interrupt.o gasket_page_table.o gasket_sysfs.o
apex-objs	:= apex_driver.o
Loading