Commit Graph

32 Commits

Author SHA1 Message Date
Rasmus Villemoes 70f54841a4 tty/module.c: fix prototype of ec_tty_write for >= 6.6
Upstream commit 95713967ba523 changed the prototype of tty_operations::write.
2024-01-05 22:08:21 +01:00
Rasmus Villemoes d39b4a59ec tty/module.c: include proper header for INIT_C_CC definition
In upstream commit c9874d3ffeaf (termios: start unifying non-UAPI
parts of asm/termios.h), the INIT_C_CC definition was moved to a new
header, termios_internal.h. So we must include that header to get that
macro, but conditionally, since the header does not exist in older
kernels.
2023-05-25 14:35:04 +02:00
Rasmus Villemoes bbb16b872b tty/module.c: adapt signature of ->set_termios method to v6.1
Upstream changed ->set_termios to take a const struct ktermios in
commit a8c11c1520347 (tty: Make ->set_termios() old ktermios const).
2023-05-25 14:34:59 +02:00
Per Noergaard Christensen 96a045e36e tty: fixups for kernels 5.14 and 5.15
alloc_tty_driver was deprecated by tty_alloc_driver in commit 7f0bc6a68ed9
(TTY: pass flags to alloc_tty_driver) in 2012 but first in kernel
v5.15 it has been dropped (56ec5880a28e). Switch to tty_alloc_driver
when using kernels >= v5.15

As of v5.15, the put_tty_driver alias has been dropped in favor of
directly calling tty_driver_kref_put (9f90a4ddef4e).  Switch to
tty_driver_kref_put when using kernels >= v5.15

As from v5.14 the write_room (03b3b1a2405c) and
chars_in_buffer (fff4ef17a940) methods' return type changed from int
to unsigned int in struct tty_operations. This has impact on
ec_tty_write_room() and ec_tty_chars_in_buffer().
2022-08-30 13:57:23 +02:00
Kale Yuzik 2b39a6321b Implement fix for kernel error when opening TTY device file on kernel 3.7.0 or greater
Error message: "tty_init_dev: ttyEC driver does not set tty->port. This would crash the kernel. Fix the driver!"
2021-08-24 17:37:21 +02:00
Florian Pose 4b12489286 Added kernel-specific handling for init_timer/setup_timer and
access_ok() for ec_tty module and example.
Closes #2.
2021-08-24 17:18:59 +02:00
Florian Pose 8ab3c676cd Support changed tty_prepare_flip_string() interface from kernel 3.9. 2016-10-18 10:20:21 +02:00
Florian Pose 99418519bd Reverted default branch to stable-1.5. 2014-11-03 15:20:05 +01:00
Florian Pose 605d25eec9 Replaced all mangled hg keywords. 2012-09-06 14:17:21 +02:00
Florian Pose c80bfce530 Removed whitespace. 2012-07-13 10:42:31 +02:00
Martin Troxler c059ec6f49 use rt_mutex instead of semaphore for mutual exclusion (use --enable-mutex) 2011-01-05 08:36:53 +01:00
Florian Pose f739694670 Improved compiling on 2.6.34 (thanks to Malcolm Lewis). 2010-10-25 16:45:33 +02:00
Florian Pose aba214160a Removed TIOCSSERIAL because it doesn't make sense for virtual tty interfaces. 2010-04-20 11:21:43 +02:00
Florian Pose 94485eeec1 Replaced deprecated init_MUTEX in tty code. 2010-02-16 11:16:05 +01:00
Florian Pose 1b1f62c0af Allow multiple open() calls to tty devices. 2010-02-02 14:10:52 +01:00
Florian Pose f42953a87a Minor change. 2010-01-26 16:43:08 +01:00
Florian Pose c6bf2d73fc Pass initial cflag to device-specific implementation in constructor. 2010-01-25 18:32:45 +01:00
Florian Pose d910657cf8 Callback set via own structure. 2010-01-25 17:42:07 +01:00
Florian Pose 4d00c17e05 Sorted methods. 2010-01-25 16:15:56 +01:00
Florian Pose 018507a22e Implemented setting of baud rate, data frame and RTS/CTS. 2010-01-22 14:10:18 +01:00
Florian Pose 127ad90aa7 Request initial configuration on tty open. 2010-01-22 11:02:04 +01:00
Florian Pose a98da94149 Passing tty cflag to serial implementation. 2010-01-21 17:53:40 +01:00
Florian Pose f6c0de7723 Basic configuration for tty. 2010-01-21 16:41:41 +01:00
Florian Pose 386ba8b8ee Implemented tty put_char and break_ctl callbacks for kernels newer than 2.6.26
or 2.6.27, respectively.
2010-01-08 10:34:29 +01:00
Florian Pose 06bad71e6b Implemented reading direction of tty driver. 2009-12-09 12:42:28 +01:00
Florian Pose 6dbc77cd62 Send direction works! 2009-12-02 15:38:10 +01:00
Florian Pose e2279c8715 Removed semaphore header. 2009-12-01 22:19:13 +01:00
Florian Pose efb02691c1 TTY open and close. 2009-12-01 22:16:50 +01:00
Florian Pose e5bcaeefcd Use own PFX for printk. 2009-12-01 22:03:50 +01:00
Florian Pose 866c82a4a8 Interface management. 2009-12-01 21:45:45 +01:00
Florian Pose fdad28ad05 Register a TTY driver with one device. 2009-12-01 17:35:33 +01:00
Florian Pose 40943a197d Base files for new TTY driver. 2009-11-30 18:02:29 +01:00