Re: What alternative way could be possible for initializing sensor rigistors?

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

 



> On Thu, Jun 4, 2009 at 8:26 PM, Hans Verkuil<hverkuil@xxxxxxxxx> wrote:
>>
>>> Hello everyone,
>>>
>>> In subdev framework, we already have "init" API  but not recommended
>>> for new drivers to use this. But I'm so frustrated for the absence of
>>> that kind of API.
>>
>> What I want to do is that you can pass such data through the board_info.
>> Patch for that have been posted but I still haven't had the chance to
>> sit
>> down and review them :-(
>
> Hmm... I tried to find the patch you mentioned, but still not popping
> up. Can you give me some hint?

It's this one:

http://patchwork.kernel.org/patch/25385/

At least, I believe that's the latest version of it.

>>
>> This method is the common method for existing i2c drivers and should (I
>> think) be used for all new i2c drivers.
>>
>>> I'm working on camera driver which needs to programme registors
>>> through I2C bus and just stuck figuring out how to make it programmed
>>> in device open (in this case, camera interface should be opened)
>>> procedure.
>>
>> You're not trying to pass register/value pairs to the i2c driver, are
>> you?
>> You should tell the i2c driver what you want and let the i2c driver do
>> the
>> register programming for you. Only the i2c driver should know about the
>> registers of the i2c device.
>
> Actually I'm trying to do a very ordinary I2C programming job through
> i2c_transfer() like any of sensor device. There are so many registers
> to be programmed..like hundreds? I suppose..One single register is
> consisted of 2bytes for address and 2bytes for values or multiple
> bytes for some cases.

Yes, but such programming should only be done from the i2c device driver.
You should never attempt to set registers in an i2c device from another
driver.

Regards,

       Hans

>>> So, if I have no chance to use "init" API with implementing
>>> my driver, which API should be used? Actually without "init" API, I
>>> should make my driver to programme initializing registors in s_fmt or
>>> s_parm sort of APIs.
>>
>> Use init as long as the new functions passing the board_info to the i2c
>> core are not yet available. You can convert once we have the new API in
>> place.
>>
>
> OK, I'll try to use if I can't find the patch using board_info you
> have mentioned.
>
>>> Any other alternative API is served in subdev framework? Please let me
>>> know if there is something I missed.
>>
>> It's work in progress and I'm the bottleneck here :-(
>>
>
> I really wanna give you a hand! If I could..
> Cheers,
>
> Nate
>
>>> BTW, subdev framework is really
>>> cool. Totally arranged and easy to use.
>>
>> Thanks!
>>
>> Regards,
>>
>>         Hans
>>
>>> Cheers,
>>>
>>> Nate
>>>
>>>
>>> --
>>> =
>>> DongSoo, Nathaniel Kim
>>> Engineer
>>> Mobile S/W Platform Lab.
>>> Digital Media & Communications R&D Centre
>>> Samsung Electronics CO., LTD.
>>> e-mail : dongsoo.kim@xxxxxxxxx
>>>           dongsoo45.kim@xxxxxxxxxxx
>>>
>>
>>
>> --
>> Hans Verkuil - video4linux developer - sponsored by TANDBERG
>>
>>
>
>
>
> --
> =
> DongSoo, Nathaniel Kim
> Engineer
> Mobile S/W Platform Lab.
> Digital Media & Communications R&D Centre
> Samsung Electronics CO., LTD.
> e-mail : dongsoo.kim@xxxxxxxxx
>           dongsoo45.kim@xxxxxxxxxxx
>
>


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG

--
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