summaryrefslogtreecommitdiff
path: root/Documentation/i2c
AgeCommit message (Collapse)Author
2008-10-30i2c: The i2c mailing list is movingJean Delvare
Replace all references to the old i2c mailing list. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-22i2c: Update and clean up writing-clients documentJean Delvare
* Strip trailing white space. * Remove out-of-date or irrelevant parts. * Insist on the fact that command is deprecated. * Fix spelling mistakes and typos. * Reformat code examples and function prototypes to comply with the kernel coding style. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-22i2c: Delete legacy model documentationJean Delvare
The legacy i2c binding model is deprecated and will be removed soon, so we no longer need to document it. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-22i2c: Constify i2c_get_clientdata's parameterJean Delvare
i2c_get_clientdata doesn't change the i2c_client it is passed as a parameter, so it can be constified. Same for i2c_get_adapdata. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-22i2c: Delete outdated client porting guideJean Delvare
The document describing how to port i2c chip drivers from Linux 2.4 to Linux 2.6 is outdated. As I suspect that most drivers that had to be ported have already been by now, I do not want to spend time updating it. Let's just delete it instead. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-22i2c-i801: Add support for Intel Ibex PeakSeth Heasley
Adds the Intel Ibex Peak (PCH) SMBus Controller Device IDs. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c: Restore i2c_smbus_process_call functionPrakash Mortha
Restore the i2c_smbus_process_call() as one driver (for the Micronas MAP5401) will need it soon. [JD: Update documentation accordingly.] Signed-off-by: Prakash Mortha <pmortha@escient.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c: Document the implementation details of the /dev interfaceJean Delvare
I wrote this explanation to answer a question on the i2c mailing list, and thought it would be good to have in the kernel documentation. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c: Improve dev-interface documentationJean Delvare
* Clarify some points. * Point developers to i2c-tools instead of lm_sensors. * Fix coding style in code examples. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-10-14i2c-viapro: Add VX800/VX820 supportRudolf Marek
Thanks to new datasheets published on http://linux.via.com.tw we can now add support for VX800/VX820 chipsets. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-28i2c: Documentation: upgrading clients HOWTOBen Dooks
Add a document describing how i2c clients on Linux 2.6 can be moved from the old to the new driver model. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-07-16i2c: Convert the max6875 driver to a new-style i2c driverJean Delvare
The new-style max6875 driver implements the optional detect() callback to cover the use cases of the legacy driver. I'm curious if anyone really needs this though, so it might be removed in the feature. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16i2c: Convert the pca9539 driver to a new-style i2c driverJean Delvare
The new-style pca9539 driver implements the optional detect() callback to cover the use cases of the legacy driver. Warning: users will now have to use the force module parameter to get the driver to attach to their device. That's not a bad thing as these devices can't be detected anyway. Note that this doesn't change the fact that this driver is deprecated in favor of gpio/pca953x. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16i2c: Convert the pcf8575 driver to a new-style i2c driverJean Delvare
The new-style pcf8575 driver implements the optional detect() callback to cover the use cases of the legacy driver. Warning: users will now have to use the force module parameter to get the driver to attach to their device. That's not a bad thing as these devices can't be detected anyway. Note that this doesn't change the fact that this driver is deprecated in favor of gpio/pcf857x. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-16i2c: Convert the pcf8574 driver to a new-style i2c driverJean Delvare
The new-style pcf8574 driver implements the optional detect() callback to cover the use cases of the legacy driver. Warning: users will now have to use the force module parameter to get the driver to attach to their device. That's not a bad thing as these devices can't be detected anyway. Note that this doesn't change the fact that this driver is deprecated in favor of gpio/pcf857x. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-14i2c: Add detection capability to new-style driversJean Delvare
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 &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 <linux/i2c.h> 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 <khali@linux-fr.org>
2008-07-14i2c: Delete unused function i2c_smbus_write_quickJean Delvare
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 <khali@linux-fr.org>
2008-07-14i2c-core: Return -Errno, not -1David Brownell
More updates to the I2C stack's fault reporting: make the core stop returning "-1" (usually "-EPERM") for all faults. Instead, pass lower level fault code up the stack, or return some appropriate errno. This patch happens to touch almost exclusively SMBus calls. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-14i2c: Document standard fault codesDavid Brownell
Create Documentation/i2c/fault-codes to help standardize fault/error code usage in the I2C stack. It turns out that returning -1 (-EPERM) for everything was not at all helpful. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-14i2c: Remove 3 deprecated bus driversAdrian Bunk
This patch contains the scheduled removal of i2c-i810, i2c-prosavage and i2c-savage4. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-07-01i2c: Documentation: fix device matching descriptionBen Dooks
The matching process described for new style clients in Documentation/i2c/writing-clients is classed as out-of-date as it requires the presence of an .id_table entry in the driver's i2c_driver entry. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-05-11i2c: Improve the functionality documentationJean Delvare
Attempt to make the documentation about the I2C/SMBus functionality checking API clearer. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-05-11i2c: Improve smbus-protocol documentationDavid Brownell
Improve the smbus-protocol documentation file somewhat: - Use the names of the SMBus protocol operations (from the 2.0 specification), not made-up-for-Linux names. - Add the name of the call used to execute each operation ... and point out that there are mismatches, where functions execute different protocol operations than their names specify. The most confusing examples are that "Read Byte" isn't executed by i2c_smbus_read_byte(), and that "Write Byte" isn't executed by i2c_smbus_write_byte(). When coding, that's not as bad as it may seem; but that case would seem to be worth fixing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-04-29i2c: Add support for device alias namesJean Delvare
Based on earlier work by Jon Smirl and Jochen Friedrich. This patch allows new-style i2c chip drivers to have alias names using the official kernel aliasing system and MODULE_DEVICE_TABLE(). At this point, the old i2c driver binding scheme (driver_name/type) is still supported. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Jochen Friedrich <jochen@scram.de> Cc: Jon Smirl <jonsmirl@gmail.com> Cc: Kay Sievers <kay.sievers@vrfy.org>
2008-02-24i2c-i801: Add support for the ICH10Gaston, Jason D
Add the Intel ICH10 SMBus Controller DeviceID's and updates Tolapai support. Signed-off-by: Jason Gaston <jason.d.gaston@intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-02-07hwmon: Update the lm-sensors website addressJean Delvare
It's about time to reflect the move of the lm-sensors project to lm-sensors.org. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
2008-02-05deprecate obsolete pca9539 drivereric miao
Use drivers/gpio/pca9539.c instead. Signed-off-by: eric miao <eric.miao@marvell.com> Acked-by: Ben Gardner <bgardner@wabtec.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Philipp Zabel <philipp.zabel@gmail.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-27i2c-viapro: Add support for the VT8237SJean Delvare
Add support for another variant of the VT8237. I couldn't test I2C block support but I assume it is present as well. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-27i2c-i801: Implement I2C block read supportJean Delvare
I2C block read is supported since the ICH5. I couldn't get it to work using the block buffer, so it's using the old-style byte-by-byte mode for now. Note: I'm also updating the driver author... The i2c-i801 driver was really written by Mark Studebaker, even though he based his work on the i2c-piix4 driver which was written by Philip Edelbrock. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-27i2c: normal_i2c can be made const (remaining drivers)Jean Delvare
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-27i2c-stub: Use a single array for byte and word operationsJean Delvare
This mimics the behavior of actual SMBus chips better. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Mark M. Hoffman <mhoffman@lightlink.com>
2008-01-27i2c-stub: Mention the existence of an helper scriptJean Delvare
There's a new script named i2c-stub-from-dump that can be very helpful when working with the i2c-stub driver. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2008-01-27i2c: Add support for the PCF8575 chipBart Van Assche
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-12-12i2c: Delete an outdated piece of documentationJean Delvare
I'm amazed that this old piece of documentation managed to survive until today. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-10-19more UTF-8 conversionsMarcin Garski
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-13i2c: Rename the PEC functionality bitDavid Brownell
Rename I2C_FUNC_SMBUS_HWPEC_CALC as I2C_FUNC_SMBUS_PEC, and list that functionality as always available through the software implementation. Update documentation accordingly (and list similar requirements). The way it's currently packaged doesn't present the capability in a useful way. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-10-13i2c-stub: Support multiple chipsJean Delvare
Add support for multiple chips to i2c-stub. I've changed the memory allocation scheme from static to dynamic, so that we don't waste too much memory. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Mark M. Hoffman <mhoffman@lightlink.com>
2007-10-13i2c-i801: Add support for the Intel Tolapai SMBusJason Gaston
Add the Intel Tolapai SMBus Controller DID. Signed-off-by: Jason Gaston <jason.d.gaston@intel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-10-13i2c/pcf8574: No arbitrary initializationJean Delvare
Do not initialize the PCF8574 with an arbitrary value. Users will have to write the initial value to sysfs themselves. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Aurelien Jarno <aurelien@aurel32.net>
2007-08-31i2c-piix4: Fix SB700 PCI device IDShane Huang
We find that SB700 and SB800 use the same SMBus device ID as SB600, which is 0x4385, instead of the already submitted 0x4395. Besides removing the wrong SB700 device ID, add SB800 support to kernel, by renaming the PCI_DEVICE_ID_ATI_IXP600_SMBUS into PCI_DEVICE_ID_ATI_SBX00_SMBUS. Signed-off-by: Shane Huang <shane.huang@amd.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12i2c-rpx: RemoveJean Delvare
This driver has been broken forever. It depends on i2c-algo-8xx which has never been in the mainline kernel. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-12i2c: New bus driver for the TAOS evaluation modulesJean Delvare
This is a new I2C bus driver for the TAOS evaluation modules. Developped and tested on the TAOS TSL2550 EVM. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-12i2c-i801: Use the internal 32-byte buffer on ICH4+Oleg Ryjkov
Add an ability to utilize the internal SRAM buffer on ICH4 and newer host controllers to speed up execution of block operations. I've split the code so that it is more clear which block transaction is performed. First of all the host controller's type is identified. isich4 is set when we think that the controller has the internal buffer. Then, before every block transaction, if isich4 is set, we attempt to enable the E32B bit in SMBAUXCTL register. Signed-off-by: Oleg Ryjkov <olegr@google.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-12i2c-piix4: Add support for the ATI SB700Henry Su
Add the SMBus device ID for ATI SB700. Signed-off-by: Henry Su <Henry.su@amd.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-12i2c: Fix the i2c_smbus_read_i2c_block_data() prototypeJean Delvare
Let the drivers specify how many bytes they want to read with i2c_smbus_read_i2c_block_data(). So far, the block count was hard-coded to I2C_SMBUS_BLOCK_MAX (32), which did not make much sense. Many driver authors complained about this before, and I believe it's about time to fix it. Right now, authors have to do technically stupid things, such as individual byte reads or full-fledged I2C messaging, to work around the problem. We do not want to encourage that. I even found that some bus drivers (e.g. i2c-amd8111) already implemented I2C block read the "right" way, that is, they didn't follow the old, broken standard. The fact that it was never noticed before just shows how little i2c_smbus_read_i2c_block_data() was used, which isn't that surprising given how broken its prototype was so far. There are some obvious compatiblity considerations: * This changes the i2c_smbus_read_i2c_block_data() prototype. Users outside the kernel tree will notice at compilation time, and will have to update their code. * User-space has access to i2c_smbus_xfer() directly using i2c-dev, so the changed expectations would affect tools such as i2cdump. In order to preserve binary compatibility, we give I2C_SMBUS_I2C_BLOCK_DATA a new numeric value, and define I2C_SMBUS_I2C_BLOCK_BROKEN with the old numeric value. When i2c-dev receives a transaction with the old value, it can convert it to the new format on the fly. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-07-12i2c: Delete outdated x1205 driver documentationJean Delvare
The x1205 driver moved to the RTC subsystem and was significantly modified since then, so just delete the outdated documentation. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Alessandro Zummo <alessandro.zummo@towertech.it>
2007-05-09documentation: convert the Documentation directory to UTF-8John Anthony Kazos Jr
Convert files within the Documentation directory to UTF-8. Adrian Bunk: small additional fixes Signed-off-by: John Anthony Kazos Jr. <jakj@j-a-k-j.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-01i2c: Documentation updateJean Delvare
Make the documentation on how to write and port i2c drivers more in line with the current state of things: * i2c-isa is deprecated and soon gone, so stop advertising it. * Drop many sensors-specific references. Most of them were outdated anyway. * Update the example code to reflect the recent and not-so-recent API and coding style preference changes. * Simplify the example init and cleanup functions. This should make things less complex to understand for newcomers. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: Make i2c_del_driver a void functionJean Delvare
Make i2c_del_driver a void function, like all other driver removal functions. It always returned 0 even when errors occured, and nobody ever actually checked the return value anyway. And we cannot fail a module removal anyway. Signed-off-by: Jean Delvare <khali@linux-fr.org>
2007-05-01i2c: Document i2c_new_device()Jean Delvare
Document the new i2c_new_device(), i2c_new_probed_device() and i2c_unregister_device() functions. Signed-off-by: Jean Delvare <khali@linux-fr.org>