aboutsummaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Expand)AuthorAge
* Properly delete sound/ppc/toonie.cLinus Torvalds2006-06-27
* [PATCH] update two drivers for poison.hRandy Dunlap2006-06-27
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2006-06-26
|\
| * spelling fixesAndreas Mohr2006-06-26
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds2006-06-26
|\ \ | |/ |/|
| * kconfig: remove leading whitespace in menu promptsRoman Zippel2006-06-09
* | [PATCH] au1xxx: oss sound support for au1200Domen Puncer2006-06-25
* | [PATCH] au1550_ac97: spin_unlock in error pathDomen Puncer2006-06-25
* | [PATCH] emu10k1: mark midi_spinlock as usedAlexey Dobriyan2006-06-25
* | [PATCH] msnd section fixAndrew Morton2006-06-25
* | [SOUND] sparc: Port amd7930 to new SBUS device layer.David S. Miller2006-06-24
* | [SPARC64]: Use in-kernel PROM tree for EBUS and ISA.David S. Miller2006-06-24
* | [PATCH] OSS: cs46xx cleanup and tiny bugfixJesper Juhl2006-06-23
* | [PATCH] Au1550/1200: add missing PSC #define's, make OSS driver use the prope...Sergei Shtylyov2006-06-23
* | [ALSA] aoa driver - Kconfig - remove spaces for SND!=nJaroslav Kysela2006-06-22
* | [ALSA] hda-codec - Show EAPD and pin-detection capabilities in procTakashi Iwai2006-06-22
* | [ALSA] Remove nested mutexes in seq_ports.cTakashi Iwai2006-06-22
* | [ALSA] Remove ppc/toonie.cTakashi Iwai2006-06-22
* | [ALSA] snd-powermac: no longer handle anything with a layout-id propertyJohannes Berg2006-06-22
* | [ALSA] snd-aoa: add snd-aoaJohannes Berg2006-06-22
* | [ALSA] hda-codec - Use 3stack model for ASUS P5RD2-VM / P5GPL-X SETakashi Iwai2006-06-22
* | [ALSA] HDA - Lenovo 3000 N100-07684JU - enable laptop-eapd by defaultDaniel T Chen2006-06-22
* | [ALSA] USB midi: Remove duplicate CS_AUDIO_* #definesBen Williamson2006-06-22
* | [ALSA] AD1888 suspend/resume fixJaya Kumar2006-06-22
* | [ALSA] Disable AC97 AUX and VIDEO controls for WM9705 touchscreenRodolfo Giometti2006-06-22
* | [ALSA] via82xx - Default to variable samplerate enabled for MSI K8T Neo2-FIKarsten Wiese2006-06-22
* | [ALSA] Add hp_only quirk for pci id [161f:2032] to via82xxDaniel T Chen2006-06-22
* | [ALSA] sound/pci/: Add hp_only quirk for Dell D800 laptopsDaniel T Chen2006-06-22
* | [ALSA] cs5535audio - trivial debug printkJaya Kumar2006-06-22
* | [ALSA] fix potential NULL pointer deref in snd_sb8dsp_midi_interrupt()Jesper Juhl2006-06-22
* | [ALSA] hda-codec - Add SPDIF support to Thinkpad T/X/Z60Takashi Iwai2006-06-22
* | [ALSA] ac97_codec - fix duplicate control creation in AC97Jaya Kumar2006-06-22
* | [ALSA] RME HDSP - fixed proc interface (missing {})Remy Bruno2006-06-22
* | [ALSA] snd-ca0106: Update playback to 24bit. Fix typo is comment.James Courtier-Dutton2006-06-22
* | [ALSA] Fix invalid __init in ALSA ISA driversTakashi Iwai2006-06-22
* | [ALSA] sound/vxpocket: fix printk warningRandy Dunlap2006-06-22
* | [ALSA] Remove bogus check of mmap_count in snd_pcm_release()Takashi Iwai2006-06-22
* | [ALSA] Fix races in irq handler and ioremapTakashi Iwai2006-06-22
* | [ALSA] virmidi: revert erroneous removal of zero initializationClemens Ladisch2006-06-22
* | [ALSA] hda-codec - Add model entry for HP nx6320Takashi Iwai2006-06-22
* | [ALSA] ac97 - Add Thinkpad T41p to AD1981 jack-sense blacklistTakashi Iwai2006-06-22
* | [ALSA] Fix possible races in PCI driver removalTakashi Iwai2006-06-22
* | [ALSA] hda-intel - Fix race in removeTakashi Iwai2006-06-22
* | [ALSA] bt87x: add Voodoo TV 200 whitelist entryClemens Ladisch2006-06-22
* | [ALSA] NULL pointer dereference in sound/synth/emux/soundfont.cEric Sesterhenn2006-06-22
* | [ALSA] cmipci - Fix a typo in 'PC Speaker Playback Switch' controlTakashi Iwai2006-06-22
* | [ALSA] ice1712 - Set mpu401 info flags from _card_infoAlan Horstmann2006-06-22
* | [ALSA] hda-codec - Fix model for HP dc7600Takashi Iwai2006-06-22
* | [ALSA] ice1724 - Add functionality for Audiotrak Prodigy 7.1 LTTakashi Iwai2006-06-22
* | [ALSA] au88x0 - Fix 64bit address of MPU401 MMIO portTakashi Iwai2006-06-22
pan>(reg_out, vg->io_gpo); spin_unlock_irqrestore(&vg->lock, flags); return 0; } static int vx855gpio_get(struct gpio_chip *gpio, unsigned int nr) { struct vx855_gpio *vg = container_of(gpio, struct vx855_gpio, gpio); u_int32_t reg_in; int ret = 0; if (nr < NR_VX855_GPI) { reg_in = inl(vg->io_gpi); if (reg_in & gpi_i_bit(nr)) ret = 1; } else if (nr < NR_VX855_GPInO) { /* GPO don't have an input bit, we need to read it * back from the output register */ reg_in = inl(vg->io_gpo); if (reg_in & gpo_o_bit(nr - NR_VX855_GPI)) ret = 1; } else { reg_in = inl(vg->io_gpi); if (reg_in & gpio_i_bit(nr - NR_VX855_GPInO)) ret = 1; } return ret; } static void vx855gpio_set(struct gpio_chip *gpio, unsigned int nr, int val) { struct vx855_gpio *vg = container_of(gpio, struct vx855_gpio, gpio); unsigned long flags; u_int32_t reg_out; /* True GPI cannot be switched to output mode */ if (nr < NR_VX855_GPI) return; spin_lock_irqsave(&vg->lock, flags); reg_out = inl(vg->io_gpo); if (nr < NR_VX855_GPInO) { if (val) reg_out |= gpo_o_bit(nr - NR_VX855_GPI); else reg_out &= ~gpo_o_bit(nr - NR_VX855_GPI); } else { if (val) reg_out |= gpio_o_bit(nr - NR_VX855_GPInO); else reg_out &= ~gpio_o_bit(nr - NR_VX855_GPInO); } outl(reg_out, vg->io_gpo); spin_unlock_irqrestore(&vg->lock, flags); } static int vx855gpio_direction_output(struct gpio_chip *gpio, unsigned int nr, int val) { /* True GPI cannot be switched to output mode */ if (nr < NR_VX855_GPI) return -EINVAL; /* True GPO don't need to be switched to output mode, * and GPIO are open-drain, i.e. also need no switching, * so all we do is set the level */ vx855gpio_set(gpio, nr, val); return 0; } static const char *vx855gpio_names[NR_VX855_GP] = { "VX855_GPI0", "VX855_GPI1", "VX855_GPI2", "VX855_GPI3", "VX855_GPI4", "VX855_GPI5", "VX855_GPI6", "VX855_GPI7", "VX855_GPI8", "VX855_GPI9", "VX855_GPI10", "VX855_GPI11", "VX855_GPI12", "VX855_GPI13", "VX855_GPO0", "VX855_GPO1", "VX855_GPO2", "VX855_GPO3", "VX855_GPO4", "VX855_GPO5", "VX855_GPO6", "VX855_GPO7", "VX855_GPO8", "VX855_GPO9", "VX855_GPO10", "VX855_GPO11", "VX855_GPO12", "VX855_GPIO0", "VX855_GPIO1", "VX855_GPIO2", "VX855_GPIO3", "VX855_GPIO4", "VX855_GPIO5", "VX855_GPIO6", "VX855_GPIO7", "VX855_GPIO8", "VX855_GPIO9", "VX855_GPIO10", "VX855_GPIO11", "VX855_GPIO12", "VX855_GPIO13", "VX855_GPIO14" }; static void vx855gpio_gpio_setup(struct vx855_gpio *vg) { struct gpio_chip *c = &vg->gpio; c->label = "VX855 South Bridge"; c->owner = THIS_MODULE; c->direction_input = vx855gpio_direction_input; c->direction_output = vx855gpio_direction_output; c->get = vx855gpio_get; c->set = vx855gpio_set; c->dbg_show = NULL; c->base = 0; c->ngpio = NR_VX855_GP; c->can_sleep = 0; c->names = vx855gpio_names; } /* This platform device is ordinarily registered by the vx855 mfd driver */ static __devinit int vx855gpio_probe(struct platform_device *pdev) { struct resource *res_gpi; struct resource *res_gpo; struct vx855_gpio *vg; int ret; res_gpi = platform_get_resource(pdev, IORESOURCE_IO, 0); res_gpo = platform_get_resource(pdev, IORESOURCE_IO, 1); if (!res_gpi || !res_gpo) return -EBUSY; vg = kzalloc(sizeof(*vg), GFP_KERNEL); if (!vg) return -ENOMEM; platform_set_drvdata(pdev, vg); dev_info(&pdev->dev, "found VX855 GPIO controller\n"); vg->io_gpi = res_gpi->start; vg->io_gpo = res_gpo->start; spin_lock_init(&vg->lock); /* * A single byte is used to control various GPIO ports on the VX855, * and in the case of the OLPC XO-1.5, some of those ports are used * for switches that are interpreted and exposed through ACPI. ACPI * will have reserved the region, so our own reservation will not * succeed. Ignore and continue. */ if (!request_region(res_gpi->start, resource_size(res_gpi), MODULE_NAME "_gpi")) dev_warn(&pdev->dev, "GPI I/O resource busy, probably claimed by ACPI\n"); else vg->gpi_reserved = true; if (!request_region(res_gpo->start, resource_size(res_gpo), MODULE_NAME "_gpo")) dev_warn(&pdev->dev, "GPO I/O resource busy, probably claimed by ACPI\n"); else vg->gpo_reserved = true; vx855gpio_gpio_setup(vg); ret = gpiochip_add(&vg->gpio); if (ret) { dev_err(&pdev->dev, "failed to register GPIOs\n"); goto out_release; } return 0; out_release: if (vg->gpi_reserved) release_region(res_gpi->start, resource_size(res_gpi)); if (vg->gpo_reserved) release_region(res_gpi->start, resource_size(res_gpo)); platform_set_drvdata(pdev, NULL); kfree(vg); return ret; } static int __devexit vx855gpio_remove(struct platform_device *pdev) { struct vx855_gpio *vg = platform_get_drvdata(pdev); struct resource *res; if (gpiochip_remove(&vg->gpio)) dev_err(&pdev->dev, "unable to remove gpio_chip?\n"); if (vg->gpi_reserved) { res = platform_get_resource(pdev, IORESOURCE_IO, 0); release_region(res->start, resource_size(res)); } if (vg->gpo_reserved) { res = platform_get_resource(pdev, IORESOURCE_IO, 1); release_region(res->start, resource_size(res)); } platform_set_drvdata(pdev, NULL); kfree(vg); return 0; } static struct platform_driver vx855gpio_driver = { .driver = { .name = MODULE_NAME, .owner = THIS_MODULE, }, .probe = vx855gpio_probe, .remove = __devexit_p(vx855gpio_remove), }; static int vx855gpio_init(void) { return platform_driver_register(&vx855gpio_driver); } module_init(vx855gpio_init); static void vx855gpio_exit(void) { platform_driver_unregister(&vx855gpio_driver); } module_exit(vx855gpio_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Harald Welte <HaraldWelte@viatech.com>"); MODULE_DESCRIPTION("GPIO driver for the VIA VX855 chipset"); MODULE_ALIAS("platform:vx855_gpio");