public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Barr <andrew.james.barr@gmail.com>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: Greg KH <greg@kroah.com>, linux-kernel@vger.kernel.org
Subject: Re: Cut power to a USB port?
Date: Tue, 02 Jan 2007 12:08:34 -0500	[thread overview]
Message-ID: <1167757714.13332.1.camel@localhost> (raw)
In-Reply-To: <20070102083650.c8a73253.rdunlap@xenotime.net>

On Tue, 2007-01-02 at 08:36 -0800, Randy Dunlap wrote:
> On Tue, 02 Jan 2007 10:28:38 -0500 Andrew Barr wrote:
> 
> > On Tue, 2007-01-02 at 00:32 -0800, Greg KH wrote:
> > > On Mon, Jan 01, 2007 at 03:56:25PM -0500, Andrew Barr wrote:
> > > > I have a simple question perhaps someone can help me with here...
> > > > 
> > > > I have one of those simple LED keyboard lamps that get their power from
> > > > the USB port. Is there some way in Linux, using files under /sys I would
> > > > imagine, to cut power to the USB port into which this lamp is plugged? I
> > > > know I would have to manually figure out what port it's plugged into, as
> > > > it is not a "real" USB device...e.g. it just draws power. I would like
> > > > to be able to programmatically switch the lamp on and off.
> > > 
> > > Search the archives of the linux-usb-devel mailing list for a program
> > > that might do this for you (depending on your hardware.)
> > 
> > What search terms should I use? Searching on "power" and "port power" at
> > Gmane in the gmane.linux.usb.devel group doesn't readily give me
> > anything.
> 
> You can try:
> 
> usbpoweroff.c
> (http://www.informatik.uni-halle.de/~ladischc/usbpoweroff.c)
> or
> hub-ctrl-2.c (http://www.gniibe.org/log/linux)

Hm, my hardware must not support it. The hub-ctrl-2.c program fails with
a broken pipe and the usbpoweroff.c program silently does nothing,
exiting returning zero.

Thanks to you all anyway,
Andrew

> > For the record, my hardware:
> > 
> > 00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM
> > (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
> > 00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM
> > (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
> > 00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM
> > (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
> > 00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2
> > EHCI Controller (rev 01)
> > 
> > IBM Thinkpad R51 2883-ELU.
> 
> 
> ---
> ~Randy


      reply	other threads:[~2007-01-02 17:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-01 20:56 Cut power to a USB port? Andrew Barr
2007-01-01 21:52 ` Oliver Neukum
2007-01-02  8:32 ` Greg KH
2007-01-02 15:28   ` Andrew Barr
2007-01-02 16:36     ` Randy Dunlap
2007-01-02 17:08       ` Andrew Barr [this message]

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=1167757714.13332.1.camel@localhost \
    --to=andrew.james.barr@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox