Hi Pavel, On Wed, Feb 15, 2017 at 09:09:09AM +0100, Pavel Machek wrote: > Hi! > > > On 02/15/17 00:47, Pavel Machek wrote: > > > On Tue 2017-02-14 14:20:22, Sakari Ailus wrote: > > >> Add a V4L2 control class for voice coil lens driver devices. These are > > >> simple devices that are used to move a camera lens from its resting > > >> position. > > >> > > >> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > > > > > > Looks good to me. > > > > > > I wonder... should we somehow expose the range of diopters to > > > userspace? I believe userland camera application will need that > > > information. > > > > It'd certainly be useful to be able to provide more information. > > > > The question is: where to store it, and how? It depends on the voice > > coil, the spring constant, the lens and the distance of the lens from > > the sensor --- at least. Probably the sensor size as well. > > > > On voice coil lenses it is also somewhat inexact. > > I was thinking read-only attribute providing minimum and maximum > diopters in case there's linear relationship as on N900. > > +#define V4L2_CID_VOICE_DIOPTERS_AT_REST (V4L2_CID_VOICE_COIL_CLASS_BASE + 2) > +#define V4L2_CID_VOICE_DIOPTERS_AT_MAX (V4L2_CID_VOICE_COIL_CLASS_BASE + 3) Where do you store that information and how? Should the user be also told how the applied current affects the value? I also wonder whether that's the best way to provide the information to the user --- we have things such as devices that are a part of a camera module and telling the user on which side of the device the camera is located. We've been planning to have a property API for this to provide the user with a tree of key-value pairs, with details unsettled as of yet, so it's certainly nothing that could be used yet. Do you have a user application that could make use of such information? -- Regards, Sakari Ailus e-mail: sakari.ailus@xxxxxx XMPP: sailus@xxxxxxxxxxxxxx