Home
last modified time | relevance | path

Searched refs:gpio (Results 1 – 25 of 52) sorted by relevance

123

/sound/soc/
Dsoc-jack.c234 static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) in snd_soc_jack_gpio_detect() argument
236 struct snd_soc_jack *jack = gpio->jack; in snd_soc_jack_gpio_detect()
240 enable = gpio_get_value_cansleep(gpio->gpio); in snd_soc_jack_gpio_detect()
241 if (gpio->invert) in snd_soc_jack_gpio_detect()
245 report = gpio->report; in snd_soc_jack_gpio_detect()
249 if (gpio->jack_status_check) in snd_soc_jack_gpio_detect()
250 report = gpio->jack_status_check(); in snd_soc_jack_gpio_detect()
252 snd_soc_jack_report(jack, report, gpio->report); in snd_soc_jack_gpio_detect()
258 struct snd_soc_jack_gpio *gpio = data; in gpio_handler() local
259 struct device *dev = gpio->jack->codec->card->dev; in gpio_handler()
[all …]
/sound/aoa/fabrics/
Dlayout.c606 struct gpio_runtime gpio; member
637 struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \
638 if (gpio->methods && gpio->methods->get_##n) \
640 gpio->methods->get_##n(gpio); \
646 struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \
647 if (gpio->methods && gpio->methods->get_##n) \
648 gpio->methods->set_##n(gpio, \
730 v = ldev->gpio.methods->get_detect(&ldev->gpio, in detected_get()
734 v = ldev->gpio.methods->get_detect(&ldev->gpio, in detected_get()
793 codec->gpio = &ldev->gpio; in check_codec()
[all …]
/sound/pci/ice1712/
Dice1712.h373 } gpio; member
407 ice->gpio.set_dir(ice, bits); in snd_ice1712_gpio_set_dir()
412 return ice->gpio.get_dir(ice); in snd_ice1712_gpio_get_dir()
417 ice->gpio.set_mask(ice, bits); in snd_ice1712_gpio_set_mask()
422 ice->gpio.set_data(ice, val); in snd_ice1712_gpio_write()
427 return ice->gpio.get_data(ice); in snd_ice1712_gpio_read()
438 ice->gpio.saved[0] = ice->gpio.direction; in snd_ice1712_save_gpio_status()
439 ice->gpio.saved[1] = ice->gpio.write_mask; in snd_ice1712_save_gpio_status()
444 ice->gpio.set_dir(ice, ice->gpio.saved[0]); in snd_ice1712_restore_gpio_status()
445 ice->gpio.set_mask(ice, ice->gpio.saved[1]); in snd_ice1712_restore_gpio_status()
[all …]
Drevo.c118 ice->gpio.direction &= ~mask; in revo_i2c_direction()
119 ice->gpio.direction |= val; in revo_i2c_direction()
120 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); in revo_i2c_direction()
378 static void write_data(struct snd_ice1712 *ice, unsigned int gpio, in write_data() argument
383 gpio &= ~VT1724_REVO_CCLK; in write_data()
384 snd_ice1712_gpio_write(ice, gpio); in write_data()
388 gpio |= VT1724_REVO_CDOUT; in write_data()
390 gpio &= ~VT1724_REVO_CDOUT; in write_data()
391 snd_ice1712_gpio_write(ice, gpio); in write_data()
394 gpio |= VT1724_REVO_CCLK; in write_data()
[all …]
Dpontis.c382 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); in spi_write()
383 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); in spi_write()
404 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); in spi_read()
405 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); in spi_read()
434 ucontrol->value.enumerated.item[0] = ice->gpio.saved[0]; in cs_source_get()
446 if (ucontrol->value.enumerated.item[0] != ice->gpio.saved[0]) { in cs_source_put()
447 ice->gpio.saved[0] = ucontrol->value.enumerated.item[0] & 3; in cs_source_put()
448 val = 0x80 | (ice->gpio.saved[0] << 3); in cs_source_put()
474 ucontrol->value.integer.value[0] = (~ice->gpio.write_mask & 0xffff) | 0x00f0; in pontis_gpio_mask_get()
487 changed = val != ice->gpio.write_mask; in pontis_gpio_mask_put()
[all …]
Dquartet.c283 orig_dir = ice->gpio.get_dir(ice); in qtet_akm_write()
284 ice->gpio.set_dir(ice, orig_dir | GPIO_SPI_ALL); in qtet_akm_write()
286 ice->gpio.set_mask(ice, ~GPIO_SPI_ALL); in qtet_akm_write()
288 tmp = ice->gpio.get_data(ice); in qtet_akm_write()
291 ice->gpio.set_data(ice, tmp); in qtet_akm_write()
299 ice->gpio.set_data(ice, tmp); in qtet_akm_write()
308 ice->gpio.set_data(ice, tmp); in qtet_akm_write()
315 ice->gpio.set_data(ice, tmp); in qtet_akm_write()
319 ice->gpio.set_data(ice, tmp); in qtet_akm_write()
324 ice->gpio.set_data(ice, tmp); in qtet_akm_write()
[all …]
Djuli.c245 old_gpio = ice->gpio.get_data(ice); in juli_akm_set_rate_val()
249 ice->gpio.set_data(ice, new_gpio); in juli_akm_set_rate_val()
308 val = ice->gpio.get_data(ice) & (unsigned int) kcontrol->private_value; in juli_mute_get()
323 old_gpio = ice->gpio.get_data(ice); in juli_mute_put()
353 ice->gpio.set_data(ice, new_gpio); in juli_mute_put()
516 return (ice->gpio.get_data(ice) & GPIO_INTERNAL_CLOCK) ? 0 : 1; in juli_is_spdif_master()
524 result = ice->gpio.get_data(ice) & GPIO_RATE_MASK; in juli_get_rate()
537 old = ice->gpio.get_data(ice); in juli_set_rate()
543 ice->gpio.set_data(ice, new); in juli_set_rate()
560 old = ice->gpio.get_data(ice); in juli_set_spdif_clock()
[all …]
Dprodigy192.c454 static void write_data(struct snd_ice1712 *ice, unsigned int gpio, in write_data() argument
459 gpio &= ~VT1724_PRODIGY192_CCLK; in write_data()
460 snd_ice1712_gpio_write(ice, gpio); in write_data()
464 gpio |= VT1724_PRODIGY192_CDOUT; in write_data()
466 gpio &= ~VT1724_PRODIGY192_CDOUT; in write_data()
467 snd_ice1712_gpio_write(ice, gpio); in write_data()
470 gpio |= VT1724_PRODIGY192_CCLK; in write_data()
471 snd_ice1712_gpio_write(ice, gpio); in write_data()
479 static unsigned char read_data(struct snd_ice1712 *ice, unsigned int gpio, in read_data() argument
486 gpio &= ~VT1724_PRODIGY192_CCLK; in read_data()
[all …]
Dhoontech.c265 ice->gpio.direction | tmp); in stdsp24_ak4524_lock()
321 ice->gpio.write_mask = ice->eeprom.gpiomask; in snd_ice1712_ez8_init()
322 ice->gpio.direction = ice->eeprom.gpiodir; in snd_ice1712_ez8_init()
Dprodigy_hifi.c201 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); in wm8766_spi_write()
202 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); in wm8766_spi_write()
240 snd_ice1712_gpio_set_mask(ice, ice->gpio.write_mask); in ak4396_write()
241 snd_ice1712_gpio_set_dir(ice, ice->gpio.direction); in ak4396_write()
1048 ice->gpio.saved[0] = 0; in prodigy_hifi_init()
1130 ice->gpio.saved[0] = 0; in prodigy_hd2_init()
/sound/soc/codecs/
Dwm1250-ev1.c32 struct gpio gpios[WM1250_EV1_NUM_GPIOS];
42 ena = wm1250->gpios[WM1250_EV1_GPIO_CLK_ENA].gpio; in wm1250_ev1_set_bias_level()
90 gpio_set_value(wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL0].gpio, in wm1250_ev1_hw_params()
92 gpio_set_value(wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL1].gpio, in wm1250_ev1_hw_params()
96 gpio_set_value(wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL0].gpio, in wm1250_ev1_hw_params()
98 gpio_set_value(wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL1].gpio, in wm1250_ev1_hw_params()
102 gpio_set_value(wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL0].gpio, in wm1250_ev1_hw_params()
104 gpio_set_value(wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL1].gpio, in wm1250_ev1_hw_params()
108 gpio_set_value(wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL0].gpio, in wm1250_ev1_hw_params()
110 gpio_set_value(wm1250->gpios[WM1250_EV1_GPIO_CLK_SEL1].gpio, in wm1250_ev1_hw_params()
[all …]
Dak4104.c256 int gpio = of_get_named_gpio_flags(np, "reset-gpio", 0, &flags); in ak4104_spi_probe() local
258 if (gpio_is_valid(gpio)) { in ak4104_spi_probe()
259 ret = devm_gpio_request_one(&spi->dev, gpio, in ak4104_spi_probe()
Dwm9713.c891 u16 gpio = ac97_read(codec, AC97_GPIO_CFG) & 0xffc5; in wm9713_set_dai_fmt() local
898 gpio |= 0x0010; in wm9713_set_dai_fmt()
902 gpio |= 0x0018; in wm9713_set_dai_fmt()
906 gpio |= 0x001a; in wm9713_set_dai_fmt()
909 gpio |= 0x0012; in wm9713_set_dai_fmt()
944 ac97_write(codec, AC97_GPIO_CFG, gpio); in wm9713_set_dai_fmt()
Dcs4270.c674 int gpio = of_get_named_gpio_flags(np, "reset-gpio", 0, &flags); in cs4270_i2c_probe() local
676 if (gpio_is_valid(gpio)) { in cs4270_i2c_probe()
677 ret = devm_gpio_request_one(&i2c_client->dev, gpio, in cs4270_i2c_probe()
/sound/aoa/core/
Dgpio-feature.c59 struct device_node *np, *gpio; in get_gpio() local
72 gpio = of_find_node_by_name(NULL, "gpio"); in get_gpio()
73 if (!gpio) in get_gpio()
75 while ((np = of_get_next_child(gpio, np))) { in get_gpio()
218 static void gpio_enable_dual_edge(int gpio) in gpio_enable_dual_edge() argument
222 if (gpio == -1) in gpio_enable_dual_edge()
224 v = pmac_call_feature(PMAC_FTR_READ_GPIO, NULL, gpio, 0); in gpio_enable_dual_edge()
226 pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, gpio, v); in gpio_enable_dual_edge()
377 int gpio, ret, active; in ftr_get_detect() local
381 gpio = headphone_detect_gpio; in ftr_get_detect()
[all …]
DMakefile4 gpio-pmf.o \
5 gpio-feature.o
/sound/pci/
Dfm801.c751 struct snd_fm801_tea575x_gpio gpio = *get_tea575x_gpio(chip); in snd_fm801_tea575x_set_pins() local
753 reg &= ~(FM801_GPIO_GP(gpio.data) | in snd_fm801_tea575x_set_pins()
754 FM801_GPIO_GP(gpio.clk) | in snd_fm801_tea575x_set_pins()
755 FM801_GPIO_GP(gpio.wren)); in snd_fm801_tea575x_set_pins()
757 reg |= (pins & TEA575X_DATA) ? FM801_GPIO_GP(gpio.data) : 0; in snd_fm801_tea575x_set_pins()
758 reg |= (pins & TEA575X_CLK) ? FM801_GPIO_GP(gpio.clk) : 0; in snd_fm801_tea575x_set_pins()
760 reg |= (pins & TEA575X_WREN) ? 0 : FM801_GPIO_GP(gpio.wren); in snd_fm801_tea575x_set_pins()
769 struct snd_fm801_tea575x_gpio gpio = *get_tea575x_gpio(chip); in snd_fm801_tea575x_get_pins() local
773 if (reg & FM801_GPIO_GP(gpio.data)) in snd_fm801_tea575x_get_pins()
775 if (reg & FM801_GPIO_GP(gpio.most)) in snd_fm801_tea575x_get_pins()
[all …]
/sound/aoa/codecs/
Dtas.c682 tas->codec.gpio->methods->all_amps_off(tas->codec.gpio); in tas_reset_init()
684 tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); in tas_reset_init()
686 tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 1); in tas_reset_init()
688 tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); in tas_reset_init()
690 tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio); in tas_reset_init()
728 tas->codec.gpio->methods->all_amps_off(tas->codec.gpio); in tas_switch_clock()
738 tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio); in tas_switch_clock()
808 if (!tas->codec.gpio || !tas->codec.gpio->methods) { in tas_init_codec()
Donyx.c785 onyx->codec.gpio->methods->all_amps_off(onyx->codec.gpio); in onyx_switch_clock()
788 onyx->codec.gpio->methods->all_amps_restore(onyx->codec.gpio); in onyx_switch_clock()
827 onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); in onyx_resume()
829 onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 1); in onyx_resume()
831 onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); in onyx_resume()
875 if (!onyx->codec.gpio || !onyx->codec.gpio->methods) { in onyx_init_codec()
880 onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); in onyx_init_codec()
882 onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 1); in onyx_init_codec()
884 onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); in onyx_init_codec()
/sound/pci/oxygen/
Dxonar_pcm179x.c754 u16 gpio; in st_output_switch_get() local
756 gpio = oxygen_read16(chip, OXYGEN_GPIO_DATA); in st_output_switch_get()
757 if (!(gpio & GPIO_ST_HP)) in st_output_switch_get()
759 else if (gpio & GPIO_ST_HP_REAR) in st_output_switch_get()
772 u16 gpio_old, gpio; in st_output_switch_put() local
776 gpio = gpio_old; in st_output_switch_put()
779 gpio &= ~(GPIO_ST_HP | GPIO_ST_HP_REAR); in st_output_switch_put()
782 gpio |= GPIO_ST_HP | GPIO_ST_HP_REAR; in st_output_switch_put()
785 gpio = (gpio | GPIO_ST_HP) & ~GPIO_ST_HP_REAR; in st_output_switch_put()
788 oxygen_write16(chip, OXYGEN_GPIO_DATA, gpio); in st_output_switch_put()
[all …]
/sound/soc/blackfin/
Dbf5xx-ac97.c170 u16 gpio = P_IDENT(sport_handle->pin_req[3]); in bf5xx_ac97_warm_reset() local
175 gpio_request(gpio, "bf5xx-ac97"); in bf5xx_ac97_warm_reset()
176 gpio_direction_output(gpio, 1); in bf5xx_ac97_warm_reset()
178 gpio_set_value(gpio, 0); in bf5xx_ac97_warm_reset()
180 gpio_free(gpio); in bf5xx_ac97_warm_reset()
/sound/pci/hda/
Dhda_proc.c529 unsigned int gpio = in print_gpio() local
535 gpio & AC_GPIO_IO_COUNT, in print_gpio()
536 (gpio & AC_GPIO_O_COUNT) >> AC_GPIO_O_COUNT_SHIFT, in print_gpio()
537 (gpio & AC_GPIO_I_COUNT) >> AC_GPIO_I_COUNT_SHIFT, in print_gpio()
538 (gpio & AC_GPIO_UNSOLICITED) ? 1 : 0, in print_gpio()
539 (gpio & AC_GPIO_WAKE) ? 1 : 0); in print_gpio()
540 max = gpio & AC_GPIO_IO_COUNT; in print_gpio()
/sound/soc/pxa/
Dhx4700.c50 .gpio = GPIO75_HX4700_EARPHONE_nDET,
181 static struct gpio hx4700_audio_gpios[] = {
/sound/soc/samsung/
Di2s.c1023 int index, gpio, ret; in samsung_i2s_parse_dt_gpio() local
1026 gpio = of_get_gpio(dev->of_node, index); in samsung_i2s_parse_dt_gpio()
1027 if (!gpio_is_valid(gpio)) { in samsung_i2s_parse_dt_gpio()
1028 dev_err(dev, "invalid gpio[%d]: %d\n", index, gpio); in samsung_i2s_parse_dt_gpio()
1032 ret = gpio_request(gpio, dev_name(dev)); in samsung_i2s_parse_dt_gpio()
1034 dev_err(dev, "gpio [%d] request failed\n", gpio); in samsung_i2s_parse_dt_gpio()
1037 i2s->gpios[index] = gpio; in samsung_i2s_parse_dt_gpio()
/sound/aoa/
Daoa.h45 struct gpio_runtime *gpio; member

123