summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c9
-rw-r--r--arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c11
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c b/arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c
index df5990ace3aa..f5f289422947 100644
--- a/arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c
+++ b/arch/arm/mach-tegra/odm_kit/platform/keyboard/nvodm_keyboard.c
@@ -69,6 +69,8 @@ enum {NUM_OF_LEDS = 3};
/* Scan Code Set 1 break mask */
#define SC1_BREAK_MASK (0x80)
+#define EEPROM_ID_E1206 0x0C06
+
static NvEcHandle s_NvEcHandle = NULL; // nvec handle
NvEcEventType EventTypes[] = {NvEcEventType_Keyboard}; // get only keyboard events from EC
NvEcEvent KbdEvent = {0};
@@ -108,6 +110,13 @@ NvBool NvOdmKeyboardInit(void)
NvError NvStatus = NvError_Success;
NvEcRequest Request = {0};
NvEcResponse Response = {0};
+ NvOdmBoardInfo BoardInfo;
+
+ /* Ec based keyboard will not be supported for the E1206 based platform*/
+ if (NvOdmPeripheralGetBoardInfo(EEPROM_ID_E1206, &BoardInfo))
+ {
+ goto fail;
+ }
/* get nvec handle */
NvStatus = NvEcOpen(&s_NvEcHandle, 0 /* instance */);
diff --git a/arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c b/arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c
index a527ea540d55..af97de4b3abf 100644
--- a/arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c
+++ b/arch/arm/mach-tegra/odm_kit/platform/mouse/nvodm_mouse.c
@@ -32,6 +32,7 @@
#include "nvodm_mouse.h"
#include "nvodm_mouse_int.h"
#include "nvrm_drf.h"
+#include "nvodm_query_discovery.h"
// Module debug: 0=disable, 1=enable
#define NVODM_ENABLE_PRINTF 0
@@ -63,6 +64,7 @@
#define MOUSE_PS2_PORT_ID_0 NVEC_SUBTYPE_0_AUX_PORT_ID_0
#define MOUSE_PS2_PORT_ID_1 NVEC_SUBTYPE_0_AUX_PORT_ID_1
+#define EEPROM_ID_E1206 0x0C06
/** Implementation for the NvOdm Mouse */
NvBool
@@ -77,6 +79,15 @@ NvOdmMouseDeviceOpen(
NvEcRequest Request = {0};
NvEcResponse Response = {0};
#endif
+ NvOdmBoardInfo BoardInfo;
+
+ // Mouse driver will not be supported for E1206 based platform.
+ if (NvOdmPeripheralGetBoardInfo(EEPROM_ID_E1206, &BoardInfo))
+ {
+ ret = NV_FALSE;
+ NVODMMOUSE_PRINTF(("Mouse is not available on this platform\n"));
+ goto fail_safe;
+ }
// Allocate memory for request type structure
hMouseDev = (NvOdmMouseDevice *)NvOdmOsAlloc(sizeof(NvOdmMouseDevice));