Lines Matching +full:device +full:- +full:id
2 * SPDX-License-Identifier: Apache-2.0
10 #include <zephyr/device.h>
16 #define NUMAKER_RESET_IP_OFFSET(id) (NUMAKER_RESET_IPRST0_OFFSET + (((id) >> 24UL) & 0xffUL)) argument
18 #define NUMAKER_RESET_IP_BIT(id) (id & 0x00ffffffUL) argument
24 static int reset_numaker_status(const struct device *dev, uint32_t id, uint8_t *status) in reset_numaker_status() argument
26 const struct reset_numaker_config *config = dev->config; in reset_numaker_status()
28 *status = !!sys_test_bit(config->base + NUMAKER_RESET_IP_OFFSET(id), in reset_numaker_status()
29 NUMAKER_RESET_IP_BIT(id)); in reset_numaker_status()
34 static int reset_numaker_line_assert(const struct device *dev, uint32_t id) in reset_numaker_line_assert() argument
36 const struct reset_numaker_config *config = dev->config; in reset_numaker_line_assert()
39 sys_set_bit(config->base + NUMAKER_RESET_IP_OFFSET(id), NUMAKER_RESET_IP_BIT(id)); in reset_numaker_line_assert()
44 static int reset_numaker_line_deassert(const struct device *dev, uint32_t id) in reset_numaker_line_deassert() argument
46 const struct reset_numaker_config *config = dev->config; in reset_numaker_line_deassert()
49 sys_clear_bit(config->base + NUMAKER_RESET_IP_OFFSET(id), NUMAKER_RESET_IP_BIT(id)); in reset_numaker_line_deassert()
54 static int reset_numaker_line_toggle(const struct device *dev, uint32_t id) in reset_numaker_line_toggle() argument
56 (void)reset_numaker_line_assert(dev, id); in reset_numaker_line_toggle()
57 (void)reset_numaker_line_deassert(dev, id); in reset_numaker_line_toggle()