Changeset 8bb9540 in mainline


Ignore:
Timestamp:
2012-01-01T22:01:47Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1ff1ee1
Parents:
1dea6d7
Message:

i8042, ps2mouse, xtkbd: Drop optical separators.

Requested on ML.

Location:
uspace/drv/char
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/char/i8042/i8042.c

    r1dea6d7 r8bb9540  
    5757static int i8042_write_aux(ddf_fun_t *, char *, size_t);
    5858static int i8042_read_aux(ddf_fun_t *, char *, size_t);
    59 /*----------------------------------------------------------------------------*/
     59
    6060/** Primary port interface structure. */
    6161static char_dev_ops_t kbd_iface = {
     
    6363    .write = i8042_write_kbd,
    6464};
    65 /*----------------------------------------------------------------------------*/
     65
    6666/** Auxiliary port interface structure. */
    6767static char_dev_ops_t aux_iface = {
     
    6969    .write = i8042_write_aux,
    7070};
    71 /*----------------------------------------------------------------------------*/
     71
    7272/** Primary port function operations. */
    7373static ddf_dev_ops_t kbd_ops = {
    7474        .interfaces[CHAR_DEV_IFACE] = &kbd_iface
    7575};
    76 /*----------------------------------------------------------------------------*/
     76
    7777/** Auxiliary port function operations. */
    7878static ddf_dev_ops_t aux_ops = {
     
    123123        }
    124124};
    125 /*----------------------------------------------------------------------------*/
     125
    126126/** Wait until it is safe to write to the device. */
    127127static void wait_ready(i8042_t *dev)
     
    130130        while (pio_read_8(&dev->regs->status) & i8042_INPUT_FULL);
    131131}
    132 /*----------------------------------------------------------------------------*/
     132
    133133/** Interrupt handler routine.
    134134 * Writes new data to the corresponding buffer.
     
    150150        buffer_write(buffer, data);
    151151}
    152 /*----------------------------------------------------------------------------*/
     152
    153153/** Initialize i8042 driver structure.
    154154 * @param dev Driver structure to initialize.
     
    287287        return EOK;
    288288}
    289 /*----------------------------------------------------------------------------*/
     289
    290290/** Write data to i8042 primary port.
    291291 * @param fun DDF function.
     
    307307        return size;
    308308}
    309 /*----------------------------------------------------------------------------*/
     309
    310310/** Read data from i8042 primary port.
    311311 * @param fun DDF function.
     
    327327        return size;
    328328}
    329 /*----------------------------------------------------------------------------*/
     329
    330330/** Write data to i8042 auxiliary port.
    331331 * @param fun DDF function.
     
    348348        return size;
    349349}
    350 /*----------------------------------------------------------------------------*/
     350
    351351/** Read data from i8042 auxiliary port.
    352352 * @param fun DDF function.
  • uspace/drv/char/i8042/main.c

    r1dea6d7 r8bb9540  
    4949    uintptr_t *io_reg_address, size_t *io_reg_size, int *kbd, int *mouse);
    5050static int i8042_dev_add(ddf_dev_t *device);
    51 /*----------------------------------------------------------------------------*/
     51
    5252/** DDF driver operations. */
    5353static driver_ops_t i8042_driver_ops = {
    5454        .dev_add = i8042_dev_add,
    5555};
    56 /*----------------------------------------------------------------------------*/
     56
    5757/** DDF driver. */
    5858static driver_t i8042_driver = {
     
    6060        .driver_ops = &i8042_driver_ops
    6161};
    62 /*----------------------------------------------------------------------------*/
     62
    6363/** Initialize global driver structures (NONE).
    6464 *
     
    7575        return ddf_driver_main(&i8042_driver);
    7676}
    77 /*----------------------------------------------------------------------------*/
     77
    7878/** Initialize a new ddf driver instance of i8042 driver
    7979 *
     
    115115        return EOK;
    116116}
    117 /*----------------------------------------------------------------------------*/
     117
    118118/** Get address of I/O registers.
    119119 *
  • uspace/drv/char/ps2mouse/main.c

    r1dea6d7 r8bb9540  
    4747
    4848static int mouse_add(ddf_dev_t *device);
    49 /*----------------------------------------------------------------------------*/
     49
    5050/** DDF driver ops. */
    5151static driver_ops_t mouse_driver_ops = {
    5252        .dev_add = mouse_add,
    5353};
    54 /*----------------------------------------------------------------------------*/
     54
    5555/** DDF driver structure. */
    5656static driver_t mouse_driver = {
     
    5858        .driver_ops = &mouse_driver_ops
    5959};
    60 /*----------------------------------------------------------------------------*/
     60
    6161/** Initialize global driver structures (NONE).
    6262 *
     
    7373        return ddf_driver_main(&mouse_driver);
    7474}
    75 /*----------------------------------------------------------------------------*/
     75
    7676/** Initialize a new ddf driver instance
    7777 *
  • uspace/drv/char/ps2mouse/ps2mouse.c

    r1dea6d7 r8bb9540  
    9494        } \
    9595} while (0)
    96 /*----------------------------------------------------------------------------*/
     96
    9797static int polling_ps2(void *);
    9898static int polling_intellimouse(void *);
    9999static int probe_intellimouse(async_sess_t *, bool);
    100100static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *);
    101 /*----------------------------------------------------------------------------*/
     101
    102102/** ps/2 mouse driver ops. */
    103103static ddf_dev_ops_t mouse_ops = {
    104104        .default_handler = default_connection_handler
    105105};
    106 /*----------------------------------------------------------------------------*/
     106
    107107/** Initialize mouse driver structure.
    108108 * @param kbd Mouse driver structure to initialize.
     
    187187        return EOK;
    188188}
    189 /*----------------------------------------------------------------------------*/
     189
    190190/** Get data and parse ps2 protocol packets.
    191191 * @param arg Pointer to ps2_mouse_t structure.
     
    242242        }
    243243}
    244 /*----------------------------------------------------------------------------*/
     244
    245245/** Get data and parse ps2 protocol with IntelliMouse extension packets.
    246246 * @param arg Pointer to ps2_mouse_t structure.
     
    316316        }
    317317}
    318 /*----------------------------------------------------------------------------*/
     318
    319319/** Send magic sequence to initialize IntelliMouse extensions.
    320320 * @param session IPC session to the parent device.
     
    348348        return EOK;
    349349}
    350 /*----------------------------------------------------------------------------*/
     350
    351351/** Default handler for IPC methods not handled by DDF.
    352352 *
  • uspace/drv/char/xtkbd/main.c

    r1dea6d7 r8bb9540  
    4747
    4848static int xt_kbd_add(ddf_dev_t *device);
    49 /*----------------------------------------------------------------------------*/
     49
    5050/** DDF driver ops. */
    5151static driver_ops_t kbd_driver_ops = {
    5252        .dev_add = xt_kbd_add,
    5353};
    54 /*----------------------------------------------------------------------------*/
     54
    5555/** DDF driver structure. */
    5656static driver_t kbd_driver = {
     
    5858        .driver_ops = &kbd_driver_ops
    5959};
    60 /*----------------------------------------------------------------------------*/
     60
    6161/** Initialize global driver structures (NONE).
    6262 *
     
    7373        return ddf_driver_main(&kbd_driver);
    7474}
    75 /*----------------------------------------------------------------------------*/
     75
    7676/** Initialize a new ddf driver instance of the driver
    7777 *
  • uspace/drv/char/xtkbd/xtkbd.c

    r1dea6d7 r8bb9540  
    152152        [0x53] = KC_NPERIOD
    153153};
    154 /*----------------------------------------------------------------------------*/
     154
    155155#define SCANCODE_SET_EXTENDED 0xe0
    156156/** Scancode set 1 extended codes table */
     
    177177        [0x1c] = KC_NENTER
    178178};
    179 /*----------------------------------------------------------------------------*/
     179
    180180static int polling(void *);
    181181static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *);
    182 /*----------------------------------------------------------------------------*/
     182
    183183/** Keyboard function ops. */
    184184static ddf_dev_ops_t kbd_ops = {
    185185        .default_handler = default_connection_handler
    186186};
    187 /*----------------------------------------------------------------------------*/
     187
    188188/** Initialize keyboard driver structure.
    189189 * @param kbd Keyboard driver structure to initialize.
     
    238238        return EOK;
    239239}
    240 /*----------------------------------------------------------------------------*/
     240
    241241/** Get data and parse scancodes.
    242242 * @param arg Pointer to xt_kbd_t structure.
     
    290290        }
    291291}
    292 /*----------------------------------------------------------------------------*/
     292
    293293/** Default handler for IPC methods not handled by DDF.
    294294 *
Note: See TracChangeset for help on using the changeset viewer.