LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <j.anaszewski@samsung.com>,
	Greg KH <greg@kroah.com>,
	kernel list <linux-kernel@vger.kernel.org>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	kyungmin.park@samsung.com, b.zolnierkie@samsung.com,
	cooloney@gmail.com, rpurdie@rpsys.net, sakari.ailus@iki.fi,
	s.nawrocki@samsung.com
Subject: Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)
Date: Tue, 27 Jan 2015 23:37:08 +0100	[thread overview]
Message-ID: <20150127221958.GA18993@amd> (raw)
In-Reply-To: <1422346028-16739-1-git-send-email-j.anaszewski@samsung.com>

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
> +			the timeout set by the user has expired; not all flash
> +			controllers may set this in all such conditions
> +		* controller-over-temperature - the flash controller has
> +			overheated
> +		* controller-short-circuit - the short circuit protection
> +			of the flash controller has been triggered
> +		* led-power-supply-over-current - current in the LED power
> +			supply has exceeded the limit specific to the flash
> +			controller
> +		* indicator-led-fault - the flash controller has detected
> +			a short or open circuit condition on the indicator LED
> +		* led-under-voltage - flash controller voltage to the flash
> +			LED has been below the minimum limit specific to
> +			the flash
> +		* controller-under-voltage - the input voltage of the flash
> +			controller is below the limit under which strobing the
> +			flash at full current will not be possible. The condition
> +			persists until this flag is no longer set
> +		* led-over-temperature - the temperature of the LED has exceeded
> +			its allowed upper limit
> +
> +		Flash faults are cleared, if possible, by reading the attribute.

That's bad. Now you can no longer present flash_fault file as readable
to non-root users, and grep -ri foo /sys will interfere with your
camera application.

Bad interface, just fix it.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

       reply	other threads:[~2015-01-27 22:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1422346028-16739-1-git-send-email-j.anaszewski@samsung.com>
2015-01-27 22:37 ` Pavel Machek [this message]
2015-01-28  8:43   ` Jacek Anaszewski
2015-01-29 21:14     ` Pavel Machek
2015-01-30  8:55       ` Jacek Anaszewski
2015-01-30 16:40         ` Greg KH
2015-02-02  9:07           ` Jacek Anaszewski
2015-02-02  9:44             ` Pavel Machek
2015-02-02 11:55               ` Jacek Anaszewski
2015-02-02 13:51                 ` Pavel Machek
2015-02-02 14:51                   ` Jacek Anaszewski

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=20150127221958.GA18993@amd \
    --to=pavel@ucw.cz \
    --cc=b.zolnierkie@samsung.com \
    --cc=cooloney@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=greg@kroah.com \
    --cc=j.anaszewski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --subject='Reading /sys with side effects (was Re: [PATCH 1/2] Documentation: leds: Add description of LED Flash class extension)' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).