ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Alexander Bokovoy" <ab@altlinux.org>
To: "ALT Linux Team development discussions" <devel@lists.altlinux.org>
Subject: Re: [devel] /proc/bus/usb: udev или hal?
Date: Thu, 27 Nov 2008 13:00:15 +0300
Message-ID: <6062a6e60811270200w29594ad1qf9f0d93e7a584574@mail.gmail.com> (raw)
In-Reply-To: <492E6BC8.101@altlinux.com>

2008/11/27 Anton Farygin <rider@altlinux.com>:
>> Как добраться на запись до содержимого /proc/bus/usb ?
>> Или это признано устаревшим и не используется?
>> Если да, то что сейчас взамен?
>
> лучше всего использовать libusb.
>
> Она работает через /dev/bus/usb/*
libusb работает через все, что доступно для определения правильного
файла устройства, предпочитая использовать sysfs вместо procfs, если
это возможно. Связано это с тем, что обращение к данным о usb в procfs
приводит к принудительному "пробуждению" устройства, а в sysfs
доступна информация, которая уже есть у ядра и лишние циклы
"пробуждения/автоматического засыпания" не будут расходовать энергию.

Правильный механизм работы с usb на сегодня -- через libusb с
расстановкой прав на устройства через udev. Скрипты расстановки прав
для нужных устройств я уже тут публиковал в прошлой теме, посвященной
вопросам работы с камерами/usb.
-- 
/ Alexander Bokovoy

  reply	other threads:[~2008-11-27 10:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-27  9:08 Alexey Borovskoy
2008-11-27  9:26 ` Alexander Bokovoy
2008-11-27  9:43 ` Anton Farygin
2008-11-27 10:00   ` Alexander Bokovoy [this message]
2008-11-27 10:18     ` Alexey Borovskoy
2008-11-27 10:24       ` Valery V. Inozemtsev
2008-11-27 10:33         ` Alexey Borovskoy
2008-11-27 10:59       ` Alexander Bokovoy
2008-11-28  9:49   ` Alexey Borovskoy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6062a6e60811270200w29594ad1qf9f0d93e7a584574@mail.gmail.com \
    --to=ab@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git