Lines Matching refs:conf
520 unsigned int conf[2]; in madera_pin_dbg_show() local
525 ret = regmap_read(priv->madera->regmap, reg, &conf[0]); in madera_pin_dbg_show()
529 ret = regmap_read(priv->madera->regmap, reg + 1, &conf[1]); in madera_pin_dbg_show()
533 seq_printf(s, "%04x:%04x", conf[0], conf[1]); in madera_pin_dbg_show()
535 fn = (conf[0] & MADERA_GP1_FN_MASK) >> MADERA_GP1_FN_SHIFT; in madera_pin_dbg_show()
540 if (conf[1] & MADERA_GP1_DIR_MASK) in madera_pin_dbg_show()
546 if (conf[1] & MADERA_GP1_PU_MASK) in madera_pin_dbg_show()
549 if (conf[1] & MADERA_GP1_PD_MASK) in madera_pin_dbg_show()
552 if (conf[0] & MADERA_GP1_DB_MASK) in madera_pin_dbg_show()
555 if (conf[0] & MADERA_GP1_OP_CFG_MASK) in madera_pin_dbg_show()
560 seq_printf(s, " DRV=%umA", madera_pin_unmake_drv_str(priv, conf[1])); in madera_pin_dbg_show()
562 if (conf[0] & MADERA_GP1_IP_CFG_MASK) in madera_pin_dbg_show()
749 unsigned int conf[2]; in madera_pin_conf_get() local
752 ret = regmap_read(priv->madera->regmap, reg, &conf[0]); in madera_pin_conf_get()
754 ret = regmap_read(priv->madera->regmap, reg + 1, &conf[1]); in madera_pin_conf_get()
764 conf[1] &= MADERA_GP1_PU_MASK | MADERA_GP1_PD_MASK; in madera_pin_conf_get()
765 if (conf[1] == (MADERA_GP1_PU | MADERA_GP1_PD)) in madera_pin_conf_get()
769 conf[1] &= MADERA_GP1_PU_MASK | MADERA_GP1_PD_MASK; in madera_pin_conf_get()
770 if (!conf[1]) in madera_pin_conf_get()
774 conf[1] &= MADERA_GP1_PU_MASK | MADERA_GP1_PD_MASK; in madera_pin_conf_get()
775 if (conf[1] == MADERA_GP1_PD_MASK) in madera_pin_conf_get()
779 conf[1] &= MADERA_GP1_PU_MASK | MADERA_GP1_PD_MASK; in madera_pin_conf_get()
780 if (conf[1] == MADERA_GP1_PU_MASK) in madera_pin_conf_get()
784 if (conf[0] & MADERA_GP1_OP_CFG_MASK) in madera_pin_conf_get()
788 if (!(conf[0] & MADERA_GP1_OP_CFG_MASK)) in madera_pin_conf_get()
792 result = madera_pin_unmake_drv_str(priv, conf[1]); in madera_pin_conf_get()
795 if (conf[0] & MADERA_GP1_DB_MASK) in madera_pin_conf_get()
799 if (conf[0] & MADERA_GP1_DIR_MASK) in madera_pin_conf_get()
804 if (conf[0] & MADERA_GP1_IP_CFG_MASK) in madera_pin_conf_get()
808 if ((conf[1] & MADERA_GP1_DIR_MASK) && in madera_pin_conf_get()
809 (conf[0] & MADERA_GP1_LVL_MASK)) in madera_pin_conf_get()
825 u16 conf[2] = {0, 0}; in madera_pin_conf_set() local
837 conf[1] |= MADERA_GP1_PU | MADERA_GP1_PD; in madera_pin_conf_set()
841 conf[1] &= ~(MADERA_GP1_PU | MADERA_GP1_PD); in madera_pin_conf_set()
845 conf[1] |= MADERA_GP1_PD; in madera_pin_conf_set()
846 conf[1] &= ~MADERA_GP1_PU; in madera_pin_conf_set()
850 conf[1] |= MADERA_GP1_PU; in madera_pin_conf_set()
851 conf[1] &= ~MADERA_GP1_PD; in madera_pin_conf_set()
855 conf[0] |= MADERA_GP1_OP_CFG; in madera_pin_conf_set()
859 conf[0] &= ~MADERA_GP1_OP_CFG; in madera_pin_conf_set()
864 conf[1] &= ~MADERA_GP1_DRV_STR_MASK; in madera_pin_conf_set()
865 conf[1] |= madera_pin_make_drv_str(priv, val); in madera_pin_conf_set()
876 conf[0] |= MADERA_GP1_DB; in madera_pin_conf_set()
878 conf[0] &= ~MADERA_GP1_DB; in madera_pin_conf_set()
884 conf[1] |= MADERA_GP1_DIR; in madera_pin_conf_set()
886 conf[1] &= ~MADERA_GP1_DIR; in madera_pin_conf_set()
892 conf[0] |= MADERA_GP1_IP_CFG; in madera_pin_conf_set()
894 conf[0] &= ~MADERA_GP1_IP_CFG; in madera_pin_conf_set()
897 conf[1] |= MADERA_GP1_DIR; in madera_pin_conf_set()
901 conf[0] |= MADERA_GP1_IP_CFG; in madera_pin_conf_set()
903 conf[1] |= MADERA_GP1_DIR; in madera_pin_conf_set()
909 conf[0] |= MADERA_GP1_LVL; in madera_pin_conf_set()
911 conf[0] &= ~MADERA_GP1_LVL; in madera_pin_conf_set()
914 conf[1] &= ~MADERA_GP1_DIR; in madera_pin_conf_set()
926 __func__, pin + 1, reg, conf[0], reg + 1, conf[1]); in madera_pin_conf_set()
928 ret = regmap_update_bits(priv->madera->regmap, reg, mask[0], conf[0]); in madera_pin_conf_set()
933 ret = regmap_update_bits(priv->madera->regmap, reg, mask[1], conf[1]); in madera_pin_conf_set()