xref: /openbmc/linux/drivers/clk/hisilicon/reset.h (revision 97b7129cd2afb478c4812781470f06d65f458825)
125824d52SJiancheng Xue /*
225824d52SJiancheng Xue  * Copyright (c) 2015 HiSilicon Technologies Co., Ltd.
325824d52SJiancheng Xue  *
425824d52SJiancheng Xue  * This program is free software; you can redistribute it and/or modify
525824d52SJiancheng Xue  * it under the terms of the GNU General Public License as published by
625824d52SJiancheng Xue  * the Free Software Foundation; either version 2 of the License, or
725824d52SJiancheng Xue  * (at your option) any later version.
825824d52SJiancheng Xue  *
925824d52SJiancheng Xue  * This program is distributed in the hope that it will be useful,
1025824d52SJiancheng Xue  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1125824d52SJiancheng Xue  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1225824d52SJiancheng Xue  * GNU General Public License for more details.
1325824d52SJiancheng Xue  *
1425824d52SJiancheng Xue  * You should have received a copy of the GNU General Public License
1525824d52SJiancheng Xue  * along with this program. If not, see <http://www.gnu.org/licenses/>.
1625824d52SJiancheng Xue  */
1725824d52SJiancheng Xue 
1825824d52SJiancheng Xue #ifndef	__HISI_RESET_H
1925824d52SJiancheng Xue #define	__HISI_RESET_H
2025824d52SJiancheng Xue 
2125824d52SJiancheng Xue struct device_node;
2225824d52SJiancheng Xue struct hisi_reset_controller;
2325824d52SJiancheng Xue 
2425824d52SJiancheng Xue #ifdef CONFIG_RESET_CONTROLLER
25*97b7129cSJiancheng Xue struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev);
2625824d52SJiancheng Xue void hisi_reset_exit(struct hisi_reset_controller *rstc);
2725824d52SJiancheng Xue #else
28*97b7129cSJiancheng Xue static inline
29*97b7129cSJiancheng Xue struct hisi_reset_controller *hisi_reset_init(struct platform_device *pdev)
3025824d52SJiancheng Xue {
3125824d52SJiancheng Xue 	return 0;
3225824d52SJiancheng Xue }
3325824d52SJiancheng Xue static inline void hisi_reset_exit(struct hisi_reset_controller *rstc)
3425824d52SJiancheng Xue {}
3525824d52SJiancheng Xue #endif
3625824d52SJiancheng Xue 
3725824d52SJiancheng Xue #endif	/* __HISI_RESET_H */
38