Merge "platform: mdm9607: modify gpio tlmm config function" into lk.lnx.1.0-dev.1.0
diff --git a/platform/mdm9607/gpio.c b/platform/mdm9607/gpio.c
index 6f9bc3c..97417c7 100644
--- a/platform/mdm9607/gpio.c
+++ b/platform/mdm9607/gpio.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -41,16 +41,16 @@
 	val |= pull;
 	val |= func << 2;
 	val |= drvstr << 6;
-	val |= enable << 9;
+	val |= dir << 9;
 
 	writel(val, (uint32_t *)GPIO_CONFIG_ADDR(gpio));
 	return;
 }
 
-void gpio_set_dir(uint32_t gpio, uint32_t dir)
+/*Set a value to gpio either 0 or 1*/
+void gpio_set_val(uint32_t gpio, uint32_t val)
 {
-	writel(dir, (uint32_t *)GPIO_IN_OUT_ADDR(gpio));
-
+	writel((val << 0x1), (uint32_t *)GPIO_IN_OUT_ADDR(gpio));
 	return;
 }
 
diff --git a/platform/mdm9607/include/platform/gpio.h b/platform/mdm9607/include/platform/gpio.h
index f7c6293..35334c9 100644
--- a/platform/mdm9607/include/platform/gpio.h
+++ b/platform/mdm9607/include/platform/gpio.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -62,7 +62,7 @@
 
 void gpio_config_uart_dm(uint8_t id);
 uint32_t gpio_status(uint32_t gpio);
-void gpio_set_dir(uint32_t gpio, uint32_t dir);
+void gpio_set_val(uint32_t gpio, uint32_t val);
 void gpio_tlmm_config(uint32_t gpio,
 			uint8_t func,
 			uint8_t dir,