Lines Matching +full:int +full:- +full:map +full:- +full:mask
1 // SPDX-License-Identifier: GPL-2.0-only
9 #include <linux/reset-controller.h>
14 static int qcom_reset(struct reset_controller_dev *rcdev, unsigned long id) in qcom_reset()
18 rcdev->ops->assert(rcdev, id); in qcom_reset()
19 fsleep(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */ in qcom_reset()
21 rcdev->ops->deassert(rcdev, id); in qcom_reset()
25 static int
29 const struct qcom_reset_map *map; in qcom_reset_assert() local
30 u32 mask; in qcom_reset_assert() local
33 map = &rst->reset_map[id]; in qcom_reset_assert()
34 mask = map->bitmask ? map->bitmask : BIT(map->bit); in qcom_reset_assert()
36 return regmap_update_bits(rst->regmap, map->reg, mask, mask); in qcom_reset_assert()
39 static int
43 const struct qcom_reset_map *map; in qcom_reset_deassert() local
44 u32 mask; in qcom_reset_deassert() local
47 map = &rst->reset_map[id]; in qcom_reset_deassert()
48 mask = map->bitmask ? map->bitmask : BIT(map->bit); in qcom_reset_deassert()
50 return regmap_update_bits(rst->regmap, map->reg, mask, 0); in qcom_reset_deassert()