Lines Matching refs:pinctrl_info
787 struct cnss_pinctrl_info *pinctrl_info; in cnss_get_pinctrl() local
792 pinctrl_info = &plat_priv->pinctrl_info; in cnss_get_pinctrl()
794 pinctrl_info->pinctrl = devm_pinctrl_get(dev); in cnss_get_pinctrl()
795 if (IS_ERR_OR_NULL(pinctrl_info->pinctrl)) { in cnss_get_pinctrl()
796 ret = PTR_ERR(pinctrl_info->pinctrl); in cnss_get_pinctrl()
802 pinctrl_info->bootstrap_active = in cnss_get_pinctrl()
803 pinctrl_lookup_state(pinctrl_info->pinctrl, in cnss_get_pinctrl()
805 if (IS_ERR_OR_NULL(pinctrl_info->bootstrap_active)) { in cnss_get_pinctrl()
806 ret = PTR_ERR(pinctrl_info->bootstrap_active); in cnss_get_pinctrl()
815 pinctrl_info->sol_default = in cnss_get_pinctrl()
816 pinctrl_lookup_state(pinctrl_info->pinctrl, in cnss_get_pinctrl()
818 if (IS_ERR_OR_NULL(pinctrl_info->sol_default)) { in cnss_get_pinctrl()
819 ret = PTR_ERR(pinctrl_info->sol_default); in cnss_get_pinctrl()
828 pinctrl_info->wlan_en_gpio = of_get_named_gpio(dev->of_node, in cnss_get_pinctrl()
830 cnss_pr_dbg("WLAN_EN GPIO: %d\n", pinctrl_info->wlan_en_gpio); in cnss_get_pinctrl()
831 pinctrl_info->wlan_en_active = in cnss_get_pinctrl()
832 pinctrl_lookup_state(pinctrl_info->pinctrl, in cnss_get_pinctrl()
834 if (IS_ERR_OR_NULL(pinctrl_info->wlan_en_active)) { in cnss_get_pinctrl()
835 ret = PTR_ERR(pinctrl_info->wlan_en_active); in cnss_get_pinctrl()
841 pinctrl_info->wlan_en_sleep = in cnss_get_pinctrl()
842 pinctrl_lookup_state(pinctrl_info->pinctrl, in cnss_get_pinctrl()
844 if (IS_ERR_OR_NULL(pinctrl_info->wlan_en_sleep)) { in cnss_get_pinctrl()
845 ret = PTR_ERR(pinctrl_info->wlan_en_sleep); in cnss_get_pinctrl()
853 pinctrl_info->wlan_en_gpio = -EINVAL; in cnss_get_pinctrl()
858 pinctrl_info->bt_en_gpio = of_get_named_gpio(dev->of_node, in cnss_get_pinctrl()
860 cnss_pr_dbg("BT GPIO: %d\n", pinctrl_info->bt_en_gpio); in cnss_get_pinctrl()
862 pinctrl_info->bt_en_gpio = -EINVAL; in cnss_get_pinctrl()
867 pinctrl_info->xo_clk_gpio = of_get_named_gpio(dev->of_node, in cnss_get_pinctrl()
870 pinctrl_info->xo_clk_gpio); in cnss_get_pinctrl()
873 pinctrl_info->xo_clk_gpio = -EINVAL; in cnss_get_pinctrl()
877 pinctrl_info->sw_ctrl_gpio = of_get_named_gpio(dev->of_node, in cnss_get_pinctrl()
881 pinctrl_info->sw_ctrl_gpio); in cnss_get_pinctrl()
883 pinctrl_info->sw_ctrl = in cnss_get_pinctrl()
884 pinctrl_lookup_state(pinctrl_info->pinctrl, in cnss_get_pinctrl()
886 if (IS_ERR_OR_NULL(pinctrl_info->sw_ctrl)) { in cnss_get_pinctrl()
887 ret = PTR_ERR(pinctrl_info->sw_ctrl); in cnss_get_pinctrl()
891 ret = pinctrl_select_state(pinctrl_info->pinctrl, in cnss_get_pinctrl()
892 pinctrl_info->sw_ctrl); in cnss_get_pinctrl()
898 pinctrl_info->sw_ctrl_gpio = -EINVAL; in cnss_get_pinctrl()
902 pinctrl_info->sw_ctrl_wl_cx = in cnss_get_pinctrl()
903 pinctrl_lookup_state(pinctrl_info->pinctrl, in cnss_get_pinctrl()
905 if (IS_ERR_OR_NULL(pinctrl_info->sw_ctrl_wl_cx)) { in cnss_get_pinctrl()
906 ret = PTR_ERR(pinctrl_info->sw_ctrl_wl_cx); in cnss_get_pinctrl()
911 ret = pinctrl_select_state(pinctrl_info->pinctrl, in cnss_get_pinctrl()
912 pinctrl_info->sw_ctrl_wl_cx); in cnss_get_pinctrl()
956 struct cnss_pinctrl_info *pinctrl_info; in cnss_get_wlan_sw_ctrl() local
959 pinctrl_info = &plat_priv->pinctrl_info; in cnss_get_wlan_sw_ctrl()
962 pinctrl_info->wlan_sw_ctrl_gpio = of_get_named_gpio(dev->of_node, in cnss_get_wlan_sw_ctrl()
966 pinctrl_info->wlan_sw_ctrl_gpio); in cnss_get_wlan_sw_ctrl()
968 pinctrl_info->wlan_sw_ctrl_gpio = -EINVAL; in cnss_get_wlan_sw_ctrl()
978 int xo_clk_gpio = plat_priv->pinctrl_info.xo_clk_gpio, retry = 0, ret; in cnss_set_xo_clk_gpio_state()
1015 struct cnss_pinctrl_info *pinctrl_info; in cnss_select_pinctrl_state() local
1023 pinctrl_info = &plat_priv->pinctrl_info; in cnss_select_pinctrl_state()
1026 if (!IS_ERR_OR_NULL(pinctrl_info->bootstrap_active)) { in cnss_select_pinctrl_state()
1028 (pinctrl_info->pinctrl, in cnss_select_pinctrl_state()
1029 pinctrl_info->bootstrap_active); in cnss_select_pinctrl_state()
1037 if (!IS_ERR_OR_NULL(pinctrl_info->sol_default)) { in cnss_select_pinctrl_state()
1039 (pinctrl_info->pinctrl, in cnss_select_pinctrl_state()
1040 pinctrl_info->sol_default); in cnss_select_pinctrl_state()
1049 if (!IS_ERR_OR_NULL(pinctrl_info->wlan_en_active)) { in cnss_select_pinctrl_state()
1051 (pinctrl_info->pinctrl, in cnss_select_pinctrl_state()
1052 pinctrl_info->wlan_en_active); in cnss_select_pinctrl_state()
1072 if (!IS_ERR_OR_NULL(pinctrl_info->wlan_en_sleep)) { in cnss_select_pinctrl_state()
1078 ret = pinctrl_select_state(pinctrl_info->pinctrl, in cnss_select_pinctrl_state()
1079 pinctrl_info->wlan_en_sleep); in cnss_select_pinctrl_state()
1090 cnss_pr_dbg("WLAN_EN Value: %d\n", gpio_get_value(pinctrl_info->wlan_en_gpio)); in cnss_select_pinctrl_state()
1110 int ret = 0, bt_en_gpio = plat_priv->pinctrl_info.bt_en_gpio; in cnss_select_pinctrl_enable()