<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/linux/i2c.h, branch v2.6.27-rc4</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>i2c: Add detection capability to new-style drivers</title>
<updated>2008-07-14T20:38:36+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-07-14T20:38:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4735c98f8447acb1c8977e2b8024640f7bf36dd6'/>
<id>4735c98f8447acb1c8977e2b8024640f7bf36dd6</id>
<content type='text'>
Add a mechanism to let new-style i2c drivers optionally autodetect
devices they would support on selected buses and ask i2c-core to
instantiate them. This is a replacement for legacy i2c drivers, much
cleaner.

Where drivers had to implement both a legacy i2c_driver and a
new-style i2c_driver so far, this mechanism makes it possible to get
rid of the legacy i2c_driver and implement both enumerated and
detected device support with just one (new-style) i2c_driver.

Here is a quick conversion guide for these drivers, step by step:

* Delete the legacy driver definition, registration and removal.
  Delete the attach_adapter and detach_client methods of the legacy
  driver.

* Change the prototype of the legacy detect function from
    static int foo_detect(struct i2c_adapter *adapter, int address, int kind);
  to
    static int foo_detect(struct i2c_client *client, int kind,
    			  struct i2c_board_info *info);

* Set the new-style driver detect callback to this new function, and
  set its address_data to &amp;addr_data (addr_data is generally provided
  by I2C_CLIENT_INSMOD.)

* Add the appropriate class to the new-style driver. This is
  typically the class the legacy attach_adapter method was checking
  for. Class checking is now mandatory (done by i2c-core.) See
  &lt;linux/i2c.h&gt; for the list of available classes.

* Remove the i2c_client allocation and freeing from the detect
  function. A pre-allocated client is now handed to you by i2c-core,
  and is freed automatically.

* Make the detect function fill the type field of the i2c_board_info
  structure it was passed as a parameter, and return 0, on success. If
  the detection fails, return -ENODEV.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a mechanism to let new-style i2c drivers optionally autodetect
devices they would support on selected buses and ask i2c-core to
instantiate them. This is a replacement for legacy i2c drivers, much
cleaner.

Where drivers had to implement both a legacy i2c_driver and a
new-style i2c_driver so far, this mechanism makes it possible to get
rid of the legacy i2c_driver and implement both enumerated and
detected device support with just one (new-style) i2c_driver.

Here is a quick conversion guide for these drivers, step by step:

* Delete the legacy driver definition, registration and removal.
  Delete the attach_adapter and detach_client methods of the legacy
  driver.

* Change the prototype of the legacy detect function from
    static int foo_detect(struct i2c_adapter *adapter, int address, int kind);
  to
    static int foo_detect(struct i2c_client *client, int kind,
    			  struct i2c_board_info *info);

* Set the new-style driver detect callback to this new function, and
  set its address_data to &amp;addr_data (addr_data is generally provided
  by I2C_CLIENT_INSMOD.)

* Add the appropriate class to the new-style driver. This is
  typically the class the legacy attach_adapter method was checking
  for. Class checking is now mandatory (done by i2c-core.) See
  &lt;linux/i2c.h&gt; for the list of available classes.

* Remove the i2c_client allocation and freeing from the detect
  function. A pre-allocated client is now handed to you by i2c-core,
  and is freed automatically.

* Make the detect function fill the type field of the i2c_board_info
  structure it was passed as a parameter, and return 0, on success. If
  the detection fails, return -ENODEV.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Export the i2c_bus_type symbol</title>
<updated>2008-07-14T20:38:35+00:00</updated>
<author>
<name>Jon Smirl</name>
<email>jonsmirl@gmail.com</email>
</author>
<published>2008-07-14T20:38:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e9ca9eb9d7fc7bf3dc3cec5ba7edb089c4625f7b'/>
<id>e9ca9eb9d7fc7bf3dc3cec5ba7edb089c4625f7b</id>
<content type='text'>
Export the root of the i2c bus so that PowerPC device tree code can
iterate over devices on the i2c bus.

Signed-off-by: Jon Smirl &lt;jonsmirl@gmail.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Export the root of the i2c bus so that PowerPC device tree code can
iterate over devices on the i2c bus.

Signed-off-by: Jon Smirl &lt;jonsmirl@gmail.com&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Let bus drivers add SPD to their class</title>
<updated>2008-07-14T20:38:29+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-07-14T20:38:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3401b2fff38fbb8b73ea6bcc69a8370ae5d2a7a0'/>
<id>3401b2fff38fbb8b73ea6bcc69a8370ae5d2a7a0</id>
<content type='text'>
Let general purpose I2C/SMBus bus drivers add SPD to their class. Once
this is done, we will be able to tell the eeprom driver to only probe
for SPD EEPROMs and similar on these buses.

Note that I took a conservative approach here, adding I2C_CLASS_SPD to
many drivers that have no idea whether they can host SPD EEPROMs or not.
This is to make sure that the eeprom driver doesn't stop probing buses
where SPD EEPROMs or equivalent live.

So, bus driver maintainers and users should feel free to remove the SPD
class from drivers those buses never have SPD EEPROMs or they don't
want the eeprom driver to bind to them. Likewise, feel free to add the
SPD class to any bus driver I might have missed.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let general purpose I2C/SMBus bus drivers add SPD to their class. Once
this is done, we will be able to tell the eeprom driver to only probe
for SPD EEPROMs and similar on these buses.

Note that I took a conservative approach here, adding I2C_CLASS_SPD to
many drivers that have no idea whether they can host SPD EEPROMs or not.
This is to make sure that the eeprom driver doesn't stop probing buses
where SPD EEPROMs or equivalent live.

