via_aux_ch7301.c 668 B

1234567891011121314151617181920212223242526272829303132333435
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Copyright 2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
  4. */
  5. /*
  6. * driver for Chrontel CH7301 DVI Transmitter
  7. */
  8. #include <linux/slab.h>
  9. #include "via_aux.h"
  10. static const char *name = "CH7301 DVI Transmitter";
  11. static void probe(struct via_aux_bus *bus, u8 addr)
  12. {
  13. struct via_aux_drv drv = {
  14. .bus = bus,
  15. .addr = addr,
  16. .name = name};
  17. u8 tmp;
  18. if (!via_aux_read(&drv, 0x4B, &tmp, 1) || tmp != 0x17)
  19. return;
  20. printk(KERN_INFO "viafb: Found %s at address 0x%x\n", name, addr);
  21. via_aux_add(&drv);
  22. }
  23. void via_aux_ch7301_probe(struct via_aux_bus *bus)
  24. {
  25. probe(bus, 0x75);
  26. probe(bus, 0x76);
  27. }