Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/input/generic/input.c

    r333c233 r15f3c3f  
    5353#include <io/console.h>
    5454#include <io/keycode.h>
    55 #include <devmap.h>
     55#include <loc.h>
    5656#include <input.h>
    5757#include <kbd.h>
     
    324324/** Add new kbdev device.
    325325 *
    326  * @param dev_path Filesystem path to the device (/dev/class/...)
     326 * @param dev_path Filesystem path to the device (/loc/class/...)
    327327 *
    328328 */
     
    352352/** Add new mousedev device.
    353353 *
    354  * @param dev_path Filesystem path to the device (/dev/class/...)
     354 * @param dev_path Filesystem path to the device (/loc/class/...)
    355355 *
    356356 */
     
    410410#endif
    411411#if defined(MACHINE_msim)
    412         kbd_add_dev(&msim_port, &stty_ctl);
     412        kbd_add_dev(&msim_port, &pc_ctl);
    413413#endif
    414414#if (defined(MACHINE_lgxemul) || defined(MACHINE_bgxemul)) && defined(CONFIG_FB)
     
    424424        kbd_add_dev(&niagara_port, &stty_ctl);
    425425#endif
     426#if defined(UARCH_sparc64) && defined(MACHINE_serengeti)
     427        kbd_add_dev(&sgcn_port, &stty_ctl);
     428#endif
    426429#if defined(UARCH_sparc64) && defined(MACHINE_generic)
     430        kbd_add_dev(&z8530_port, &sun_ctl);
    427431        kbd_add_dev(&ns16550_port, &sun_ctl);
    428432#endif
     
    482486/** Periodically check for new input devices.
    483487 *
    484  * Looks under /dev/class/keyboard and /dev/class/mouse.
     488 * Looks under /loc/class/keyboard and /loc/class/mouse.
    485489 *
    486490 * @param arg Ignored
     
    500504                 * Check for new keyboard device
    501505                 */
    502                 rc = asprintf(&dev_path, "/dev/class/keyboard\\%zu", kbd_id);
     506                rc = asprintf(&dev_path, "/loc/class/keyboard\\%zu", kbd_id);
    503507                if (rc < 0)
    504508                        continue;
     
    517521                 * Check for new mouse device
    518522                 */
    519                 rc = asprintf(&dev_path, "/dev/class/mouse\\%zu", mouse_id);
     523                rc = asprintf(&dev_path, "/loc/class/mouse\\%zu", mouse_id);
    520524                if (rc < 0)
    521525                        continue;
     
    552556        printf("%s: HelenOS input service\n", NAME);
    553557       
     558        sysarg_t fhc;
    554559        sysarg_t obio;
    555560       
     
    557562        list_initialize(&mouse_devs);
    558563       
    559         if ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio))
     564        if (((sysinfo_get_value("kbd.cir.fhc", &fhc) == EOK) && (fhc))
     565            || ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio)))
    560566                irc_service = true;
    561567       
     
    567573        /* Add legacy keyboard devices. */
    568574        kbd_add_legacy_devs();
    569        
     575
    570576        /* Add legacy mouse devices. */
    571577        mouse_add_legacy_devs();
    572578       
    573579        /* Register driver */
    574         int rc = devmap_driver_register(NAME, client_connection);
     580        int rc = loc_server_register(NAME, client_connection);
    575581        if (rc < 0) {
    576                 printf("%s: Unable to register driver (%d)\n", NAME, rc);
     582                printf("%s: Unable to register server (%d)\n", NAME, rc);
    577583                return -1;
    578584        }
    579585       
    580         char kbd[DEVMAP_NAME_MAXLEN + 1];
    581         snprintf(kbd, DEVMAP_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME);
    582        
    583         devmap_handle_t devmap_handle;
    584         if (devmap_device_register(kbd, &devmap_handle) != EOK) {
    585                 printf("%s: Unable to register device %s\n", NAME, kbd);
     586        char kbd[LOC_NAME_MAXLEN + 1];
     587        snprintf(kbd, LOC_NAME_MAXLEN, "%s/%s", NAMESPACE, NAME);
     588       
     589        service_id_t service_id;
     590        if (loc_service_register(kbd, &service_id) != EOK) {
     591                printf("%s: Unable to register service %s\n", NAME, kbd);
    586592                return -1;
    587593        }
Note: See TracChangeset for help on using the changeset viewer.