
/* auto-generated by gen_syscalls.py, don't edit */
#ifndef Z_INCLUDE_SYSCALLS_PHY_H
#define Z_INCLUDE_SYSCALLS_PHY_H


#ifndef _ASMLANGUAGE

#include <syscall_list.h>
#include <syscall.h>

#include <linker/sections.h>

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic push
#endif

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#if !defined(__XCC__)
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif
#endif

#ifdef __cplusplus
extern "C" {
#endif

extern int z_impl_phy_configure_link(const struct device * dev, enum phy_link_speed speeds);

__pinned_func
static inline int phy_configure_link(const struct device * dev, enum phy_link_speed speeds)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (int) arch_syscall_invoke2(*(uintptr_t *)&dev, *(uintptr_t *)&speeds, K_SYSCALL_PHY_CONFIGURE_LINK);
	}
#endif
	compiler_barrier();
	return z_impl_phy_configure_link(dev, speeds);
}


extern int z_impl_phy_get_link_state(const struct device * dev, struct phy_link_state * state);

__pinned_func
static inline int phy_get_link_state(const struct device * dev, struct phy_link_state * state)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (int) arch_syscall_invoke2(*(uintptr_t *)&dev, *(uintptr_t *)&state, K_SYSCALL_PHY_GET_LINK_STATE);
	}
#endif
	compiler_barrier();
	return z_impl_phy_get_link_state(dev, state);
}


extern int z_impl_phy_link_callback_set(const struct device * dev, phy_callback_t callback, void * user_data);

__pinned_func
static inline int phy_link_callback_set(const struct device * dev, phy_callback_t callback, void * user_data)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (int) arch_syscall_invoke3(*(uintptr_t *)&dev, *(uintptr_t *)&callback, *(uintptr_t *)&user_data, K_SYSCALL_PHY_LINK_CALLBACK_SET);
	}
#endif
	compiler_barrier();
	return z_impl_phy_link_callback_set(dev, callback, user_data);
}


extern int z_impl_phy_read(const struct device * dev, uint16_t reg_addr, uint32_t * value);

__pinned_func
static inline int phy_read(const struct device * dev, uint16_t reg_addr, uint32_t * value)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (int) arch_syscall_invoke3(*(uintptr_t *)&dev, *(uintptr_t *)&reg_addr, *(uintptr_t *)&value, K_SYSCALL_PHY_READ);
	}
#endif
	compiler_barrier();
	return z_impl_phy_read(dev, reg_addr, value);
}


extern int z_impl_phy_write(const struct device * dev, uint16_t reg_addr, uint32_t value);

__pinned_func
static inline int phy_write(const struct device * dev, uint16_t reg_addr, uint32_t value)
{
#ifdef CONFIG_USERSPACE
	if (z_syscall_trap()) {
		/* coverity[OVERRUN] */
		return (int) arch_syscall_invoke3(*(uintptr_t *)&dev, *(uintptr_t *)&reg_addr, *(uintptr_t *)&value, K_SYSCALL_PHY_WRITE);
	}
#endif
	compiler_barrier();
	return z_impl_phy_write(dev, reg_addr, value);
}


#ifdef __cplusplus
}
#endif

#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#pragma GCC diagnostic pop
#endif

#endif
#endif /* include guard */
