/**
* struct xuartps - device data
- * @port Pointer to the UART port
- * @refclk Reference clock
- * @aperclk APB clock
- * @baud Current baud rate
- * @clk_rate_change_nb Notifier block for clock changes
+ * @port: Pointer to the UART port
+ * @refclk: Reference clock
+ * @aperclk: APB clock
+ * @baud: Current baud rate
+ * @clk_rate_change_nb: Notifier block for clock changes
*/
struct xuartps {
struct uart_port *port;
* @irq: Irq number
* @dev_id: Id of the port
*
- * Returns IRQHANDLED
- **/
+ * Return: IRQHANDLED
+ */
static irqreturn_t xuartps_isr(int irq, void *dev_id)
{
struct uart_port *port = (struct uart_port *)dev_id;
* @rbdiv: BDIV value (return value)
* @rcd: CD value (return value)
* @div8: Value for clk_sel bit in mod (return value)
- * Returns baud rate, requested baud when possible, or actual baud when there
+ * Return: baud rate, requested baud when possible, or actual baud when there
* was too much error, zero if no valid divisors are found.
*
* Formula to obtain baud rate is
* xuartps_set_baud_rate - Calculate and set the baud rate
* @port: Handle to the uart port structure
* @baud: Baud rate to set
- * Returns baud rate, requested baud when possible, or actual baud when there
+ * Return: baud rate, requested baud when possible, or actual baud when there
* was too much error, zero if no valid divisors are found.
*/
static unsigned int xuartps_set_baud_rate(struct uart_port *port,
* @nb: Notifier block
* @event: Notify event
* @data: Notifier data
- * Returns NOTIFY_OK on success, NOTIFY_BAD on error.
+ * Return: NOTIFY_OK on success, NOTIFY_BAD on error.
*/
static int xuartps_clk_notifier_cb(struct notifier_block *nb,
unsigned long event, void *data)
/**
* xuartps_start_tx - Start transmitting bytes
* @port: Handle to the uart port structure
- *
- **/
+ */
static void xuartps_start_tx(struct uart_port *port)
{
unsigned int status, numbytes = port->fifosize;
/**
* xuartps_stop_tx - Stop TX
* @port: Handle to the uart port structure
- *
- **/
+ */
static void xuartps_stop_tx(struct uart_port *port)
{
unsigned int regval;
/**
* xuartps_stop_rx - Stop RX
* @port: Handle to the uart port structure
- *
- **/
+ */
static void xuartps_stop_rx(struct uart_port *port)
{
unsigned int regval;
* xuartps_tx_empty - Check whether TX is empty
* @port: Handle to the uart port structure
*
- * Returns TIOCSER_TEMT on success, 0 otherwise
- **/
+ * Return: TIOCSER_TEMT on success, 0 otherwise
+ */
static unsigned int xuartps_tx_empty(struct uart_port *port)
{
unsigned int status;
* transmitting char breaks
* @port: Handle to the uart port structure
* @ctl: Value based on which start or stop decision is taken
- *
- **/
+ */
static void xuartps_break_ctl(struct uart_port *port, int ctl)
{
unsigned int status;
* @port: Handle to the uart port structure
* @termios: Handle to the input termios structure
* @old: Values of the previously saved termios structure
- *
- **/
+ */
static void xuartps_set_termios(struct uart_port *port,
struct ktermios *termios, struct ktermios *old)
{
* xuartps_startup - Called when an application opens a xuartps port
* @port: Handle to the uart port structure
*
- * Returns 0 on success, negative error otherwise
- **/
+ * Return: 0 on success, negative error otherwise
+ */
static int xuartps_startup(struct uart_port *port)
{
unsigned int retval = 0, status = 0;
/**
* xuartps_shutdown - Called when an application closes a xuartps port
* @port: Handle to the uart port structure
- *
- **/
+ */
static void xuartps_shutdown(struct uart_port *port)
{
int status;
* xuartps_type - Set UART type to xuartps port
* @port: Handle to the uart port structure
*
- * Returns string on success, NULL otherwise
- **/
+ * Return: string on success, NULL otherwise
+ */
static const char *xuartps_type(struct uart_port *port)
{
return port->type == PORT_XUARTPS ? XUARTPS_NAME : NULL;
* @port: Handle to the uart port structure
* @ser: Handle to the structure whose members are compared
*
- * Returns 0 if success otherwise -EINVAL
- **/
+ * Return: 0 if success otherwise -EINVAL
+ */
static int xuartps_verify_port(struct uart_port *port,
struct serial_struct *ser)
{
* uart_add_one_port()
* @port: Handle to the uart port structure
*
- * Returns 0, -ENOMEM if request fails
- **/
+ * Return: 0, -ENOMEM if request fails
+ */
static int xuartps_request_port(struct uart_port *port)
{
if (!request_mem_region(port->mapbase, XUARTPS_REGISTER_SPACE,
* port, called when the driver removes a xuartps
* port via uart_remove_one_port().
* @port: Handle to the uart port structure
- *
- **/
+ */
static void xuartps_release_port(struct uart_port *port)
{
release_mem_region(port->mapbase, XUARTPS_REGISTER_SPACE);
* xuartps port
* @port: Handle to the uart port structure
* @flags: If any
- *
- **/
+ */
static void xuartps_config_port(struct uart_port *port, int flags)
{
if (flags & UART_CONFIG_TYPE && xuartps_request_port(port) == 0)
*
* @port: Handle to the uart port structure
*
- * Returns the modem control state
- *
- **/
+ * Return: the modem control state
+ */
static unsigned int xuartps_get_mctrl(struct uart_port *port)
{
return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR;
* xuartps_get_port - Configure the port from the platform device resource
* info
*
- * Returns a pointer to a uart_port or NULL for failure
- **/
+ * Return: a pointer to a uart_port or NULL for failure
+ */
static struct uart_port *xuartps_get_port(void)
{
struct uart_port *port;
/**
* xuartps_console_wait_tx - Wait for the TX to be full
* @port: Handle to the uart port structure
- *
- **/
+ */
static void xuartps_console_wait_tx(struct uart_port *port)
{
while ((xuartps_readl(XUARTPS_SR_OFFSET) & XUARTPS_SR_TXEMPTY)
* xuartps_console_putchar - write the character to the FIFO buffer
* @port: Handle to the uart port structure
* @ch: Character to be written
- *
- **/
+ */
static void xuartps_console_putchar(struct uart_port *port, int ch)
{
xuartps_console_wait_tx(port);
/**
* xuartps_console_write - perform write operation
- * @port: Handle to the uart port structure
+ * @co: Console handle
* @s: Pointer to character array
* @count: No of characters
- **/
+ */
static void xuartps_console_write(struct console *co, const char *s,
unsigned int count)
{
* @co: Console handle
* @options: Initial settings of uart
*
- * Returns 0, -ENODEV if no device
- **/
+ * Return: 0, -ENODEV if no device
+ */
static int __init xuartps_console_setup(struct console *co, char *options)
{
struct uart_port *port = &xuartps_port[co->index];
/**
* xuartps_console_init - Initialization call
*
- * Returns 0 on success, negative error otherwise
- **/
+ * Return: 0 on success, negative error otherwise
+ */
static int __init xuartps_console_init(void)
{
register_console(&xuartps_console);
* xuartps_suspend - suspend event
* @device: Pointer to the device structure
*
- * Returns 0
+ * Return: 0
*/
static int xuartps_suspend(struct device *device)
{
* xuartps_resume - Resume after a previous suspend
* @device: Pointer to the device structure
*
- * Returns 0
+ * Return: 0
*/
static int xuartps_resume(struct device *device)
{
* xuartps_probe - Platform driver probe
* @pdev: Pointer to the platform device structure
*
- * Returns 0 on success, negative error otherwise
- **/
+ * Return: 0 on success, negative error otherwise
+ */
static int xuartps_probe(struct platform_device *pdev)
{
int rc;
* xuartps_remove - called when the platform driver is unregistered
* @pdev: Pointer to the platform device structure
*
- * Returns 0 on success, negative error otherwise
- **/
+ * Return: 0 on success, negative error otherwise
+ */
static int xuartps_remove(struct platform_device *pdev)
{
struct uart_port *port = platform_get_drvdata(pdev);
/**
* xuartps_init - Initial driver registration call
*
- * Returns whether the registration was successful or not
- **/
+ * Return: whether the registration was successful or not
+ */
static int __init xuartps_init(void)
{
int retval = 0;
/**
* xuartps_exit - Driver unregistration call
- **/
+ */
static void __exit xuartps_exit(void)
{
/* The order of unregistration is important. Unregister the