All of lore.kernel.org
 help / color / mirror / Atom feed
* What alternative way could be possible for initializing sensor rigistors?
@ 2009-06-04 11:14 Dongsoo, Nathaniel Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Dongsoo, Nathaniel Kim @ 2009-06-04 11:14 UTC (permalink / raw)
  To: linux-media
  Cc: hverkuil, Dongsoo Kim, 김형준,
	민병호, 박경민

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.

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

Any other alternative API is served in subdev framework? Please let me
know if there is something I missed. BTW, subdev framework is really
cool. Totally arranged and easy to use.
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@gmail.com
          dongsoo45.kim@samsung.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What alternative way could be possible for initializing sensor rigistors?
@ 2009-06-05  7:52 Hans Verkuil
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Verkuil @ 2009-06-05  7:52 UTC (permalink / raw)
  To: Dongsoo, Nathaniel Kim
  Cc: linux-media, Dongsoo Kim, ±èÇüÁØ,
	¹Îº´È£,
	¹Ú°æ¹Î


> On Thu, Jun 4, 2009 at 8:26 PM, Hans Verkuil<hverkuil@xs4all.nl> 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@gmail.com
>>>           dongsoo45.kim@samsung.com
>>>
>>
>>
>> --
>> 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@gmail.com
>           dongsoo45.kim@samsung.com
>
>


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What alternative way could be possible for initializing sensor rigistors?
  2009-06-04 11:26 Hans Verkuil
@ 2009-06-05  7:07 ` Dongsoo, Nathaniel Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Dongsoo, Nathaniel Kim @ 2009-06-05  7:07 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Dongsoo Kim, ±èÇüÁØ,
	¹Îº´È£,
	¹Ú°æ¹Î

On Thu, Jun 4, 2009 at 8:26 PM, Hans Verkuil<hverkuil@xs4all.nl> 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?

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

>
>> 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@gmail.com
>>           dongsoo45.kim@samsung.com
>>
>
>
> --
> 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@gmail.com
          dongsoo45.kim@samsung.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What alternative way could be possible for initializing sensor rigistors?
@ 2009-06-04 11:26 Hans Verkuil
  2009-06-05  7:07 ` Dongsoo, Nathaniel Kim
  0 siblings, 1 reply; 4+ messages in thread
From: Hans Verkuil @ 2009-06-04 11:26 UTC (permalink / raw)
  To: Dongsoo, Nathaniel Kim
  Cc: linux-media, Dongsoo Kim, ±èÇüÁØ,
	¹Îº´È£,
	¹Ú°æ¹Î


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

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.

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

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

> 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@gmail.com
>           dongsoo45.kim@samsung.com
>


-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-05  7:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-04 11:14 What alternative way could be possible for initializing sensor rigistors? Dongsoo, Nathaniel Kim
2009-06-04 11:26 Hans Verkuil
2009-06-05  7:07 ` Dongsoo, Nathaniel Kim
2009-06-05  7:52 Hans Verkuil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.