Re: [media-workshop] V2: Agenda for the Edinburgh mini-summit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux