diff options
author | Jonathan Corbet <corbet@lwn.net> | 2009-12-02 06:39:57 +0300 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2010-05-08 03:16:02 +0400 |
commit | 7e0de022680f7899d33141f3ab5724a704f5669a (patch) | |
tree | 237054ee8d0676b9a327f0e3cdd1a6773cb3eb2d /drivers/video/via/via-core.c | |
parent | 24b4d82e4715841848a499534ed5cb7db3d6bca3 (diff) | |
download | linux-7e0de022680f7899d33141f3ab5724a704f5669a.tar.xz |
viafb: add a driver for GPIO lines
This is a simple gpiolib driver giving access to the GPIO lines in the
VIA framebuffer system. A simple mechanism exists for switching lines
between GPIO and I2C, but it's only compile-time for now.
Cc: ScottFang@viatech.com.cn
Cc: JosephChan@via.com.tw
Cc: Harald Welte <laforge@gnumonks.org>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/video/via/via-core.c')
-rw-r--r-- | drivers/video/via/via-core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/via/via-core.c b/drivers/video/via/via-core.c index b77cd5c2fc96..806237e8b4a4 100644 --- a/drivers/video/via/via-core.c +++ b/drivers/video/via/via-core.c @@ -9,6 +9,7 @@ */ #include "via-core.h" #include "via_i2c.h" +#include "via-gpio.h" #include "global.h" #include <linux/module.h> @@ -221,6 +222,11 @@ static int __devinit via_pci_probe(struct pci_dev *pdev, ret = via_fb_pci_probe(&global_dev); if (ret) goto out_i2c; + /* + * Create the GPIOs. We continue whether or not this succeeds; + * the framebuffer might be useful even without GPIO ports. + */ + ret = viafb_create_gpios(&global_dev, adap_configs); return 0; out_i2c: @@ -234,6 +240,7 @@ out_disable: static void __devexit via_pci_remove(struct pci_dev *pdev) { + viafb_destroy_gpios(); viafb_delete_i2c_busses(); via_fb_pci_remove(pdev); via_pci_teardown_mmio(&global_dev); |