LCOV - code coverage report
Current view: top level - zephyr/drivers/ethernet - eth_lan865x.h Coverage Total Hit
Test: new.info Lines: 80.0 % 5 4
Test Date: 2025-09-05 20:47:19

            Line data    Source code
       1            0 : /*
       2              :  * Copyright (c) 2024 Microchip Technology Inc.
       3              :  *
       4              :  * SPDX-License-Identifier: Apache-2.0
       5              :  */
       6              : 
       7              : #ifndef ZEPHYR_INCLUDE_DRIVERS_ETH_LAN865X_H__
       8              : #define ZEPHYR_INCLUDE_DRIVERS_ETH_LAN865X_H__
       9              : 
      10              : #include <stdint.h>
      11              : #include <zephyr/kernel.h>
      12              : #include <zephyr/device.h>
      13              : 
      14              : /**
      15              :  * @brief      Read C22 registers using LAN865X MDIO Bus
      16              :  *
      17              :  * This routine provides an interface to perform a C22 register read on the
      18              :  * LAN865X MDIO bus.
      19              :  *
      20              :  * @param[in]  dev         Pointer to the device structure for the controller
      21              :  * @param[in]  prtad       Port address
      22              :  * @param[in]  regad       Register address
      23              :  * @param      data        Pointer to receive read data
      24              :  *
      25              :  * @retval 0 If successful.
      26              :  * @retval -EIO General input / output error.
      27              :  * @retval -ETIMEDOUT If transaction timedout on the bus
      28              :  * @retval -ENOSYS if read is not supported
      29              :  */
      30            1 : int eth_lan865x_mdio_c22_read(const struct device *dev, uint8_t prtad, uint8_t regad,
      31              :                               uint16_t *data);
      32              : 
      33              : /**
      34              :  * @brief      Write C22 registers using LAN865X MDIO Bus
      35              :  *
      36              :  * This routine provides an interface to perform a C22 register write on the
      37              :  * LAN865X MDIO bus.
      38              :  *
      39              :  * @param[in]  dev         Pointer to the device structure for the controller
      40              :  * @param[in]  prtad       Port address
      41              :  * @param[in]  regad       Register address
      42              :  * @param[in]  data        Write data
      43              :  *
      44              :  * @retval 0 If successful.
      45              :  * @retval -EIO General input / output error.
      46              :  * @retval -ETIMEDOUT If transaction timedout on the bus
      47              :  * @retval -ENOSYS if read is not supported
      48              :  */
      49            1 : int eth_lan865x_mdio_c22_write(const struct device *dev, uint8_t prtad, uint8_t regad,
      50              :                                uint16_t data);
      51              : 
      52              : /**
      53              :  * @brief      Read C45 registers using LAN865X MDIO Bus
      54              :  *
      55              :  * This routine provides an interface to perform a C45 register read on the
      56              :  * LAN865X MDIO bus.
      57              :  *
      58              :  * @param[in]  dev         Pointer to the device structure for the controller
      59              :  * @param[in]  prtad       Port address
      60              :  * @param[in]  devad       MMD device address
      61              :  * @param[in]  regad       Register address
      62              :  * @param      data        Pointer to receive read data
      63              :  *
      64              :  * @retval 0 If successful.
      65              :  * @retval -EIO General input / output error.
      66              :  * @retval -ETIMEDOUT If transaction timedout on the bus
      67              :  * @retval -ENOSYS if read is not supported
      68              :  */
      69            1 : int eth_lan865x_mdio_c45_read(const struct device *dev, uint8_t prtad, uint8_t devad,
      70              :                               uint16_t regad, uint16_t *data);
      71              : 
      72              : /**
      73              :  * @brief      Write C45 registers using LAN865X MDIO Bus
      74              :  *
      75              :  * This routine provides an interface to perform a C45 register write on the
      76              :  * LAN865X MDIO bus.
      77              :  *
      78              :  * @param[in]  dev         Pointer to the device structure for the controller
      79              :  * @param[in]  prtad       Port address
      80              :  * @param[in]  devad       MMD device address
      81              :  * @param[in]  regad       Register address
      82              :  * @param[in]  data        Write data
      83              :  *
      84              :  * @retval 0 If successful.
      85              :  * @retval -EIO General input / output error.
      86              :  * @retval -ETIMEDOUT If transaction timedout on the bus
      87              :  * @retval -ENOSYS if read is not supported
      88              :  */
      89            1 : int eth_lan865x_mdio_c45_write(const struct device *dev, uint8_t prtad, uint8_t devad,
      90              :                                uint16_t regad, uint16_t data);
      91              : 
      92              : #endif /* ZEPHYR_INCLUDE_DRIVERS_ETH_LAN865X_H__ */
        

Generated by: LCOV version 2.0-1