summaryrefslogtreecommitdiffstats
path: root/drivers/video/via/viafbdev.h
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2009-12-01 20:29:39 -0700
committerJonathan Corbet <corbet@lwn.net>2010-05-07 17:15:47 -0600
commitf045f77bc0bf238a871b10bea9e425329a8e4abc (patch)
tree085c6651bc6f4d47f4b4659fa4ef4134fe40733f /drivers/video/via/viafbdev.h
parent4da62e6c6e056d709e5dc04ac7c5e81692cf924f (diff)
downloadop-kernel-dev-f045f77bc0bf238a871b10bea9e425329a8e4abc.zip
op-kernel-dev-f045f77bc0bf238a871b10bea9e425329a8e4abc.tar.gz
viafb: Move core stuff into via-core.c
The first step toward turning viafb into a multifunction driver. This patch creates a new via-core.c file which serves as the main PCI driver; everything else comes below that. Some work has been done to rationalize the i2c drivers in this new scheme. 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/viafbdev.h')
-rw-r--r--drivers/video/via/viafbdev.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/video/via/viafbdev.h b/drivers/video/via/viafbdev.h
index 4bc00ec..5604f27 100644
--- a/drivers/video/via/viafbdev.h
+++ b/drivers/video/via/viafbdev.h
@@ -24,6 +24,7 @@
#include <linux/proc_fs.h>
#include <linux/fb.h>
+#include <linux/spinlock.h>
#include "ioctl.h"
#include "share.h"
@@ -42,9 +43,6 @@
struct viafb_shared {
struct proc_dir_entry *proc_entry; /*viafb proc entry */
- /* I2C stuff */
- struct via_i2c_stuff i2c_stuff[VIAFB_NUM_I2C];
-
/* All the information will be needed to set engine */
struct tmds_setting_information tmds_setting_info;
struct crt_setting_information crt_setting_info;
@@ -74,6 +72,14 @@ struct viafb_par {
struct viafb_shared *shared;
+ /*
+ * (jc) I believe one should use locking to protect against
+ * concurrent access to the device ports and registers. Thus,
+ * this lock. Use of it is *far* from universal, though...
+ * someday...
+ */
+ spinlock_t reg_lock;
+
/* All the information will be needed to set engine */
/* depreciated, use the ones in shared directly */
struct tmds_setting_information *tmds_setting_info;
@@ -101,4 +107,9 @@ u8 viafb_gpio_i2c_read_lvds(struct lvds_setting_information
void viafb_gpio_i2c_write_mask_lvds(struct lvds_setting_information
*plvds_setting_info, struct lvds_chip_information
*plvds_chip_info, struct IODATA io_data);
+int via_fb_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent);
+void via_fb_pci_remove(struct pci_dev *pdev);
+/* Temporary */
+int viafb_init(void);
+void viafb_exit(void);
#endif /* __VIAFBDEV_H__ */
OpenPOWER on IntegriCloud