Re: Re: [PATCH] Remove voodoo code from i2c
flat view
From: Kronos <hidden>
Date: 2004-03-06 15:23:51
Il Fri, Mar 05, 2004 at 06:10:16PM -0800, Jon Smirl ha scritto:
Can this be written as a generic i2c probe function by calling i2c chanel functions instead of directly calling radeon_gpio_setscl, etc? The i2c chanel functions will then in turn call radeon_gpio_setscl, etc.
You can't use the i2c layer because you just send empty start-stop
sequencies on the bus, no real data. You must use bit banging functions:
struct i2c_algo_bit_data *bits = adapter->algo_data;
Then you use ->{s,g}et{scl,sda}. Remeber to pass bits->data to those
functions.
Luca
--
Home: http://kronoz.cjb.net
"It is more complicated than you think"
-- The Eighth Networking Truth from RFC 1925
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click