From: Pavel Machek <pavel@ucw.cz>
To: Guru Das Srinagesh <gurus@codeaurora.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
linux-leds@vger.kernel.org,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Dan Murphy <dmurphy@ti.com>,
linux-kernel@vger.kernel.org,
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Subject: Re: [PATCH 1/2] leds: Add flag to keep trigger always
Date: Tue, 8 Oct 2019 09:47:31 +0200 [thread overview]
Message-ID: <20191008074731.GB633@amd> (raw)
In-Reply-To: <20191004200932.GA28140@codeaurora.org>
[-- Attachment #1: Type: text/plain, Size: 2129 bytes --]
Hi!
> > > > I don't understand. The original commit broke userspace operations.
> > > > Shouldn't it be reverted, or fixed this way in order to have userspace
> > > > work properly again?
> > >
> > > So, what it is exactly that is not working? :-). Yes, root can
> > > disconnect LED from v4l2 interface; he can also connect it
> > > back. Documentation says that happens.
> > >
> > > Yes, root can do stupid things.
> > >
> > > Commit 0013b23d66a2768f5babbb0ea9f03ab067a990d8 is from 2008. I'd
> > > prefer we did not apply it in 2008, but...
> >
> > Ah, my fault, I thought this was a new commit.
> >
> > Guru, what are you doing here that this is required all of a sudden? No
> > other kernel seems to need these changes, what is different in your
> > Android userspace that requires this patch series?
> >
> > thanks,
> >
> > greg k-h
>
> Hi Greg,
>
> Our camera flash driver first requests the available current from the
> flash LED before setting its brightness. It passes a trigger as argument
> to the function that determines the available current. This function
> uses trigger_to_lcdev() to look up the led_classdev associated with that
> trigger as a first step. This lookup will fail if the trigger has been
> dissociated from its led_classdev as a result of a user setting that
> led_classdev's brightness to zero manually through sysfs.
>
> Why would the user set the brightness to zero? The user does this as
> part of camera and LED testing activities which include, amongst other
> things, visual inspection of the operation of various onboard LEDs. The
> user uses sysfs to manually turn on and off the LEDs by setting their
> brightness to max and then to zero in order to verify that they are
> working as expected.
Yes, so you should really set trigger to none before changing
brightness manually and restore it back to whatever it was when you
are done with manual testing.
Thanks,
Pavel
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2019-10-08 7:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-10 0:52 [PATCH 1/2] leds: Add flag to keep trigger always Guru Das Srinagesh
2019-08-10 0:52 ` [PATCH 2/2] leds: triggers: Don't remove trigger if LED_KEEP_TRIGGER flag is set Guru Das Srinagesh
2019-08-10 7:13 ` [PATCH 1/2] leds: Add flag to keep trigger always Pavel Machek
2019-09-30 13:39 ` Greg KH
2019-09-30 17:22 ` Pavel Machek
2019-09-30 17:27 ` Greg KH
2019-10-04 20:09 ` Guru Das Srinagesh
2019-10-08 7:47 ` Pavel Machek [this message]
2019-10-10 0:52 ` Guru Das Srinagesh
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=20191008074731.GB633@amd \
--to=pavel@ucw.cz \
--cc=dmurphy@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=gurus@codeaurora.org \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=subbaram@codeaurora.org \
/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