Ignore:
Timestamp:
2018-02-28T16:37:50Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b20da0
Parents:
f5e5f73 (diff), b2dca8de (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
git-committer:
Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
Message:

Merge github.com:helenos-xhci-team/helenos

This commit merges support for USB 3 and generally refactors, fixes,
extends and cleans up the existing USB framework.

Notable additions and features:

  • new host controller driver has been implemented to control various xHC models (among others, NEC Renesas uPD720200)
  • isochronous data transfer mode
  • support for explicit USB device removal
  • USB tablet driver
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/hid/usbhid/multimedia/multimedia.c

    rf5e5f73 rdf6ded8  
    22 * Copyright (c) 2011 Lubos Slovak
    33 * Copyright (c) 2011 Vojtech Horky
     4 * Copyright (c) 2018 Ondrej Hlavaty
    45 * All rights reserved.
    56 *
     
    8687    ipc_callid_t icallid, ipc_call_t *icall)
    8788{
    88         usb_log_debug(NAME " default_connection_handler()\n");
     89        usb_log_debug(NAME " default_connection_handler()");
    8990
    9091        usb_multimedia_t *multim_dev = ddf_fun_data_get(fun);
     
    9596                if (multim_dev->console_sess == NULL) {
    9697                        multim_dev->console_sess = sess;
    97                         usb_log_debug(NAME " Saved session to console: %p\n",
     98                        usb_log_debug(NAME " Saved session to console: %p",
    9899                            sess);
    99100                        async_answer_0(icallid, EOK);
     
    137138        };
    138139
    139         usb_log_debug2(NAME " Sending key %d to the console\n", ev.key);
     140        usb_log_debug2(NAME " Sending key %d to the console", ev.key);
    140141        if (multim_dev->console_sess == NULL) {
    141142                usb_log_warning(
     
    149150                async_exchange_end(exch);
    150151        } else {
    151                 usb_log_warning("Failed to send multimedia key.\n");
     152                usb_log_warning("Failed to send multimedia key.");
    152153        }
    153154}
     
    159160        }
    160161
    161         usb_log_debug(NAME " Initializing HID/multimedia structure...\n");
     162        usb_log_debug(NAME " Initializing HID/multimedia structure...");
    162163
    163164        /* Create the exposed function. */
     
    165166            hid_dev->usb_dev, fun_exposed, NAME);
    166167        if (fun == NULL) {
    167                 usb_log_error("Could not create DDF function node.\n");
     168                usb_log_error("Could not create DDF function node.");
    168169                return ENOMEM;
    169170        }
     
    184185        errno_t rc = ddf_fun_bind(fun);
    185186        if (rc != EOK) {
    186                 usb_log_error("Could not bind DDF function: %s.\n",
     187                usb_log_error("Could not bind DDF function: %s.",
    187188                    str_error(rc));
    188189                ddf_fun_destroy(fun);
     
    190191        }
    191192
    192         usb_log_debug(NAME " function created (handle: %" PRIun ").\n",
     193        usb_log_debug(NAME " function created (handle: %" PRIun ").",
    193194            ddf_fun_get_handle(fun));
    194195
     
    199200                    str_error(rc));
    200201                if (ddf_fun_unbind(fun) != EOK) {
    201                         usb_log_error("Failed to unbind %s, won't destroy.\n",
     202                        usb_log_error("Failed to unbind %s, won't destroy.",
    202203                            ddf_fun_get_name(fun));
    203204                } else {
     
    210211        *data = fun;
    211212
    212         usb_log_debug(NAME " HID/multimedia structure initialized.\n");
     213        usb_log_debug(NAME " HID/multimedia structure initialized.");
    213214        return EOK;
    214215}
     
    224225                async_hangup(multim_dev->console_sess);
    225226        if (ddf_fun_unbind(fun) != EOK) {
    226                 usb_log_error("Failed to unbind %s, won't destroy.\n",
     227                usb_log_error("Failed to unbind %s, won't destroy.",
    227228                    ddf_fun_get_name(fun));
    228229        } else {
    229                 usb_log_debug2("%s unbound.\n", ddf_fun_get_name(fun));
     230                usb_log_debug2("%s unbound.", ddf_fun_get_name(fun));
    230231                /* This frees multim_dev too as it was stored in
    231232                 * fun->data */
     
    266267        while (field != NULL) {
    267268                if (field->value != 0) {
    268                         usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)\n",
     269                        usb_log_debug(NAME " KEY VALUE(%X) USAGE(%X)",
    269270                            field->value, field->usage);
    270271                        const unsigned key =
     
    272273                        const char *key_str =
    273274                            usbhid_multimedia_usage_to_str(field->usage);
    274                         usb_log_info("Pressed key: %s\n", key_str);
     275                        usb_log_info("Pressed key: %s", key_str);
    275276                        usb_multimedia_push_ev(multim_dev, KEY_PRESS, key);
    276277                }
Note: See TracChangeset for help on using the changeset viewer.