poulsbo.c 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /*
  2. * Intel Poulsbo Stub driver
  3. *
  4. * Copyright (C) 2010 Novell <jlee@novell.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published by
  8. * the Free Software Foundation.
  9. *
  10. */
  11. #include <linux/module.h>
  12. #include <linux/pci.h>
  13. #include <linux/acpi.h>
  14. #include <acpi/video.h>
  15. #define DRIVER_NAME "poulsbo"
  16. enum {
  17. CHIP_PSB_8108 = 0,
  18. CHIP_PSB_8109 = 1,
  19. };
  20. static DEFINE_PCI_DEVICE_TABLE(pciidlist) = {
  21. {0x8086, 0x8108, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PSB_8108}, \
  22. {0x8086, 0x8109, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PSB_8109}, \
  23. {0, 0, 0}
  24. };
  25. static int poulsbo_probe(struct pci_dev *pdev, const struct pci_device_id *id)
  26. {
  27. return acpi_video_register();
  28. }
  29. static void poulsbo_remove(struct pci_dev *pdev)
  30. {
  31. acpi_video_unregister();
  32. }
  33. static struct pci_driver poulsbo_driver = {
  34. .name = DRIVER_NAME,
  35. .id_table = pciidlist,
  36. .probe = poulsbo_probe,
  37. .remove = poulsbo_remove,
  38. };
  39. static int __init poulsbo_init(void)
  40. {
  41. return pci_register_driver(&poulsbo_driver);
  42. }
  43. static void __exit poulsbo_exit(void)
  44. {
  45. pci_unregister_driver(&poulsbo_driver);
  46. }
  47. module_init(poulsbo_init);
  48. module_exit(poulsbo_exit);
  49. MODULE_AUTHOR("Lee, Chun-Yi <jlee@novell.com>");
  50. MODULE_DESCRIPTION("Poulsbo Stub Driver");
  51. MODULE_LICENSE("GPL");
  52. MODULE_DEVICE_TABLE(pci, pciidlist);