From: Juan J. G. de S. L. <ska...@gm...> - 2009-08-29 07:59:56
|
Hi :-) El 29 de agosto de 2009 00:24, Tony Bones <aar...@gm...> escribió: > I def have the chip, I'm using the same mobo as the author of the driver, a > DG45FC. I do have WEC1022 under lshal > > pnp.id = 'WEC1022' (string) >> > Nice :-) So I got the 2 patches to compile with 2.6.30.5. And the module loads > without error from the command line, but gives this in dmesg: > > Winbond CIR 00:04: disabled >> Winbond CIR: probe of 00:04 failed with error -12 >> > > what's weird is if I unload it and load it again I get: > > Winbond CIR 00:04: activated >> Winbond CIR 00:04: disabled >> Winbond CIR: probe of 00:04 failed with error -12 >> > After looking a little bit at the patch, -12 is a -ENODEV return code (as per include/asm-generic/errno-base.h). And if it's in the probe callback for PNP, you should look at the wbcir_probe() function in the winbond-cir.c file of the patch. There are several instances there where it can return -ENODEV. Several of them should print an error message to the dmesg output ("Invalid resources"), which doesn't seem to happen. There's several dev_dbg() calls in there that probably are disabled. In order to get that debug output in dmesg, just include a line like #define DEBUG 1 as the very first line in the winbond-cir.c file, and recompile. See the following two references: http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-06/msg12325.html http://mail.nl.linux.org/kernelnewbies/2006-05/msg00549.html You could also include more debug messages just before the cases that return -ENOMEM without printing anything iin wbcir_probe(). After that you'll have more information about what's actually happening. But I still don't have anything actually plugged into the CIR port on the > mobo yet (it is enabled in bios though). I have it all wired on a > breadboard, just haven't had the time to hook it up and test it. Have > looked through the code for that error but haven't found anything in the > module itself, might be a pnp error code, haven't made it that far. > > # modinfo winbond-cir >> filename: >> /lib/modules/2.6.30-gentoo-r5/kernel/drivers/input/misc/winbond-cir.ko >> license: GPL >> description: Winbond SuperI/O Consumer IR Driver >> author: David Härdeman <da...@ha...> >> alias: acpi*:WEC1022:* >> alias: pnp:dWEC1022* >> depends: led-class >> vermagic: 2.6.30-gentoo-r5 SMP preempt mod_unload >> parm: protocol:IR protocol to use (0 = RC5, 1 = NEC, 2 = RC6A, >> default) (uint) >> parm: invert:Invert the signal from the IR receiver (bool) >> parm: wake_sc:Scancode of the power-on IR command (uint) >> parm: wake_rc6mode:RC6 mode for the power-on command (0 = 0, 6 = >> 6A, default) (uint) >> > > Wondering if I can set my own scancode for the power-on command using one > of the wake_* params. The code seems to be prepared to do so... > Would be nice since I don't have MCE remote. I do have a > universal/learning remote, so I could set it to whatever works. Currently > using codes for the Pioneer VXX2910 DVR, just happened to be a preset in my > remote. I just don't know much about IR technology/protocols. Whats this > RC6 stuff? Just look at http://www.sbprojects.com/knowledge/ir/ir.htm Apart from RAW_CODES (lirc just tries to match pre-recorded space-pulse patterns), lirc supports at least RC6, RC5, SHIFT_ENC, SPACE_ENC modes in which the pulse patterns are translated to actual bits depending on protocol rules. The patch you're looking at doesn't use lirc, but uses its own in-driver decoding for RC5, RC6 and NEC (a variant of SPACE_ENC) protocols. The keys in the default keymap for RC6 mode match the ones I have in the MCE remote that came with my laptop (you can find it in acer/Aspire6530G_input.lircd.conf in the latest lirc distribution), taking into account that lirc actually stores ones and zeros reversed (negated) in the config files. After setting a mode for the driver with the protocol module parameter you should be able to specify the wakeup protocol-specific scan-code in the wake_sc parameter, and to put any desired scancode -> key mapping into the driver by using the input-kbd command of the inpututils package (though I haven't tried it myself). > lirc.conf (partial) > >> # contributed by Maluta >> # >> # brand: Pioneer >> # model: DVR-520 >> # tested with: PIONEER VIDEORECORDER >> >> begin remote >> >> name Pioneer_VXX2910 >> flags CONST_LENGTH|RAW_CODES >> eps 30 >> aeps 140 >> >> ptrail 0 >> repeat 0 0 >> gap 179619 >> >> begin raw_codes >> >> name power >> 8570 4189 586 1547 586 1547 >> 586 467 586 1547 586 467 >> 586 1547 586 467 586 1547 >> 586 467 586 467 586 1547 >> 586 467 586 1547 586 467 >> 586 1547 586 467 586 467 >> 586 467 586 1547 586 1547 >> 586 467 586 1547 586 467 >> 586 467 586 1547 586 1547 >> 586 467 586 467 586 1547 >> 586 467 586 1547 586 1547 >> 586 25485 8570 4189 586 1547 >> 586 1547 586 1547 586 1547 >> 586 467 586 1547 586 467 >> 586 1547 586 467 586 467 >> 586 467 586 467 586 1547 >> 586 467 586 1547 586 467 >> 586 467 586 467 586 1547 >> 586 1547 586 1547 586 1547 >> 586 467 586 1547 586 1547 >> 586 1547 586 467 586 467 >> 586 467 586 467 586 1547 >> 586 467 586 > > This remote definition uses a SPACE_ENC protocol variant. After pasting this excerpt into a file and using irrecord -a to analyze it: skandalfo@rimmer:~$ irrecord -a remote.conf # # this config file was automatically generated # using lirc-0.8.6-CVS(emulation) on Sat Aug 29 09:27:10 2009 # # contributed by # # brand: Pioneer_VXX2910 # model no. of remote control: # devices being controlled by this remote: # begin remote name Pioneer_VXX2910 bits 32 flags SPACE_ENC|CONST_LENGTH eps 30 aeps 140 header 8570 4189 one 586 1547 zero 586 467 ptrail 586 gap 89808 toggle_bit_mask 0x0 begin codes power 0xD52A34CB 0xF50A3DC2 end codes end remote Of course, the first step is knowing whether the driver is loading properly or not, and why it's not loading, if it isn't loading... Best regards, and good luck, Juan Jesus. -- Dream small if success is enough for you; dream big if you need to change the world. |