Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efb8d21b authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (79 commits)
  TTY: serial_core: Fix crash if DCD drop during suspend
  tty/serial: atmel_serial: bootconsole removed from auto-enumerates
  Revert "TTY: call tty_driver_lookup_tty unconditionally"
  tty/serial: atmel_serial: add device tree support
  tty/serial: atmel_serial: auto-enumerate ports
  tty/serial: atmel_serial: whitespace and braces modifications
  tty/serial: atmel_serial: change platform_data variable name
  tty/serial: RS485 bindings for device tree
  TTY: call tty_driver_lookup_tty unconditionally
  TTY: pty, release tty in all ptmx_open fail paths
  TTY: make tty_add_file non-failing
  TTY: drop driver reference in tty_open fail path
  8250_pci: Fix kernel panic when pch_uart is disabled
  h8300: drivers/serial/Kconfig was moved
  parport_pc: release IO region properly if unsupported ITE887x card is found
  tty: Support compat_ioctl get/set termios_locked
  hvc_console: display printk messages on console.
  TTY: snyclinkmp: forever loop in tx_load_dma_buffer()
  tty/n_gsm: avoid fifo overflow in gsm_dlci_data_output
  tty/n_gsm: fix a bug in gsm_dlci_data_output (adaption = 2 case)
  ...

Fix up Conflicts in:
 - drivers/tty/serial/8250_pci.c
	Trivial conflict with removed duplicate device ID
 - drivers/tty/serial/atmel_serial.c
	Annoying silly conflict between "specify the port num via
	platform_data" and other changes to atmel_console_init
parents 3cb60328 d208a3bf
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
* RS485 serial communications

The RTS signal is capable of automatically controlling line direction for
the built-in half-duplex mode.
The properties described hereafter shall be given to a half-duplex capable
UART node.

Required properties:
- rs485-rts-delay: prop-encoded-array <a b> where:
  * a is the delay beteween rts signal and beginning of data sent in milliseconds.
      it corresponds to the delay before sending data.
  * b is the delay between end of data sent and rts signal in milliseconds
      it corresponds to the delay after sending data and actual release of the line.

Optional properties:
- linux,rs485-enabled-at-boot-time: empty property telling to enable the rs485
  feature at boot time. It can be disabled later with proper ioctl.
- rs485-rx-during-tx: empty property that enables the receiving of data even
  whilst sending data.

RS485 example for Atmel USART:
	usart0: serial@fff8c000 {
		compatible = "atmel,at91sam9260-usart";
		reg = <0xfff8c000 0x4000>;
		interrupts = <7>;
		atmel,use-dma-rx;
		atmel,use-dma-tx;
		linux,rs485-enabled-at-boot-time;
		rs485-rts-delay = <0 200>;		// in milliseconds
	};
+27 −0
Original line number Diff line number Diff line
* Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)

Required properties:
- compatible: Should be "atmel,<chip>-usart"
  The compatible <chip> indicated will be the first SoC to support an
  additional mode or an USART new feature.
- reg: Should contain registers location and length
- interrupts: Should contain interrupt

Optional properties:
- atmel,use-dma-rx: use of PDC or DMA for receiving data
- atmel,use-dma-tx: use of PDC or DMA for transmitting data

<chip> compatible description:
- at91rm9200:  legacy USART support
- at91sam9260: generic USART implementation for SAM9 SoCs

Example:

	usart0: serial@fff8c000 {
		compatible = "atmel,at91sam9260-usart";
		reg = <0xfff8c000 0x4000>;
		interrupts = <7>;
		atmel,use-dma-rx;
		atmel,use-dma-tx;
	};
+25 −0
Original line number Diff line number Diff line
* Synopsys DesignWare ABP UART

Required properties:
- compatible : "snps,dw-apb-uart"
- reg : offset and length of the register set for the device.
- interrupts : should contain uart interrupt.
- clock-frequency : the input clock frequency for the UART.

Optional properties:
- reg-shift : quantity to shift the register offsets by.  If this property is
  not present then the register offsets are not shifted.
- reg-io-width : the size (in bytes) of the IO accesses that should be
  performed on the device.  If this property is not present then single byte
  accesses are used.

Example:

	uart@80230000 {
		compatible = "snps,dw-apb-uart";
		reg = <0x80230000 0x100>;
		clock-frequency = <3686400>;
		interrupts = <10>;
		reg-shift = <2>;
		reg-io-width = <4>;
	};
+8 −0
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@
   RS485 communications. This data structure is used to set and configure RS485
   parameters in the platform data and in ioctls.

   The device tree can also provide RS485 boot time parameters (see [2]
   for bindings). The driver is in charge of filling this data structure from
   the values given by the device tree.

   Any driver for devices capable of working both as RS232 and RS485 should
   provide at least the following ioctls:

@@ -104,6 +108,9 @@
	rs485conf.flags |= SER_RS485_RTS_AFTER_SEND;
	rs485conf.delay_rts_after_send = ...;

	/* Set this flag if you want to receive data even whilst sending data */
	rs485conf.flags |= SER_RS485_RX_DURING_TX;

	if (ioctl (fd, TIOCSRS485, &rs485conf) < 0) {
		/* Error handling. See errno. */
	}
@@ -118,3 +125,4 @@
5. REFERENCES

 [1]	include/linux/serial.h
 [2]	Documentation/devicetree/bindings/serial/rs485.txt
+0 −1
Original line number Diff line number Diff line
@@ -727,7 +727,6 @@ config ARCH_S3C64XX
	select ARCH_REQUIRE_GPIOLIB
	select SAMSUNG_CLKSRC
	select SAMSUNG_IRQ_VIC_TIMER
	select SAMSUNG_IRQ_UART
	select S3C_GPIO_TRACK
	select S3C_GPIO_PULL_UPDOWN
	select S3C_GPIO_CFG_S3C24XX
Loading