So, bus driver maintainers and users should feel free to remove the SPD
class from drivers those buses never have SPD EEPROMs or they don't
want the eeprom driver to bind to them. Likewise, feel free to add the
SPD class to any bus driver I might have missed.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Let framebuffer drivers set their I2C bus class to DDC</title>
<updated>2008-07-14T20:38:28+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-07-14T20:38:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c1b6b4f2342d073698dfc2547240c35045a1d00e'/>
<id>c1b6b4f2342d073698dfc2547240c35045a1d00e</id>
<content type='text'>
Let framebuffer drivers set their I2C bus class to DDC. Once this is
done, we will be able to tell the eeprom driver to only probe for
EDID EEPROMs on these buses.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let framebuffer drivers set their I2C bus class to DDC. Once this is
done, we will be able to tell the eeprom driver to only probe for
EDID EEPROMs on these buses.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Update stray references to smbus_access</title>
<updated>2008-07-14T20:38:24+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-07-14T20:38:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ae7193f7fa3e1735ab70807eb6e35a2a6575623f'/>
<id>ae7193f7fa3e1735ab70807eb6e35a2a6575623f</id>
<content type='text'>
That function is actually named i2c_smbus_xfer.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
That function is actually named i2c_smbus_xfer.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Delete unused function i2c_smbus_write_quick</title>
<updated>2008-07-14T20:38:23+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-07-14T20:38:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=67c2e66571c383404a5acd08189194da660da942'/>
<id>67c2e66571c383404a5acd08189194da660da942</id>
<content type='text'>
Function i2c_smbus_write_quick has no users left, so we can delete it.

Also update the list of these helper functions which are gone but
could be added back if needed.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Function i2c_smbus_write_quick has no users left, so we can delete it.

Also update the list of these helper functions which are gone but
could be added back if needed.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Fix bad hint about irqs in i2c.h</title>
<updated>2008-07-01T20:38:18+00:00</updated>
<author>
<name>Wolfram Sang</name>
<email>w.sang@pengutronix.de</email>
</author>
<published>2008-07-01T20:38:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8e29da9ee8958cc17e27f4053420f1c982614793'/>
<id>8e29da9ee8958cc17e27f4053420f1c982614793</id>
<content type='text'>
i2c.h mentions -1 as a not-issued irq. This false hint was taken by
of_i2c and caused crashes. Don't give any advice as 'no irq' is not
consistent across all architectures yet and it is not needed internally
by the i2c-core.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
i2c.h mentions -1 as a not-issued irq. This false hint was taken by
of_i2c and caused crashes. Don't give any advice as 'no irq' is not
consistent across all architectures yet and it is not needed internally
by the i2c-core.

Signed-off-by: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Kill the old driver matching scheme</title>
<updated>2008-05-18T18:49:41+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-05-18T18:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eb8a79080984eb9819406a55e4dd17043c380a09'/>
<id>eb8a79080984eb9819406a55e4dd17043c380a09</id>
<content type='text'>
Remove the old driver_name/type scheme for i2c driver matching. Only the
standard aliasing model will be used from now on.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove the old driver_name/type scheme for i2c driver matching. Only the
standard aliasing model will be used from now on.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Match dummy devices by type</title>
<updated>2008-05-11T18:37:06+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-05-11T18:37:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=60b129d7bfa3e20450816983bd52c49bb0bc1c21'/>
<id>60b129d7bfa3e20450816983bd52c49bb0bc1c21</id>
<content type='text'>
As the old driver_name/type matching scheme is going away soon, change
the dummy device mechanism to use the new matching scheme.

This has the downside that dummy i2c clients can no longer choose
their name, they'll all appear as "dummy" in sysfs and in log
messages. I don't think it is a problem in practice though, as there
is little reason to use these i2c clients to log messages.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As the old driver_name/type matching scheme is going away soon, change
the dummy device mechanism to use the new matching scheme.

This has the downside that dummy i2c clients can no longer choose
their name, they'll all appear as "dummy" in sysfs and in log
messages. I don't think it is a problem in practice though, as there
is little reason to use these i2c clients to log messages.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>i2c: Convert most new-style drivers to use module aliasing</title>
<updated>2008-04-29T21:11:40+00:00</updated>
<author>
<name>Jean Delvare</name>
<email>khali@linux-fr.org</email>
</author>
<published>2008-04-29T21:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3760f736716f74bdc62a4ba5406934338da93eb2'/>
<id>3760f736716f74bdc62a4ba5406934338da93eb2</id>
<content type='text'>
Based on earlier work by Jon Smirl and Jochen Friedrich.

Update most new-style i2c drivers to use standard module aliasing
instead of the old driver_name/type driver matching scheme. I've
left the video drivers apart (except for SoC camera drivers) as
they're a bit more diffcult to deal with, they'll have their own
patch later.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Jon Smirl &lt;jonsmirl@gmail.com&gt;
Cc: Jochen Friedrich &lt;jochen@scram.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Based on earlier work by Jon Smirl and Jochen Friedrich.

Update most new-style i2c drivers to use standard module aliasing
instead of the old driver_name/type driver matching scheme. I've
left the video drivers apart (except for SoC camera drivers) as
they're a bit more diffcult to deal with, they'll have their own
patch later.

Signed-off-by: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Jon Smirl &lt;jonsmirl@gmail.com&gt;
Cc: Jochen Friedrich &lt;jochen@scram.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
