I mean you should follow the ifx6x60c driver struct . use tty driver as general out and input .
Dont' use sys_open . 2014-07-30 17:14 GMT+08:00 <nwk...@gmail.com>: > When I insmod ifx6x60.ko, its probe method isn't called either. Is there > anything else I have to do? > > Am Mittwoch, 30. Juli 2014 04:06:19 UTC+2 schrieb liyaoshi: >> >> Actually , I have write a driver based on iMX6 and V850 , implement via >> tty driver . >> >> And suggest you follow kernel driver ifx6x60.c >> >> Regards >> >> >> 2014-07-30 3:13 GMT+08:00 John Syn <john...@gmail.com>: >> >>> >>> From: <nwk...@gmail.com> >>> Reply-To: "beagl...@googlegroups.com" <beagl...@googlegroups.com> >>> >>> Date: Tuesday, July 29, 2014 at 7:33 AM >>> To: "beagl...@googlegroups.com" <beagl...@googlegroups.com> >>> >>> Subject: Re: [beagleboard] Using SPI in a kernel module >>> >>> Thanks, John. >>> >>> I Iooked at kernel/drivers/iio/dac/ad/5064.c >>> >>> There's the following struct which is passed to *spi_register_driver()*: >>> static struct spi_driver ad5064_spi_driver = { >>> .driver = { >>> .name = "ad5064", >>> .owner = THIS_MODULE, >>> }, >>> .probe = ad5064_spi_probe, >>> .remove = ad5064_spi_remove, >>> .id_table = ad5064_spi_ids, >>> }; >>> >>> I compiled the module and loaded it but the probe function never gets >>> called. Why? >>> >>> From this I can see that this driver isn’t DeviceTree enabled so I’m not >>> sure which SPI interface it is using. Either you can add the devicetree >>> support to this driver so that you can specify which SPI interface to use, >>> or e-mail the Linux-IIO mailing list and see how to use this driver. >>> >>> Regards, >>> John >>> >>> >>> >>> >>> Am Montag, 28. Juli 2014 18:09:34 UTC+2 schrieb john3909: >>>> >>>> >>>> From: Nils <nwk...@gmail.com> >>>> Reply-To: "beagl...@googlegroups.com" <beagl...@googlegroups.com> >>>> Date: Monday, July 28, 2014 at 7:00 AM >>>> To: "beagl...@googlegroups.com" <beagl...@googlegroups.com> >>>> Subject: [beagleboard] Using SPI in a kernel module >>>> >>>> Hello, >>>> >>>> I'm currently working on a kernel module which needs to communicate via >>>> SPI to an external microchip. >>>> >>>> I used the cape manager to enable SPI. The device is accessible through >>>> /dev/spidev1.0. >>>> But since it's a kernel module, I guess it's not recommended to access >>>> files via sys_open()? >>>> >>>> Another approach I found would be adding a struct to >>>> *arch/arm/mach-omap2/board-am335xevm.c >>>> *and then use *spi_register_driver()* in my kernel module. But in my >>>> kernel sources (3.8.13) this file doesn't exist. >>>> >>>> There is no board files since the introduction of device tree. >>>> >>>> >>>> >>>> What would be the right way to use SPI in my kernel module? >>>> >>>> Look at examples in /drivers/staging/iio or /drivers/iio >>>> >>>> There are plenty of examples of using SPI calls in a kernel module. >>>> >>>> Use the power of GIT to find what you are looking for. In the Kernel >>>> source do the following: >>>> >>>> git grep spi_sync_transfer >>>> >>>> Regards, >>>> John >>>> >>>> >>>> >>>> Regards, >>>> Nils >>>> >>>> -- >>>> For more options, visit http://beagleboard.org/discuss >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "BeagleBoard" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to beagleboard...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>>> -- >>> For more options, visit http://beagleboard.org/discuss >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "BeagleBoard" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to beagleboard...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >>> -- >>> For more options, visit http://beagleboard.org/discuss >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "BeagleBoard" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to beagleboard...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to beagleboard+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.