Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-25 Thread Greg KH
On Thu, Aug 25, 2016 at 08:39:24PM +0200, Bjørn Mork wrote: > Greg KH writes: > > On Thu, Aug 25, 2016 at 07:14:52AM +0200, Rafał Miłecki wrote: > >> > >> Good question. I would like to extend this USB port trigger in the > >> future by reacting to USB activity. This

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-25 Thread Greg KH
On Thu, Aug 25, 2016 at 08:39:24PM +0200, Bjørn Mork wrote: > Greg KH writes: > > On Thu, Aug 25, 2016 at 07:14:52AM +0200, Rafał Miłecki wrote: > >> > >> Good question. I would like to extend this USB port trigger in the > >> future by reacting to USB activity. This involves playing with URBs >

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-25 Thread Bjørn Mork
Greg KH writes: > On Thu, Aug 25, 2016 at 07:14:52AM +0200, Rafał Miłecki wrote: >> >> Good question. I would like to extend this USB port trigger in the >> future by reacting to USB activity. This involves playing with URBs >> and I believe that at that point it'd be

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-25 Thread Bjørn Mork
Greg KH writes: > On Thu, Aug 25, 2016 at 07:14:52AM +0200, Rafał Miłecki wrote: >> >> Good question. I would like to extend this USB port trigger in the >> future by reacting to USB activity. This involves playing with URBs >> and I believe that at that point it'd be getting too much USB

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-25 Thread Greg KH
On Thu, Aug 25, 2016 at 07:14:52AM +0200, Rafał Miłecki wrote: > On 24 August 2016 at 23:04, Greg KH wrote: > > On Wed, Aug 24, 2016 at 11:29:51AM +0200, Rafał Miłecki wrote: > >> On 24 August 2016 at 11:22, Greg KH wrote: > >> > On Wed,

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-25 Thread Greg KH
On Thu, Aug 25, 2016 at 07:14:52AM +0200, Rafał Miłecki wrote: > On 24 August 2016 at 23:04, Greg KH wrote: > > On Wed, Aug 24, 2016 at 11:29:51AM +0200, Rafał Miłecki wrote: > >> On 24 August 2016 at 11:22, Greg KH wrote: > >> > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: >

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Rafał Miłecki
On 24 August 2016 at 23:04, Greg KH wrote: > On Wed, Aug 24, 2016 at 11:29:51AM +0200, Rafał Miłecki wrote: >> On 24 August 2016 at 11:22, Greg KH wrote: >> > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: >> >> +static

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Rafał Miłecki
On 24 August 2016 at 23:04, Greg KH wrote: > On Wed, Aug 24, 2016 at 11:29:51AM +0200, Rafał Miłecki wrote: >> On 24 August 2016 at 11:22, Greg KH wrote: >> > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: >> >> +static ssize_t ports_show(struct device *dev, struct

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Greg KH
On Wed, Aug 24, 2016 at 11:26:27AM +0200, Rafał Miłecki wrote: > On 24 August 2016 at 11:21, Greg KH wrote: > > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: > >> From: Rafał Miłecki > >> > >> This commit adds a new trigger

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Greg KH
On Wed, Aug 24, 2016 at 11:26:27AM +0200, Rafał Miłecki wrote: > On 24 August 2016 at 11:21, Greg KH wrote: > > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: > >> From: Rafał Miłecki > >> > >> This commit adds a new trigger responsible for turning on LED when USB > >> device

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Greg KH
On Wed, Aug 24, 2016 at 11:29:51AM +0200, Rafał Miłecki wrote: > On 24 August 2016 at 11:22, Greg KH wrote: > > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: > >> +static ssize_t ports_show(struct device *dev, struct device_attribute > >> *attr, > >>

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Greg KH
On Wed, Aug 24, 2016 at 11:29:51AM +0200, Rafał Miłecki wrote: > On 24 August 2016 at 11:22, Greg KH wrote: > > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: > >> +static ssize_t ports_show(struct device *dev, struct device_attribute > >> *attr, > >> + char

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Matthias Brugger
On 24/08/16 13:02, Rafał Miłecki wrote: On 24 August 2016 at 12:49, Matthias Brugger wrote: On 24/08/16 00:03, Rafał Miłecki wrote: [...] +static int usbport_trig_notify(struct notifier_block *nb, unsigned long action, + void *data) +{ +

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Matthias Brugger
On 24/08/16 13:02, Rafał Miłecki wrote: On 24 August 2016 at 12:49, Matthias Brugger wrote: On 24/08/16 00:03, Rafał Miłecki wrote: [...] +static int usbport_trig_notify(struct notifier_block *nb, unsigned long action, + void *data) +{ + struct

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Matthias Brugger
On 24/08/16 00:03, Rafał Miłecki wrote: From: Rafał Miłecki This commit adds a new trigger responsible for turning on LED when USB device gets connected to the specified USB port. This can can useful for various home routers that have USB port(s) and a proper LED telling

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Matthias Brugger
On 24/08/16 00:03, Rafał Miłecki wrote: From: Rafał Miłecki This commit adds a new trigger responsible for turning on LED when USB device gets connected to the specified USB port. This can can useful for various home routers that have USB port(s) and a proper LED telling user a device is

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Rafał Miłecki
On 24 August 2016 at 12:49, Matthias Brugger wrote: > On 24/08/16 00:03, Rafał Miłecki wrote: >> >> From: Rafał Miłecki >> >> This commit adds a new trigger responsible for turning on LED when USB >> device gets connected to the specified USB port. This can

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Rafał Miłecki
On 24 August 2016 at 12:49, Matthias Brugger wrote: > On 24/08/16 00:03, Rafał Miłecki wrote: >> >> From: Rafał Miłecki >> >> This commit adds a new trigger responsible for turning on LED when USB >> device gets connected to the specified USB port. This can can useful for >> various home routers

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Rafał Miłecki
On 24 August 2016 at 11:22, Greg KH wrote: > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: >> +static ssize_t ports_show(struct device *dev, struct device_attribute *attr, >> + char *buf) >> +{ >> + struct led_classdev

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Rafał Miłecki
On 24 August 2016 at 11:22, Greg KH wrote: > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: >> +static ssize_t ports_show(struct device *dev, struct device_attribute *attr, >> + char *buf) >> +{ >> + struct led_classdev *led_cdev = dev_get_drvdata(dev);

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Rafał Miłecki
On 24 August 2016 at 11:21, Greg KH wrote: > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: >> From: Rafał Miłecki >> >> This commit adds a new trigger responsible for turning on LED when USB >> device gets connected to the specified

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Rafał Miłecki
On 24 August 2016 at 11:21, Greg KH wrote: > On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: >> From: Rafał Miłecki >> >> This commit adds a new trigger responsible for turning on LED when USB >> device gets connected to the specified USB port. This can can useful for >> various

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Greg KH
On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: > +static ssize_t ports_show(struct device *dev, struct device_attribute *attr, > + char *buf) > +{ > + struct led_classdev *led_cdev = dev_get_drvdata(dev); > + struct usbport_trig_data *usbport_data =

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Greg KH
On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: > +static ssize_t ports_show(struct device *dev, struct device_attribute *attr, > + char *buf) > +{ > + struct led_classdev *led_cdev = dev_get_drvdata(dev); > + struct usbport_trig_data *usbport_data =

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Greg KH
On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: > From: Rafał Miłecki > > This commit adds a new trigger responsible for turning on LED when USB > device gets connected to the specified USB port. This can can useful for > various home routers that have USB

Re: [PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-24 Thread Greg KH
On Wed, Aug 24, 2016 at 12:03:29AM +0200, Rafał Miłecki wrote: > From: Rafał Miłecki > > This commit adds a new trigger responsible for turning on LED when USB > device gets connected to the specified USB port. This can can useful for > various home routers that have USB port(s) and a proper LED

[PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-23 Thread Rafał Miłecki
From: Rafał Miłecki This commit adds a new trigger responsible for turning on LED when USB device gets connected to the specified USB port. This can can useful for various home routers that have USB port(s) and a proper LED telling user a device is connected. The trigger gets

[PATCH V3] leds: trigger: Introduce an USB port trigger

2016-08-23 Thread Rafał Miłecki
From: Rafał Miłecki This commit adds a new trigger responsible for turning on LED when USB device gets connected to the specified USB port. This can can useful for various home routers that have USB port(s) and a proper LED telling user a device is connected. The trigger gets its documentation