Lines Matching +full:gpio +full:- +full:lvl
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Card-specific functions for the Siano SMS1xxx USB dongle
8 #include "sms-cards.h"
45 .name = "Hauppauge Okemo-A",
51 .name = "Hauppauge Okemo-B",
86 .lna_ctrl = -1,
134 .name = "Siano Denver (ATSC-M/H) Digital Receiver",
161 p_gpio_config->direction = SMS_GPIO_DIRECTION_OUTPUT; in sms_gpio_assign_11xx_default_led_config()
162 p_gpio_config->inputcharacteristics = in sms_gpio_assign_11xx_default_led_config()
164 p_gpio_config->outputdriving = SMS_GPIO_OUTPUTDRIVING_4mA; in sms_gpio_assign_11xx_default_led_config()
165 p_gpio_config->outputslewrate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS; in sms_gpio_assign_11xx_default_led_config()
166 p_gpio_config->pullupdown = SMS_GPIO_PULLUPDOWN_NONE; in sms_gpio_assign_11xx_default_led_config()
228 int lvl, ret; in sms_set_gpio() local
229 u32 gpio; in sms_set_gpio() local
239 return -EINVAL; in sms_set_gpio()
242 /* inverted gpio */ in sms_set_gpio()
243 gpio = pin * -1; in sms_set_gpio()
244 lvl = enable ? 0 : 1; in sms_set_gpio()
246 gpio = pin; in sms_set_gpio()
247 lvl = enable ? 1 : 0; in sms_set_gpio()
250 ret = smscore_configure_gpio(coredev, gpio, &gpioconfig); in sms_set_gpio()
254 return smscore_set_gpio(coredev, gpio, lvl); in sms_set_gpio()
265 sms_set_gpio(coredev, board->led_power, 0); in sms_board_setup()
266 sms_set_gpio(coredev, board->led_hi, 0); in sms_board_setup()
267 sms_set_gpio(coredev, board->led_lo, 0); in sms_board_setup()
272 sms_set_gpio(coredev, board->lna_ctrl, 0); in sms_board_setup()
288 board->led_power, onoff ? 1 : 0); in sms_board_power()
294 sms_set_gpio(coredev, board->lna_ctrl, 0); in sms_board_power()
306 /* don't touch GPIO if LEDs are already set */ in sms_board_led_feedback()
307 if (smscore_led_state(coredev, -1) == led) in sms_board_led_feedback()
313 board->led_lo, (led & SMS_LED_LO) ? 1 : 0); in sms_board_led_feedback()
315 board->led_hi, (led & SMS_LED_HI) ? 1 : 0); in sms_board_led_feedback()
335 board->rf_switch, onoff ? 1 : 0); in sms_board_lna_control()
337 board->lna_ctrl, onoff ? 1 : 0); in sms_board_lna_control()
339 return -EINVAL; in sms_board_lna_control()