platform/x86: ISST: Add common API to register and handle ioctls
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 26 Jun 2019 22:38:43 +0000 (15:38 -0700)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 2 Jul 2019 15:41:16 +0000 (18:41 +0300)
commit35f2c14d2a076b063a76c5bf275c46c0743ba3a0
tree5e8b2293aae48b1e08e25a978215f03d6e406083
parent2ee5bfc1efc81179c73abcd33098dd2c86019146
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>
drivers/platform/x86/Kconfig
drivers/platform/x86/Makefile
drivers/platform/x86/intel_speed_select_if/Kconfig [new file with mode: 0644]
drivers/platform/x86/intel_speed_select_if/Makefile [new file with mode: 0644]
drivers/platform/x86/intel_speed_select_if/isst_if_common.c [new file with mode: 0644]
drivers/platform/x86/intel_speed_select_if/isst_if_common.h [new file with mode: 0644]
include/uapi/linux/isst_if.h [new file with mode: 0644]