-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Mar 23, 2007 at 10:34:05PM +0800, WANG Zhen wrote: > I am trying to write a device driver for two MAX3085Es (a kind of > half-duplex RS-485 transceiver, more product info can be found at > http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2338) which are > connected to S3C2410's UART1 (TXD1 & RXD1), EINT6 (External INTerrupt) > and UART2 (TXD2 & RXD2), EINT7 respectively. I fail to see how the 3085 can be used to generate an IRQ. It has only 6 pins, two are for GND and VCC, 2 for the UART side, 2 for the line side, and 2 control inputs. The chip is a *tranceiver*, it only translates between two different electrical domains. You're supposed to hook it up to an UART and it will translate UART electrical signals into RS485 line signals and vice versa (might require some extra components, though, check the data sheet). > According to the schematic, my intention is: > when there is data arrives on the RS-485 serial line, an external > interrupt (EINT6 or EINT7) would be triggered, and an user space > application (process) would be informed by the interrupt service > routine, and then the application could access the data using a > specific device node under /dev (for example, /dev/max3085e). Like I said, there is no way the 3085 can generate an interrupt, so this approach is useless. You somehow have to hook up the 3085 to the UART (this might need some extra circuits) and treat the whole thing as a normal serial port. > So my questions are as follows: > 1) How to write a device driver for MAX3085E according to my scenario? Use the already available serial driver. > 2) Further, how could the application be informed by interrupt service > routine? Like any other device: userland blocks on read or write on the device, ISR takes data from the device and wakes up userland. Erik - -- They're all fools. Don't worry. Darwin may be slow, but he'll eventually get them. -- Matthew Lammers in alt.sysadmin.recovery -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGA+19/PlVHJtIto0RAnKpAJwItkTICoGkSC3ZFcu1Rz4lrRlYcgCeIDdX ajIPiFr488oJ6SGYdCYXY0E= =98Tz -----END PGP SIGNATURE----- -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