public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Milo Kim <milo.kim@ti.com>, Bryan Wu <cooloney@gmail.com>
Cc: Oliver Schinagl <oliver+list@schinagl.nl>,
	linux-pwm@vger.kernel.org, Hans Verkuil <hansverk@cisco.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	Bryan Wu <bryan.wu@canonical.com>,
	media-workshop@linuxtv.org,
	Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	Linux LED Subsystem <linux-leds@vger.kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [media-workshop] V2: Agenda for the Edinburgh mini-summit
Date: Wed, 16 Oct 2013 12:24:09 +0200	[thread overview]
Message-ID: <525E6949.5010805@samsung.com> (raw)
In-Reply-To: <525DF0C7.9090407@ti.com>

Hi,

On 16/10/13 03:49, Milo Kim wrote:
> General LED trigger APIs were created not for the application interface 
> but for any kernel space driver.
> The LED camera trigger APIs are used by a camera driver, not application.
> 
> Some LED devices provide basic LED functionalities and high current 
> features like a flash and a torch.(eg. LM3554, LM3642)
> The reason why I added the LED camera trigger is
>    "for providing multiple operations(LEDs, flash and torch) by one LED 
> device driver".
> 
> For example,
> A LED indicator is controlled via the LED sysfs.
> And flash and torch are controlled by a camera driver - calls exported 
> LED trigger function, ledtrig_flash_ctrl().
> 
> My understanding is the V4L2 subsystem provides rich IOCTLs for the 
> media device.
> I agree that the V4L2 is more proper interface for camera *application*.
> 
> So, my suggestion is:
>    - If a device has only flash/torch functionalities, then register the 
> driver as the V4L2 sub-device.

Presumably it's not something we want. I think a core module is needed
so drivers can expose both sysfs LED API and V4L2 Flash API with minimal
effort for a single device. Then LED API would be extended with standard
attributes for Torch/Flash and user applications can use either sysfs
or V4L2 subdev/controls API. No need to worry that for some of the devices
the kernel will expose only the sysfs and for some only the V4L2 interface.

Also for some multifunction devices integrating features like PMIC,
clock generator, Flash/Torch LED driver, etc. the LED might be used for
different purpose than originally intended. E.g. Torch LED as an
indicator. So it is not correct IMO to select a specific API based on
device's primary purpose only. I think there should be more flexibility.

>    - If a device provides not only flash/torch but also LED features, 
> then create the driver as the MFD.
> 
> For example, LM3555 (and AS3645A) is used only for the camera.
> Then, this driver is registered as the V4L2 sub-device.
> (drivers/media/i2c/as3645a.c) - no change at all.
> 
> On the other hands, LM3642 has an indicator mode with flash/torch.
> Then, it will consist of 3 parts - MFD core, LED(indicator) and 
> V4L2(flash/torch).
> 
> Then, ledtrig-camera will be removed after we complete to change the 
> driver structure.

I'm not sure it needs to be removed. We will still have hardware and
software triggered Flash LEDs. What would provide ledtrig-camera's
current functionality when you remove it ?

--
Regards,
Sylwester

  reply	other threads:[~2013-10-16 10:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-10  9:34 V2: Agenda for the Edinburgh mini-summit Hans Verkuil
     [not found] ` <4425595.0oKxXFxdQl@avalon>
     [not found]   ` <201309241324.25660.hansverk@cisco.com>
     [not found]     ` <3968462.BF6ckOWXxj@avalon>
2013-09-27 22:07       ` [media-workshop] " Sakari Ailus
2013-09-27 22:30         ` Sakari Ailus
     [not found] ` <52405427.6000002@samsung.com>
     [not found]   ` <52406E5C.2020709@schinagl.nl>
     [not found]     ` <5240A41A.6050207@gmail.com>
     [not found]       ` <20130924092053.GB13971@ulmo>
2013-10-07 21:06         ` Sakari Ailus
2013-10-07 22:24           ` [media-workshop] " Laurent Pinchart
2013-10-11  0:02             ` Bryan Wu
2013-10-11  7:38               ` Laurent Pinchart
2013-10-15 18:37                 ` Bryan Wu
2013-10-15 18:50                   ` Laurent Pinchart
2013-10-15 20:55                     ` Bryan Wu
2013-10-15 19:03                   ` Sylwester Nawrocki
2013-10-16  1:49                   ` Milo Kim
2013-10-16 10:24                     ` Sylwester Nawrocki [this message]
2013-10-16 17:17                     ` Bryan Wu
2013-10-16 23:36                       ` Milo Kim
2013-10-16 23:54                         ` Bryan Wu
2013-10-16 23:56                           ` Bryan Wu
2013-10-17  0:12                         ` Andy Walls
2013-10-19  0:17                           ` Bryan Wu
     [not found]                             ` <CAPybu_2KRF_VHkjCEV8d7YOaZo27QJ=TxGTsUOeWO5X_tp8Ozw@mail.gmail.com>
2013-10-21 18:40                               ` Bryan Wu
2013-10-21 18:52                                 ` Hans Verkuil
     [not found]                                   ` <CAPybu_1NZ-CfNkMt_stev5L9oL1MqSAhV03jQW7QoF=q4c2JzQ@mail.gmail.com>
2013-10-21 19:39                                     ` Hans Verkuil
2013-10-22  9:50                                   ` Hans Verkuil

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=525E6949.5010805@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=bryan.wu@canonical.com \
    --cc=cooloney@gmail.com \
    --cc=hansverk@cisco.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=media-workshop@linuxtv.org \
    --cc=milo.kim@ti.com \
    --cc=oliver+list@schinagl.nl \
    --cc=rpurdie@rpsys.net \
    --cc=sakari.ailus@iki.fi \
    --cc=sylvester.nawrocki@gmail.com \
    --cc=thierry.reding@gmail.com \
    /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