Lines Matching +full:device +full:- +full:id

2  * Copyright (c) 2022-2023, Intel Corporation.
4 * SPDX-License-Identifier: Apache-2.0
9 #include <zephyr/device.h>
26 static int32_t reset_intel_soc_status(const struct device *dev, uint32_t id, uint8_t *status) in reset_intel_soc_status() argument
28 const struct reset_intel_config *config = (const struct reset_intel_config *)dev->config; in reset_intel_soc_status()
34 regbit = (id & ((RESET_REG_WIDTH << (RESET_REG_WIDTH - 1)) - 1)); in reset_intel_soc_status()
35 offset = (id >> (RESET_REG_WIDTH + 1)) << (RESET_REG_WIDTH >> 1); in reset_intel_soc_status()
37 *status = !(value & BIT(regbit)) ^ config->active_low; in reset_intel_soc_status()
41 static void reset_intel_soc_update(const struct device *dev, uint32_t id, bool assert) in reset_intel_soc_update() argument
43 const struct reset_intel_config *config = (const struct reset_intel_config *)dev->config; in reset_intel_soc_update()
48 regbit = (id & ((RESET_REG_WIDTH << (RESET_REG_WIDTH - 1)) - 1)); in reset_intel_soc_update()
49 offset = (id >> (RESET_REG_WIDTH + 1)) << (RESET_REG_WIDTH >> 1); in reset_intel_soc_update()
51 if (assert ^ !config->active_low) { in reset_intel_soc_update()
62 static int32_t reset_intel_soc_line_assert(const struct device *dev, uint32_t id) in reset_intel_soc_line_assert() argument
64 reset_intel_soc_update(dev, id, true); in reset_intel_soc_line_assert()
69 static int32_t reset_intel_soc_line_deassert(const struct device *dev, uint32_t id) in reset_intel_soc_line_deassert() argument
71 reset_intel_soc_update(dev, id, false); in reset_intel_soc_line_deassert()
76 static int32_t reset_intel_soc_line_toggle(const struct device *dev, uint32_t id) in reset_intel_soc_line_toggle() argument
78 (void)reset_intel_soc_line_assert(dev, id); in reset_intel_soc_line_toggle()
80 (void)reset_intel_soc_line_deassert(dev, id); in reset_intel_soc_line_toggle()
85 static int32_t reset_intel_soc_init(const struct device *dev) in reset_intel_soc_init()