platform/x86: ISST: Add common API to register and handle ioctls

Encapsulate common functions which all Intel Speed Select Technology
interface drivers can use. This creates API to register misc device for
user kernel communication and handle all common IOCTLs. As part of the
registry it allows a callback which is to handle domain specific ioctl
processing.

There can be multiple drivers register for services, which can be built
as modules. So this driver handle contention during registry and as well
as during removal. Once user space opened the misc device, the registered
driver will be prevented from removal. Also once misc device is opened by
the user space new client driver can't register, till the misc device is
closed.

There are two types of client drivers, one to handle mail box interface
and the other is to allow direct read/write to some specific MMIO space.

This common driver implements IOCTL ISST_IF_GET_PLATFORM_INFO.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
Srinivas Pandruvada
2019-06-26 15:38:43 -07:00
committed by Andy Shevchenko
父節點 2ee5bfc1ef
當前提交 35f2c14d2a
共有 7 個文件被更改,包括 310 次插入0 次删除

查看文件

@@ -1336,6 +1336,8 @@ config PCENGINES_APU2
To compile this driver as a module, choose M here: the module
will be called pcengines-apuv2.
source "drivers/platform/x86/intel_speed_select_if/Kconfig"
endif # X86_PLATFORM_DEVICES
config PMC_ATOM