Hi again all,

So I finally managed to test the driver under Debian Squeeze kernel 
version 3.2.0-4-amd64.

With the patch files I attached before things got compiled and installed 
seemingly ok.

I now have a /dev/gpio0.

Unfortunately I can't run gpitest as I get a simple error message box 
saying:

"Unable to open GPIO device."

Any pointers would be really appreciated before the PCs end up through 
the nearest windows ;)

Regards,

Wayne Merricks
The Voice Asia

On 21/11/12 00:01, Wayne Merricks wrote:
> RE: [RDD] Rivendell GPIO with Kernel 3.2+
>
> Hi,
>
> I had a little bit of sleep deprived free time to look into this a bit 
> more.  Changes are required to configure, drv/gpio.h and drv/gpio.c
>
> I don't fully understand all of the ramifications of the changes I 
> made (not enough time to read all the google hits) but it does compile 
> which is a start. The changes made are likely incompatible with kernel 
> 2.6 and older due to name changes of functions.
>
> Here are the changes:
>
> ./configure -> Added an if for Kernel 3.2
>
> drv/gpio.h -> Changed:
>
> -#include <linux/autoconf.h>
> +#include <generated/autoconf.h>
>
> Autoconf had moved to generated as per a git commit in 2009:
>
> https://forums.virtualbox.org/viewtopic.php?f=7&p=173096 (was the 
> first useful result I could find relating to this)
>
> drv/gpio.c
>
> This one needed a few amendments first off, line 37:
>
> -spinlock_t gpio_spinlock=SPIN_LOCK_UNLOCKED;
> +spinlock_t gpio_spinlock;
>
> The SPIN_LOCK_UNLOCKED doesn't seem to exist anymore, I'm not sure 
> what ramifications not properly initialising this variable will have.  
> Fred/a C programmers input would be nice here.
>
> After a bit more Googling other people suggest using:
>
> DEFINE_SPINLOCK(gpio_spinlock);
>
> instead of the spinlock_t thing.  Both methods compile so I'm not sure 
> which to use.
>
> Line 403:
>
> -  ioctl:gpio_ioctl,
> +  unlocked_ioctl:gpio_ioctl,
>
> The old ioctl function has been reworked to make it happy about 
> multi-threaded ways of working.  As such ioctl doesn't really exist 
> anymore and has been directly replaced with unlocked_ioctl.
>
> http://stackoverflow.com/questions/5868908/using-ioctl-communication-between-kernel-mode-and-user-mode
>  
>
> http://unix.stackexchange.com/questions/4711/what-is-the-difference-between-ioctl-unlocked-ioctl-and-compat-ioctl
>  
>
>
> Several lines starting from 530:
>
> - while(((dev=pci_find_device(GPIO_CBOARDS_VENDOR_ID,
> + while(((dev=pci_get_device(GPIO_CBOARDS_VENDOR_ID,
>
> Simple function rename by the looks of it, finding and replacing all 
> the pci_find_device with pci_get_device gave me 4 hits.
>
> Couldn't find any good Google pages for this one except for a guy 
> saying, "replace pci_find_device with pci_get_device."
>
> http://forums.xilinx.com/t5/PCI-Express/Linux-Driver-for-xapp1022-and-xapp1052/td-p/104903
>  
>
>
> Hopefully (message size limit pending) I've attached the three patch 
> files with this email.
>
> Hope this helps, I'll be trying to test with real hardware sometime 
> tomorrow.
>
> -----Original Message-----
> From: [email protected] on behalf of Fred 
> Gleason
> Sent: Tue 20/11/2012 15:21
> To: User discussion about the Rivendell Radio Automation System
> Subject: Re: [RDD] Rivendell GPIO with Kernel 3.2+
>
> On Nov 19, 2012, at 20:34 32, Wayne Merricks wrote:
>
> > So heres the current error:
> >
> > In file included from /root/gpio-1.1.0/drv/gpio.c:30:0:
> > /root/gpio-1.1.0/drv/gpio.h:77:28: fatal error: linux/autoconf.h: No 
> such file or directory
> > compilation terminated.
>
> Lovely.  Sounds like it's time to load up a 3.2.x kernel and get it 
> sorted.  Perhaps a project for the long weekend...
>
> Cheers!
>
>
> |-------------------------------------------------------------------------| 
>
> | Frederick F. Gleason, Jr. |               Chief 
> Developer               |
> |                           | Paravel Systems               |
> |-------------------------------------------------------------------------| 
>
> |             Some changes are so slow, you don't notice 
> them.            |
> |             Others are so fast, they don't notice 
> you.                  |
> |                                          -- 
> Anonymous                   |
> |-------------------------------------------------------------------------| 
>
>
> _______________________________________________
> Rivendell-dev mailing list
> [email protected]
> http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev
>
>
>
>
> Scanned by*MailMarshal*
>
>
>
>
> *Attention:*
> The information contained in this message is confidential and intended 
> for the addressee(s) only. If you have received this message in error 
> or there are any problems, please notify the originator immediately. The
>
> unauthorised use, disclosure, copying or alteration of this message is 
> strictly forbidden. Christian Vision or any of its subsidiaries will 
> not be liable for direct, special, indirect or consequential damages 
> arising from alteration of the contents of this message by a third 
> party or as a result of any virus being passed on. Please note that we 
> reserve the right to monitor and read any e-mails sent or received by 
> the company under the Telecommunications (Lawful Business Practice) 
> (Interception of Communications) Regulation 2000. Christian Vision is 
> registered in England as a limited company 2842414 and as a charity 
> 1031031
>
> *t*
>


#######################
Scanned by MailMarshal
#######################

############

Attention: 

The information contained in this message is confidential and intended 
for the addressee(s) only. If you have received this message in error 
or there are any problems, please notify the originator immediately.
The unauthorised use, disclosure, copying or alteration of this message
is strictly forbidden. Christian Vision or any of its subsidiaries will
not be liable for direct, special, indirect or consequential damages 
arising from alteration of the contents of this message by a third party
or as a result of any virus being passed on. Please note that we reserve
the right to monitor and read any e-mails sent or received by the 
company under the Telecommunications (Lawful Business Practice) 
(Interception of Communications) Regulation 2000. Christian Vision is 
registered in England as a limited company 2842414 and as a charity 
1031031  

############
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev

Reply via email to