Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright 2011 Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
0004  */
0005 /*
0006  * driver for Silicon Image SiI 164 PanelLink Transmitter
0007  */
0008 
0009 #include <linux/slab.h>
0010 #include "via_aux.h"
0011 
0012 
0013 static const char *name = "SiI 164 PanelLink Transmitter";
0014 
0015 
0016 static void probe(struct via_aux_bus *bus, u8 addr)
0017 {
0018     struct via_aux_drv drv = {
0019         .bus    =   bus,
0020         .addr   =   addr,
0021         .name   =   name};
0022     /* check vendor id and device id */
0023     const u8 id[] = {0x01, 0x00, 0x06, 0x00}, len = ARRAY_SIZE(id);
0024     u8 tmp[ARRAY_SIZE(id)];
0025 
0026     if (!via_aux_read(&drv, 0x00, tmp, len) || memcmp(id, tmp, len))
0027         return;
0028 
0029     printk(KERN_INFO "viafb: Found %s at address 0x%x\n", name, addr);
0030     via_aux_add(&drv);
0031 }
0032 
0033 void via_aux_sii164_probe(struct via_aux_bus *bus)
0034 {
0035     u8 i;
0036 
0037     for (i = 0x38; i <= 0x3F; i++)
0038         probe(bus, i);
0039 }