Lines Matching +full:p +full:- +full:id

2  * Copyright (c) 2022 Andrei-Edward Popa <andrei.popa105@yahoo.com>
4 * SPDX-License-Identifier: Apache-2.0
38 uint32_t id; member
42 * @brief Static initializer for a @p reset_dt_spec
44 * This returns a static initializer for a @p reset_dt_spec structure given a
59 * // .id = 10
65 * controller reset line id as shown above.
74 .id = DT_RESET_ID_BY_IDX(node_id, idx) \
82 * <tt>RESET_DT_SPEC_GET_BY_IDX(node_id, idx)</tt>. The @p
85 * Otherwise, this expands to @p default_value.
121 * @brief Static initializer for a @p reset_dt_spec from a DT_DRV_COMPAT
133 * @brief Static initializer for a @p reset_dt_spec from a DT_DRV_COMPAT
176 typedef int (*reset_api_status)(const struct device *dev, uint32_t id, uint8_t *status);
183 typedef int (*reset_api_line_assert)(const struct device *dev, uint32_t id);
190 typedef int (*reset_api_line_deassert)(const struct device *dev, uint32_t id);
197 typedef int (*reset_api_line_toggle)(const struct device *dev, uint32_t id);
217 * @param id Reset line.
221 * @retval -ENOSYS If the functionality is not implemented by the driver.
222 * @retval -errno Other negative errno in case of failure.
224 __syscall int reset_status(const struct device *dev, uint32_t id, uint8_t *status);
226 static inline int z_impl_reset_status(const struct device *dev, uint32_t id, uint8_t *status) in z_impl_reset_status() argument
228 const struct reset_driver_api *api = (const struct reset_driver_api *)dev->api; in z_impl_reset_status()
230 if (api->status == NULL) { in z_impl_reset_status()
231 return -ENOSYS; in z_impl_reset_status()
234 return api->status(dev, id, status); in z_impl_reset_status()
238 * @brief Get the reset status from a @p reset_dt_spec.
242 * reset_status(spec->dev, spec->id, status);
251 return reset_status(spec->dev, spec->id, status); in reset_status_dt()
258 * depending on the logic level (active-high/active-low).
261 * @param id Reset line.
264 * @retval -ENOSYS If the functionality is not implemented by the driver.
265 * @retval -errno Other negative errno in case of failure.
267 __syscall int reset_line_assert(const struct device *dev, uint32_t id);
269 static inline int z_impl_reset_line_assert(const struct device *dev, uint32_t id) in z_impl_reset_line_assert() argument
271 const struct reset_driver_api *api = (const struct reset_driver_api *)dev->api; in z_impl_reset_line_assert()
273 if (api->line_assert == NULL) { in z_impl_reset_line_assert()
274 return -ENOSYS; in z_impl_reset_line_assert()
277 return api->line_assert(dev, id); in z_impl_reset_line_assert()
281 * @brief Assert the reset state from a @p reset_dt_spec.
285 * reset_line_assert(spec->dev, spec->id);
293 return reset_line_assert(spec->dev, spec->id); in reset_line_assert_dt()
300 * depending on the logic level (active-low/active-high).
303 * @param id Reset line.
306 * @retval -ENOSYS If the functionality is not implemented by the driver.
307 * @retval -errno Other negative errno in case of failure.
309 __syscall int reset_line_deassert(const struct device *dev, uint32_t id);
311 static inline int z_impl_reset_line_deassert(const struct device *dev, uint32_t id) in z_impl_reset_line_deassert() argument
313 const struct reset_driver_api *api = (const struct reset_driver_api *)dev->api; in z_impl_reset_line_deassert()
315 if (api->line_deassert == NULL) { in z_impl_reset_line_deassert()
316 return -ENOSYS; in z_impl_reset_line_deassert()
319 return api->line_deassert(dev, id); in z_impl_reset_line_deassert()
323 * @brief Deassert the reset state from a @p reset_dt_spec.
327 * reset_line_deassert(spec->dev, spec->id)
335 return reset_line_deassert(spec->dev, spec->id); in reset_line_deassert_dt()
344 * @param id Reset line.
347 * @retval -ENOSYS If the functionality is not implemented by the driver.
348 * @retval -errno Other negative errno in case of failure.
350 __syscall int reset_line_toggle(const struct device *dev, uint32_t id);
352 static inline int z_impl_reset_line_toggle(const struct device *dev, uint32_t id) in z_impl_reset_line_toggle() argument
354 const struct reset_driver_api *api = (const struct reset_driver_api *)dev->api; in z_impl_reset_line_toggle()
356 if (api->line_toggle == NULL) { in z_impl_reset_line_toggle()
357 return -ENOSYS; in z_impl_reset_line_toggle()
360 return api->line_toggle(dev, id); in z_impl_reset_line_toggle()
364 * @brief Reset the device from a @p reset_dt_spec.
368 * reset_line_toggle(spec->dev, spec->id)
376 return reset_line_toggle(spec->dev, spec->id); in reset_line_toggle_dt()