summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVishwas Rao <vrao@nvidia.com>2010-03-30 16:34:36 +0530
committerGary King <gking@nvidia.com>2010-04-05 20:28:20 -0700
commit27f64e9323656140b969d0f77cc2b898e8929a75 (patch)
tree8b40de31b4fd9ca05d9825d0f48e0d914f5300dd
parent1c3dac0f5908cbce08ae7cdcc82ff19b4827ecd6 (diff)
tegra: Enabling Accelerometer Driver for whistler board.
This should enable accelerometer on Whistler. Change-Id: I884ef704083c8d5e1fe07554301eb28a2c24db49 Reviewed-on: http://git-master/r/987 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/odm_kit/platform/accelerometer/Makefile2
-rw-r--r--arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_addresses.h12
-rw-r--r--arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_peripherals.h9
-rw-r--r--drivers/input/misc/tegra_odm_accel.c2
4 files changed, 22 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/odm_kit/platform/accelerometer/Makefile b/arch/arm/mach-tegra/odm_kit/platform/accelerometer/Makefile
index 21c52a5c0389..4171fe9b24de 100644
--- a/arch/arm/mach-tegra/odm_kit/platform/accelerometer/Makefile
+++ b/arch/arm/mach-tegra/odm_kit/platform/accelerometer/Makefile
@@ -9,4 +9,4 @@ endif
obj-$(CONFIG_TEGRA_ODM_CONCORDE) += nvodm_accelerometer_adi340.o
obj-$(CONFIG_TEGRA_ODM_HARMONY) += nvodm_accelerometer_stub.o
-obj-$(CONFIG_TEGRA_ODM_WHISTLER) += nvodm_accelerometer_stub.o
+obj-$(CONFIG_TEGRA_ODM_WHISTLER) += nvodm_accelerometer_adi340.o
diff --git a/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_addresses.h b/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_addresses.h
index 4915e86030c3..7085868e5374 100644
--- a/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_addresses.h
+++ b/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_addresses.h
@@ -1,5 +1,7 @@
+
+
/*
- * Copyright (c) 2009 NVIDIA Corporation.
+ * Copyright (c) 2010 NVIDIA Corporation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -62,3 +64,11 @@ static const NvOdmIoAddress s_VibAddresses[] =
{ NvOdmIoModule_Vdd, 0x0, Max8907bPmuSupply_LDO16},
};
+static const NvOdmIoAddress s_AcceleroAddresses[] =
+{
+ { NvOdmIoModule_I2c, 0x0, 0x3A }, /* I2C address (7-bit) 0x1D < 1 = 0x3A (8-bit) */
+ { NvOdmIoModule_Gpio, 0x1A, 0x1 }, /* Gpio port AA[1] = (A=0, Z=25) thus AA = 26 = 0x1A */
+ { NvOdmIoModule_Vdd, 0x0, Max8907bPmuSupply_LX_V3 }, /* VDDIO_UART = V3 */
+ { NvOdmIoModule_Vdd, 0x0, Max8907bPmuSupply_LDO1 }, /* VCORE_ACC = VOUT1 = 2.8v */
+};
+
diff --git a/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_peripherals.h b/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_peripherals.h
index 74b96f77fd74..90d038ba2ab2 100644
--- a/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_peripherals.h
+++ b/arch/arm/mach-tegra/odm_kit/query/whistler/subboards/nvodm_query_discovery_e1120_peripherals.h
@@ -63,4 +63,13 @@
NV_ARRAY_SIZE(s_VibAddresses),
NvOdmPeripheralClass_Other,
},
+
+// Accelerometer Module
+{
+ NV_ODM_GUID('a','c','c','e','l','e','r','o'),
+ s_AcceleroAddresses,
+ NV_ARRAY_SIZE(s_AcceleroAddresses),
+ NvOdmPeripheralClass_Other,
+},
+
// NOTE: This list *must* end with a trailing comma.
diff --git a/drivers/input/misc/tegra_odm_accel.c b/drivers/input/misc/tegra_odm_accel.c
index badd580c4103..174535e5ea23 100644
--- a/drivers/input/misc/tegra_odm_accel.c
+++ b/drivers/input/misc/tegra_odm_accel.c
@@ -447,7 +447,7 @@ static struct platform_driver tegra_acc_driver = {
.probe = tegra_acc_probe,
.remove = tegra_acc_remove,
.driver = {
- .name = "tegra_acc",
+ .name = "tegra_accelerometer",
},
};