* [parisc-linux] Patch to enable IrDA :-)
@ 2002-05-01 0:08 ` Jochen Friedrich
2002-05-01 0:43 ` Alan Cox
2002-06-02 17:06 ` Grant Grundler
0 siblings, 2 replies; 4+ messages in thread
From: Jochen Friedrich @ 2002-05-01 0:08 UTC (permalink / raw)
To: HP900 PARISC mailing list
Hi,
this tiny patch enables the usage of IrDA dongles on the PA-RISC :-)
# cvs diff -u drivers/net/irda/irtty.c arch/parisc/config.in
Index: drivers/net/irda/irtty.c
===================================================================
RCS file: /var/cvs/linux/drivers/net/irda/irtty.c,v
retrieving revision 1.8
diff -u -r1.8 irtty.c
--- drivers/net/irda/irtty.c 2001/11/09 23:36:06 1.8
+++ drivers/net/irda/irtty.c 2002/05/01 00:07:28
@@ -26,6 +26,7 @@
#include <linux/module.h>
#include <linux/kernel.h>
+#include <linux/config.h>
#include <linux/tty.h>
#include <linux/init.h>
#include <linux/skbuff.h>
@@ -767,6 +768,9 @@
#ifdef TIOCM_OUT2 /* Not defined for ARM */
arg = TIOCM_OUT2;
+#endif
+#ifdef CONFIG_PARISC /* PA-RISC uses OUT1 as hardware flow control bit
*/
+ arg |= TIOCM_OUT1;
#endif
if (rts)
arg |= TIOCM_RTS;
Index: arch/parisc/config.in
===================================================================
RCS file: /var/cvs/linux/arch/parisc/config.in,v
retrieving revision 1.39
diff -u -r1.39 config.in
--- arch/parisc/config.in 2001/11/08 21:17:52 1.39
+++ arch/parisc/config.in 2002/05/01 00:07:28
@@ -153,6 +153,8 @@
source fs/Config.in
+source net/irda/Config.in
+
if [ "$CONFIG_VT" = "y" ]; then
mainmenu_option next_comment
comment 'Console drivers'
Cheers,
--jochen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [parisc-linux] Patch to enable IrDA :-)
2002-05-01 0:08 ` [parisc-linux] Patch to enable IrDA :-) Jochen Friedrich
@ 2002-05-01 0:43 ` Alan Cox
2002-07-07 6:33 ` Grant Grundler
2002-06-02 17:06 ` Grant Grundler
1 sibling, 1 reply; 4+ messages in thread
From: Alan Cox @ 2002-05-01 0:43 UTC (permalink / raw)
To: Jochen Friedrich; +Cc: HP900 PARISC mailing list
> #ifdef TIOCM_OUT2 /* Not defined for ARM */
> arg = TIOCM_OUT2;
> +#endif
> +#ifdef CONFIG_PARISC /* PA-RISC uses OUT1 as hardware flow control bit
> */
> + arg |= TIOCM_OUT1;
> #endif
With these ifdefs for ARM and parisc maybe
arg = IRDA_MODEM_BITS;
and sticking tha tin the header would be good ?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [parisc-linux] Patch to enable IrDA :-)
2002-05-01 0:08 ` [parisc-linux] Patch to enable IrDA :-) Jochen Friedrich
2002-05-01 0:43 ` Alan Cox
@ 2002-06-02 17:06 ` Grant Grundler
1 sibling, 0 replies; 4+ messages in thread
From: Grant Grundler @ 2002-06-02 17:06 UTC (permalink / raw)
To: HP900 PARISC mailing list
Jochen Friedrich wrote:
> Hi,
>
> this tiny patch enables the usage of IrDA dongles on the PA-RISC :-)
No one has committed this yet since Alan Cox suggested:
| With these ifdefs for ARM and parisc maybe
|
| arg = IRDA_MODEM_BITS;
|
| and sticking that in the header would be good ?
I took a quick look.
> #ifdef TIOCM_OUT2 /* Not defined for ARM */
> arg = TIOCM_OUT2;
> +#endif
This comment is wrong:
include/asm-arm/termios.h:#define TIOCM_OUT2 0x4000
Seems every arch defines this now in include/asm-*/termios.h.
> +#ifdef CONFIG_PARISC /* PA-RISC uses OUT1 as hardware flow control bit
> */
> + arg |= TIOCM_OUT1;
> #endif
I'v re-hacked this along the lines that Alan suggested.
But given the comment was wrong, thoughts?
I'm not able to test this.
Someone else will have to test and commit.
grant
Index: include/asm-i386/termios.h
===================================================================
RCS file: /var/cvs/linux/include/asm-i386/termios.h,v
retrieving revision 1.3
diff -u -p -r1.3 termios.h
--- include/asm-i386/termios.h 2001/07/05 21:38:41 1.3
+++ include/asm-i386/termios.h 2002/06/02 17:05:03
@@ -37,6 +37,8 @@ struct termio {
#define TIOCM_OUT2 0x4000
#define TIOCM_LOOP 0x8000
+#define TIOCM_MODEM_BITS TIOCM_OUT2 /* IRDA support */
+
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
/* line disciplines */
Index: include/asm-parisc/termios.h
===================================================================
RCS file: /var/cvs/linux/include/asm-parisc/termios.h,v
retrieving revision 1.6
diff -u -p -r1.6 termios.h
--- include/asm-parisc/termios.h 2001/07/11 17:20:32 1.6
+++ include/asm-parisc/termios.h 2002/06/02 17:05:03
@@ -37,6 +37,9 @@ struct termio {
#define TIOCM_OUT2 0x4000
#define TIOCM_LOOP 0x8000
+/* IRDA support - PA-RISC uses OUT1 as hardware flow control bit. */
+#define TIOCM_MODEM_BITS (TIOCM_OUT2 | TIOCM_OUT1)
+
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
/* line disciplines */
Index: arch/parisc/config.in
===================================================================
RCS file: /var/cvs/linux/arch/parisc/config.in,v
retrieving revision 1.39
diff -u -p -r1.39 config.in
--- arch/parisc/config.in 2001/11/08 21:17:52 1.39
+++ arch/parisc/config.in 2002/06/02 17:05:03
@@ -128,6 +128,8 @@ if [ "$CONFIG_SCSI" != "n" ]; then
fi
endmenu
+source net/irda/Config.in
+
if [ "$CONFIG_NET" = "y" ]; then
mainmenu_option next_comment
comment 'Network device support'
Index: drivers/net/irda/irtty.c
===================================================================
RCS file: /var/cvs/linux/drivers/net/irda/irtty.c,v
retrieving revision 1.8
diff -u -p -r1.8 irtty.c
--- drivers/net/irda/irtty.c 2001/11/09 23:36:06 1.8
+++ drivers/net/irda/irtty.c 2002/06/02 17:05:03
@@ -760,14 +760,11 @@ static int irtty_set_dtr_rts(struct net_
struct irtty_cb *self;
struct tty_struct *tty;
mm_segment_t fs;
- int arg = 0;
+ int arg = TIOCM_MODEM_BITS;
self = (struct irtty_cb *) dev->priv;
tty = self->tty;
-#ifdef TIOCM_OUT2 /* Not defined for ARM */
- arg = TIOCM_OUT2;
-#endif
if (rts)
arg |= TIOCM_RTS;
if (dtr)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [parisc-linux] Patch to enable IrDA :-)
2002-05-01 0:43 ` Alan Cox
@ 2002-07-07 6:33 ` Grant Grundler
0 siblings, 0 replies; 4+ messages in thread
From: Grant Grundler @ 2002-07-07 6:33 UTC (permalink / raw)
To: Alan Cox; +Cc: Jochen Friedrich, HP900 PARISC mailing list
Alan Cox wrote:
> With these ifdefs for ARM and parisc maybe
>
> arg = IRDA_MODEM_BITS;
>
> and sticking tha tin the header would be good ?
A few monthes later...here's a patch that does this for i386 and parisc.
Should I commit this to the parisc-linux CVS?
(also available as ftp://ftp.parisc-linux.org/patches/diff.irtty_bits)
grant
Index: drivers/net/irda/irtty.c
===================================================================
RCS file: /var/cvs/linux/drivers/net/irda/irtty.c,v
retrieving revision 1.8
diff -u -p -r1.8 irtty.c
--- drivers/net/irda/irtty.c 2001/11/09 23:36:06 1.8
+++ drivers/net/irda/irtty.c 2002/07/07 06:30:36
@@ -760,14 +760,11 @@ static int irtty_set_dtr_rts(struct net_
struct irtty_cb *self;
struct tty_struct *tty;
mm_segment_t fs;
- int arg = 0;
+ int arg = TIOCM_MODEM_BITS;
self = (struct irtty_cb *) dev->priv;
tty = self->tty;
-#ifdef TIOCM_OUT2 /* Not defined for ARM */
- arg = TIOCM_OUT2;
-#endif
if (rts)
arg |= TIOCM_RTS;
if (dtr)
Index: include/asm-i386/termios.h
===================================================================
RCS file: /var/cvs/linux/include/asm-i386/termios.h,v
retrieving revision 1.3
diff -u -p -r1.3 termios.h
--- include/asm-i386/termios.h 2001/07/05 21:38:41 1.3
+++ include/asm-i386/termios.h 2002/07/07 06:30:36
@@ -37,6 +37,8 @@ struct termio {
#define TIOCM_OUT2 0x4000
#define TIOCM_LOOP 0x8000
+#define TIOCM_MODEM_BITS TIOCM_OUT2 /* IRDA support */
+
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
/* line disciplines */
Index: include/asm-parisc/termios.h
===================================================================
RCS file: /var/cvs/linux/include/asm-parisc/termios.h,v
retrieving revision 1.6
diff -u -p -r1.6 termios.h
--- include/asm-parisc/termios.h 2001/07/11 17:20:32 1.6
+++ include/asm-parisc/termios.h 2002/07/07 06:30:36
@@ -37,6 +37,9 @@ struct termio {
#define TIOCM_OUT2 0x4000
#define TIOCM_LOOP 0x8000
+/* IRDA support - PA-RISC uses OUT1 as hardware flow control bit. */
+#define TIOCM_MODEM_BITS (TIOCM_OUT2 | TIOCM_OUT1)
+
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
/* line disciplines */
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-07-07 6:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <jochen@scram.de>
2002-05-01 0:08 ` [parisc-linux] Patch to enable IrDA :-) Jochen Friedrich
2002-05-01 0:43 ` Alan Cox
2002-07-07 6:33 ` Grant Grundler
2002-06-02 17:06 ` Grant Grundler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox