Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Jacek Anaszewski
Hi Pavel, On 02/02/2015 02:51 PM, Pavel Machek wrote: Hi! [Actually, you could _always_ do two reads on those devices, discard first result, and return the second. But I'm not sure how hardware will like that.] This would be the most sensible option. However, let's analyze the typical use

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Pavel Machek
Hi! > >[Actually, you could _always_ do two reads on those devices, discard > >first result, and return the second. But I'm not sure how hardware > >will like that.] > > This would be the most sensible option. > > > However, let's analyze the typical use cases for flash strobing: > > >

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Jacek Anaszewski
On 02/02/2015 10:44 AM, Pavel Machek wrote: On Mon 2015-02-02 10:07:02, Jacek Anaszewski wrote: On 01/30/2015 05:40 PM, Greg KH wrote: On Fri, Jan 30, 2015 at 09:55:30AM +0100, Jacek Anaszewski wrote: Hi Pavel, On 01/29/2015 10:14 PM, Pavel Machek wrote: Hi! + - flash_fault - list

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Pavel Machek
On Mon 2015-02-02 10:07:02, Jacek Anaszewski wrote: > On 01/30/2015 05:40 PM, Greg KH wrote: > >On Fri, Jan 30, 2015 at 09:55:30AM +0100, Jacek Anaszewski wrote: > >>Hi Pavel, > >> > >>On 01/29/2015 10:14 PM, Pavel Machek wrote: > >>>Hi! > >>> > >>+ - flash_fault - list of flash faults

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Jacek Anaszewski
On 01/30/2015 05:40 PM, Greg KH wrote: On Fri, Jan 30, 2015 at 09:55:30AM +0100, Jacek Anaszewski wrote: Hi Pavel, On 01/29/2015 10:14 PM, Pavel Machek wrote: Hi! + - flash_fault - list of flash faults that may have occurred: + * led-over-voltage - flash controller

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Pavel Machek
On Mon 2015-02-02 10:07:02, Jacek Anaszewski wrote: On 01/30/2015 05:40 PM, Greg KH wrote: On Fri, Jan 30, 2015 at 09:55:30AM +0100, Jacek Anaszewski wrote: Hi Pavel, On 01/29/2015 10:14 PM, Pavel Machek wrote: Hi! + - flash_fault - list of flash faults that may have occurred: +

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Pavel Machek
Hi! [Actually, you could _always_ do two reads on those devices, discard first result, and return the second. But I'm not sure how hardware will like that.] This would be the most sensible option. However, let's analyze the typical use cases for flash strobing:

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Jacek Anaszewski
On 02/02/2015 10:44 AM, Pavel Machek wrote: On Mon 2015-02-02 10:07:02, Jacek Anaszewski wrote: On 01/30/2015 05:40 PM, Greg KH wrote: On Fri, Jan 30, 2015 at 09:55:30AM +0100, Jacek Anaszewski wrote: Hi Pavel, On 01/29/2015 10:14 PM, Pavel Machek wrote: Hi! + - flash_fault - list

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Jacek Anaszewski
Hi Pavel, On 02/02/2015 02:51 PM, Pavel Machek wrote: Hi! [Actually, you could _always_ do two reads on those devices, discard first result, and return the second. But I'm not sure how hardware will like that.] This would be the most sensible option. However, let's analyze the typical use

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-02-02 Thread Jacek Anaszewski
On 01/30/2015 05:40 PM, Greg KH wrote: On Fri, Jan 30, 2015 at 09:55:30AM +0100, Jacek Anaszewski wrote: Hi Pavel, On 01/29/2015 10:14 PM, Pavel Machek wrote: Hi! + - flash_fault - list of flash faults that may have occurred: + * led-over-voltage - flash controller

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-30 Thread Greg KH
On Fri, Jan 30, 2015 at 09:55:30AM +0100, Jacek Anaszewski wrote: > Hi Pavel, > > On 01/29/2015 10:14 PM, Pavel Machek wrote: > >Hi! > > > + - flash_fault - list of flash faults that may have occurred: > + * led-over-voltage - flash controller voltage to the flash LED > +

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-30 Thread Jacek Anaszewski
Hi Pavel, On 01/29/2015 10:14 PM, Pavel Machek wrote: Hi! + - flash_fault - list of flash faults that may have occurred: + * led-over-voltage - flash controller voltage to the flash LED + has exceededthe limit specific to the flash controller +

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-30 Thread Greg KH
On Fri, Jan 30, 2015 at 09:55:30AM +0100, Jacek Anaszewski wrote: Hi Pavel, On 01/29/2015 10:14 PM, Pavel Machek wrote: Hi! + - flash_fault - list of flash faults that may have occurred: + * led-over-voltage - flash controller voltage to the flash LED + has

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-30 Thread Jacek Anaszewski
Hi Pavel, On 01/29/2015 10:14 PM, Pavel Machek wrote: Hi! + - flash_fault - list of flash faults that may have occurred: + * led-over-voltage - flash controller voltage to the flash LED + has exceededthe limit specific to the flash controller +

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-29 Thread Pavel Machek
Hi! > >>+ - flash_fault - list of flash faults that may have occurred: > >>+ * led-over-voltage - flash controller voltage to the flash LED > >>+ has exceededthe limit specific to the flash controller > >>+ * flash-timeout-exceeded - the flash strobe was

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-29 Thread Pavel Machek
Hi! + - flash_fault - list of flash faults that may have occurred: + * led-over-voltage - flash controller voltage to the flash LED + has exceededthe limit specific to the flash controller + * flash-timeout-exceeded - the flash strobe was still on when

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-28 Thread Jacek Anaszewski
Hi Pavel, On 01/27/2015 11:37 PM, Pavel Machek wrote: Hi! + - flash_fault - list of flash faults that may have occurred: + * led-over-voltage - flash controller voltage to the flash LED + has exceededthe limit specific to the flash controller +

Re: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-28 Thread Jacek Anaszewski
Hi Pavel, On 01/27/2015 11:37 PM, Pavel Machek wrote: Hi! + - flash_fault - list of flash faults that may have occurred: + * led-over-voltage - flash controller voltage to the flash LED + has exceededthe limit specific to the flash controller +

Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-27 Thread Pavel Machek
Hi! > + - flash_fault - list of flash faults that may have occurred: > + * led-over-voltage - flash controller voltage to the flash LED > + has exceededthe limit specific to the flash controller > + * flash-timeout-exceeded - the flash strobe was

Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)

2015-01-27 Thread Pavel Machek
Hi! + - flash_fault - list of flash faults that may have occurred: + * led-over-voltage - flash controller voltage to the flash LED + has exceededthe limit specific to the flash controller + * flash-timeout-exceeded - the flash strobe was still