• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * drivers/amlogic/media/common/arch/switch/amports_gate.h
3  *
4  * Copyright (C) 2016 Amlogic, Inc. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
14  * more details.
15  *
16  */
17 
18 #ifndef AMPORT_GATE_H
19 #define AMPORT_GATE_H
20 #include <linux/device.h>
21 
22 struct gate_switch_node {
23 	struct clk *clk;
24 	const char *name;
25 	struct mutex mutex;
26 	int ref_count;
27 };
28 
29 extern int amports_clock_gate_init(struct device *dev);
30 extern int amports_switch_gate(const char *name, int enable);
31 
32 #endif
33