Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-25 Thread Bodo Eggert
On Fri, 24 Aug 2007, Greg KH wrote: > On Fri, Aug 24, 2007 at 12:51:19PM +0200, Bodo Eggert wrote: > > Greg KH <[EMAIL PROTECTED]> wrote: > > > my berry_charge code that adds support for charging the iphone when it > > > is plugged into a Linux machine. > > > > This should be a runtime option,

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-25 Thread Bodo Eggert
On Fri, 24 Aug 2007, Greg KH wrote: On Fri, Aug 24, 2007 at 12:51:19PM +0200, Bodo Eggert wrote: Greg KH [EMAIL PROTECTED] wrote: my berry_charge code that adds support for charging the iphone when it is plugged into a Linux machine. This should be a runtime option, because you may

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Matt Colyer
On Fri, 2007-08-24 at 14:55 -0400, Alan Stern wrote: > On Fri, 24 Aug 2007, Greg KH wrote: > > > Can someone with a iphone test this out? If you look at how the > > berry_charge driver does it, the set_config stuff happens after the > > magic command. As I don't have an iphone, nor have I ever

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Alan Stern
On Fri, 24 Aug 2007, Greg KH wrote: > Can someone with a iphone test this out? If you look at how the > berry_charge driver does it, the set_config stuff happens after the > magic command. As I don't have an iphone, nor have I ever seen any > dumps of the command streams, I don't really know if

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Greg KH
On Fri, Aug 24, 2007 at 04:23:13PM +0200, Oliver Neukum wrote: > Am Freitag 24 August 2007 schrieb Alan Stern: > > On Fri, 24 Aug 2007, Oliver Neukum wrote: > > > > > This schedules the change via a workqueue, so you'll be reprobed. If you > > > fire of the first vendor command you are doing so

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Greg KH
On Fri, Aug 24, 2007 at 12:51:19PM +0200, Bodo Eggert wrote: > Greg KH <[EMAIL PROTECTED]> wrote: > > > my berry_charge code that adds support for charging the iphone when it > > is plugged into a Linux machine. > > This should be a runtime option, because you may want to build a non-module >

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Greg KH
On Fri, Aug 24, 2007 at 10:08:46AM -0400, Alan Stern wrote: > On Fri, 24 Aug 2007, Oliver Neukum wrote: > > > This schedules the change via a workqueue, so you'll be reprobed. If you > > fire of the first vendor command you are doing so before the configuration > > is changed. How is this

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Oliver Neukum
Am Freitag 24 August 2007 schrieb Alan Stern: > On Fri, 24 Aug 2007, Oliver Neukum wrote: > > > This schedules the change via a workqueue, so you'll be reprobed. If you > > fire of the first vendor command you are doing so before the configuration > > is changed. How is this supposed to work? >

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Alan Stern
On Fri, 24 Aug 2007, Oliver Neukum wrote: > This schedules the change via a workqueue, so you'll be reprobed. If you > fire of the first vendor command you are doing so before the configuration > is changed. How is this supposed to work? I would do it like this: static int iphone_probe(struct

Re: [RFC] USB: driver for iphone charging

2007-08-24 Thread Bodo Eggert
Greg KH <[EMAIL PROTECTED]> wrote: > my berry_charge code that adds support for charging the iphone when it > is plugged into a Linux machine. This should be a runtime option, because you may want to build a non-module kernel and not charge the phone while running your laptop on battery. -- Top

Re: [RFC] USB: driver for iphone charging

2007-08-24 Thread Oliver Neukum
Am Freitag 24 August 2007 schrieb Greg KH: Hi, > +static int select_configuration(struct usb_device *udev) > +{ > +   char *dummy_buffer = kzalloc(2, GFP_KERNEL); > +   int retval; > + > +   if (!dummy_buffer) > +   return -ENOMEM; > + > +   dbg(>dev, "Calling

Re: [RFC] USB: driver for iphone charging

2007-08-24 Thread Oliver Neukum
Am Freitag 24 August 2007 schrieb Greg KH: Hi, +static int select_configuration(struct usb_device *udev) +{ +   char *dummy_buffer = kzalloc(2, GFP_KERNEL); +   int retval; + +   if (!dummy_buffer) +   return -ENOMEM; + +   dbg(udev-dev, Calling

Re: [RFC] USB: driver for iphone charging

2007-08-24 Thread Bodo Eggert
Greg KH [EMAIL PROTECTED] wrote: my berry_charge code that adds support for charging the iphone when it is plugged into a Linux machine. This should be a runtime option, because you may want to build a non-module kernel and not charge the phone while running your laptop on battery. -- Top 100

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Alan Stern
On Fri, 24 Aug 2007, Oliver Neukum wrote: This schedules the change via a workqueue, so you'll be reprobed. If you fire of the first vendor command you are doing so before the configuration is changed. How is this supposed to work? I would do it like this: static int iphone_probe(struct

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Oliver Neukum
Am Freitag 24 August 2007 schrieb Alan Stern: On Fri, 24 Aug 2007, Oliver Neukum wrote: This schedules the change via a workqueue, so you'll be reprobed. If you fire of the first vendor command you are doing so before the configuration is changed. How is this supposed to work? I would

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Alan Stern
On Fri, 24 Aug 2007, Greg KH wrote: Can someone with a iphone test this out? If you look at how the berry_charge driver does it, the set_config stuff happens after the magic command. As I don't have an iphone, nor have I ever seen any dumps of the command streams, I don't really know if the

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Greg KH
On Fri, Aug 24, 2007 at 04:23:13PM +0200, Oliver Neukum wrote: Am Freitag 24 August 2007 schrieb Alan Stern: On Fri, 24 Aug 2007, Oliver Neukum wrote: This schedules the change via a workqueue, so you'll be reprobed. If you fire of the first vendor command you are doing so before the

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Greg KH
On Fri, Aug 24, 2007 at 12:51:19PM +0200, Bodo Eggert wrote: Greg KH [EMAIL PROTECTED] wrote: my berry_charge code that adds support for charging the iphone when it is plugged into a Linux machine. This should be a runtime option, because you may want to build a non-module kernel and

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Greg KH
On Fri, Aug 24, 2007 at 10:08:46AM -0400, Alan Stern wrote: On Fri, 24 Aug 2007, Oliver Neukum wrote: This schedules the change via a workqueue, so you'll be reprobed. If you fire of the first vendor command you are doing so before the configuration is changed. How is this supposed to

Re: [linux-usb-devel] [RFC] USB: driver for iphone charging

2007-08-24 Thread Matt Colyer
On Fri, 2007-08-24 at 14:55 -0400, Alan Stern wrote: On Fri, 24 Aug 2007, Greg KH wrote: Can someone with a iphone test this out? If you look at how the berry_charge driver does it, the set_config stuff happens after the magic command. As I don't have an iphone, nor have I ever seen any

[RFC] USB: driver for iphone charging

2007-08-23 Thread Greg KH
my berry_charge code that adds support for charging the iphone when it is plugged into a Linux machine. As I don't have an iphone, can someone who does please test this out and let me know if it works properly or not? Matt, I fixed up the formatting of your original driver, fixed a sparse

[RFC] USB: driver for iphone charging

2007-08-23 Thread Greg KH
my berry_charge code that adds support for charging the iphone when it is plugged into a Linux machine. As I don't have an iphone, can someone who does please test this out and let me know if it works properly or not? Matt, I fixed up the formatting of your original driver, fixed a sparse