Lines Matching +full:device +full:- +full:id
4 * SPDX-License-Identifier: Apache-2.0
9 #include <zephyr/device.h>
15 #define LPC_RESET_OFFSET(id) (id >> 16) argument
16 #define LPC_RESET_BIT(id) (BIT(id & 0xFFFF)) argument
18 static int reset_nxp_syscon_status(const struct device *dev, uint32_t id, uint8_t *status) in reset_nxp_syscon_status() argument
20 const volatile uint32_t *ctrl_reg = ((uint32_t *)dev->config)+(LPC_RESET_OFFSET(id)); in reset_nxp_syscon_status()
21 *status = (uint8_t)FIELD_GET((uint32_t)LPC_RESET_BIT(id), *ctrl_reg); in reset_nxp_syscon_status()
26 static int reset_nxp_syscon_line_assert(const struct device *dev, uint32_t id) in reset_nxp_syscon_line_assert() argument
28 SYSCON->PRESETCTRLSET[LPC_RESET_OFFSET(id)] = FIELD_PREP(LPC_RESET_BIT(id), 0b1); in reset_nxp_syscon_line_assert()
33 static int reset_nxp_syscon_line_deassert(const struct device *dev, uint32_t id) in reset_nxp_syscon_line_deassert() argument
35 SYSCON->PRESETCTRLCLR[LPC_RESET_OFFSET(id)] = FIELD_PREP(LPC_RESET_BIT(id), 0b1); in reset_nxp_syscon_line_deassert()
40 static int reset_nxp_syscon_line_toggle(const struct device *dev, uint32_t id) in reset_nxp_syscon_line_toggle() argument
44 reset_nxp_syscon_line_assert(dev, id); in reset_nxp_syscon_line_toggle()
47 reset_nxp_syscon_status(dev, id, &status); in reset_nxp_syscon_line_toggle()
50 reset_nxp_syscon_line_deassert(dev, id); in reset_nxp_syscon_line_toggle()