reset.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) | reset.c (b348c26c28a96d15f832974c5b54a3d6bbe4e7d8) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) 2014 MediaTek Inc. 4 */ 5 6#include <linux/mfd/syscon.h> 7#include <linux/module.h> 8#include <linux/of.h> 9#include <linux/platform_device.h> 10#include <linux/regmap.h> | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Copyright (c) 2014 MediaTek Inc. 4 */ 5 6#include <linux/mfd/syscon.h> 7#include <linux/module.h> 8#include <linux/of.h> 9#include <linux/platform_device.h> 10#include <linux/regmap.h> |
11#include <linux/reset-controller.h> | |
12#include <linux/slab.h> 13 | 11#include <linux/slab.h> 12 |
14#include "clk-mtk.h" | 13#include "reset.h" |
15 | 14 |
16struct mtk_reset { 17 struct regmap *regmap; 18 int regofs; 19 struct reset_controller_dev rcdev; 20}; 21 | |
22static int mtk_reset_assert_set_clr(struct reset_controller_dev *rcdev, 23 unsigned long id) 24{ 25 struct mtk_reset *data = container_of(rcdev, struct mtk_reset, rcdev); 26 unsigned int reg = data->regofs + ((id / 32) << 4); 27 28 return regmap_write(data->regmap, reg, 1); 29} --- 111 unchanged lines hidden --- | 15static int mtk_reset_assert_set_clr(struct reset_controller_dev *rcdev, 16 unsigned long id) 17{ 18 struct mtk_reset *data = container_of(rcdev, struct mtk_reset, rcdev); 19 unsigned int reg = data->regofs + ((id / 32) << 4); 20 21 return regmap_write(data->regmap, reg, 1); 22} --- 111 unchanged lines hidden --- |