LCOV - code coverage report
Current view: top level - zephyr/dt-bindings/pinctrl - ene-kb1200-pinctrl.h Hit Total Coverage
Test: new.info Lines: 0 24 0.0 %
Date: 2024-12-21 18:13:37

          Line data    Source code
       1           0 : /*
       2             :  * Copyright (c) ENE Technology Inc.
       3             :  *
       4             :  * SPDX-License-Identifier: Apache-2.0
       5             :  */
       6             : 
       7             : #ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ENE_KB1200_PINCTRL_H_
       8             : #define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ENE_KB1200_PINCTRL_H_
       9             : 
      10             : #include <zephyr/dt-bindings/dt-util.h>
      11             : 
      12           0 : #define PINMUX_FUNC_GPIO 0x00
      13           0 : #define PINMUX_FUNC_A    0x00
      14           0 : #define PINMUX_FUNC_B    0x01
      15           0 : #define PINMUX_FUNC_C    0x02
      16           0 : #define PINMUX_FUNC_D    0x03
      17           0 : #define PINMUX_FUNC_MAX  0x04
      18             : 
      19           0 : #define ENE_KB1200_NO_PUD_POS        12
      20           0 : #define ENE_KB1200_PD_POS            13
      21           0 : #define ENE_KB1200_PU_POS            14
      22           0 : #define ENE_KB1200_PUSH_PULL_POS     15
      23           0 : #define ENE_KB1200_OPEN_DRAIN_POS    16
      24           0 : #define ENE_KB1200_OUT_DIS_POS       17
      25           0 : #define ENE_KB1200_OUT_EN_POS        18
      26           0 : #define ENE_KB1200_OUT_HI_POS        19
      27           0 : #define ENE_KB1200_OUT_LO_POS        20
      28           0 : #define ENE_KB1200_PIN_LOW_POWER_POS 21
      29             : 
      30           0 : #define ENE_KB1200_PINMUX_PORT_POS 5
      31           0 : #define ENE_KB1200_PINMUX_PORT_MSK 0x7
      32           0 : #define ENE_KB1200_PINMUX_PIN_POS  0
      33           0 : #define ENE_KB1200_PINMUX_PIN_MSK  0x1f
      34           0 : #define ENE_KB1200_PINMUX_FUNC_POS 8
      35           0 : #define ENE_KB1200_PINMUX_FUNC_MSK 0xf
      36             : 
      37             : /*
      38             :  * f is function number
      39             :  * b[7:5] = pin bank
      40             :  * b[4:0] = pin position in bank
      41             :  * b[11:8] = function
      42             :  */
      43           0 : #define ENE_KB1200_PINMUX(n, f)                                                                    \
      44             :         (((((n) >> 5) & ENE_KB1200_PINMUX_PORT_MSK) << ENE_KB1200_PINMUX_PORT_POS) |               \
      45             :          (((n) & ENE_KB1200_PINMUX_PIN_MSK) << ENE_KB1200_PINMUX_PIN_POS) |                        \
      46             :          (((f) & ENE_KB1200_PINMUX_FUNC_MSK) << ENE_KB1200_PINMUX_FUNC_POS))
      47             : 
      48             : #endif /* ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ENE_KB1200_PINCTRL_H_ */

Generated by: LCOV version 1.14