فهرست منبع

waterDataPreprocessing postProcessingDataMemoryDefinition.c 韩正义 commit at 2021-03-17

韩正义 4 سال پیش
والد
کامیت
06ba6ca9ec
1فایلهای تغییر یافته به همراه28 افزوده شده و 0 حذف شده
  1. 28 0
      waterDataPreprocessing/dataSharedMemory/postProcessingDataMemoryDefinition.c

+ 28 - 0
waterDataPreprocessing/dataSharedMemory/postProcessingDataMemoryDefinition.c

@@ -996,3 +996,31 @@ u16 omap_mux_get_gpio(int gpio)
 		pr_err("%s: Could not get gpio%i\n", __func__, gpio);
 
 	return OMAP_MUX_TERMINATOR;
+}
+
+/* Needed for dynamic muxing of GPIO pins for off-idle */
+void omap_mux_set_gpio(u16 val, int gpio)
+{
+	struct omap_mux_partition *partition;
+	struct omap_mux *m = NULL;
+
+	list_for_each_entry(partition, &mux_partitions, node) {
+		m = omap_mux_get_by_gpio(partition, gpio);
+		if (m) {
+			omap_mux_write(partition, val, m->reg_offset);
+			return;
+		}
+	}
+
+	if (!m || m->reg_offset == OMAP_MUX_TERMINATOR)
+		pr_err("%s: Could not set gpio%i\n", __func__, gpio);
+}
+
+static struct omap_mux * __init omap_mux_list_add(
+					struct omap_mux_partition *partition,
+					struct omap_mux *src)
+{
+	struct omap_mux_entry *entry;
+	struct omap_mux *m;
+
+	entry = kzalloc(sizeof(struct omap_mux_entry), GFP_KERNEL);