via_aux_vt1625.c 663 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 VIA VT1625(M) HDTV Encoder
  7. */
  8. #include <linux/slab.h>
  9. #include "via_aux.h"
  10. static const char *name = "VT1625(M) HDTV Encoder";
  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, 0x1B, &tmp, 1) || tmp != 0x50)
  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_vt1625_probe(struct via_aux_bus *bus)
  24. {
  25. probe(bus, 0x20);
  26. probe(bus, 0x21);
  27. }