summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
Commit message (Collapse)AuthorAgeFilesLines
* i2c: Let new-style drivers implement attach_adapterJean Delvare2009-04-131-2/+1
| | | | | | | | | While it isn't the way the standard device binding model works, it is OK for new-style drivers to implement attach_adapter. It may help convert the renaming legacy drivers to new style drivers faster. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: David Brownell <dbrownell@users.sourceforge.net>
* i2c-voodoo3: Deprecate in favor of tdfxfbJean Delvare2009-04-131-2/+4
| | | | | | | | Support for I2C/DDC was recently added to the tdfxfb driver, which means that the i2c-voodoo3 driver can be deprecated. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Krzysztof Helt <krzysztof.h1@wp.pl>
* i2c-algo-pca: Fix use of uninitialized variable in debug messageJean Delvare2009-04-131-1/+1
| | | | | | | | A recent change broke debugging of pca_xfer(), fix it. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
* i2c: imx: Make disable_delay a per-device variableWolfram Sang2009-04-071-4/+3
| | | | | | | | | | | 'disable_delay' was static which is wrong as it is calculated using the per-device bus speed. This patch turns 'disable_delay' into a per-device variable. Reported-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Darius Augulis <augulis.darius@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* i2c: xtensa s6000 i2c driverOskar Schirmer2009-04-074-0/+497
| | | | | | | | Support for the s6000 on-chip i2c controller. Signed-off-by: Oskar Schirmer <os@emlix.com> Signed-off-by: Daniel Glöckner <dg@emlix.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* i2c: i2c-mpc: make I2C bus speed configurableWolfgang Grandegger2009-04-071-20/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the I2C bus speed configurable by using the I2C node property "clock-frequency". If the property is not defined, the old fixed clock settings will be used for backward comptibility. The generic I2C clock properties, especially the CPU-specific source clock pre-scaler are defined via the OF match table: static const struct of_device_id mpc_i2c_of_match[] = { ... {.compatible = "fsl,mpc8543-i2c", .data = &(struct fsl_i2c_match_data) { .setclock = mpc_i2c_setclock_8xxx, .prescaler = 2, }, }, The "data" field defines the relevant I2C setclock function and the relevant pre-scaler for the I2C source clock frequency. It uses arch-specific tables and functions to determine resonable Freqency Divider Register (fdr) values for MPC83xx, MPC85xx, MPC86xx, MPC5200 and MPC5200B. The i2c->flags field and the corresponding FSL_I2C_DEV_* definitions have been removed as they are obsolete. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* i2c: i2c-mpc: use dev based printout functionWolfgang Grandegger2009-04-071-14/+17
| | | | | | | | This patch used the dev_dbg, dev_err, etc. functions for debug and error output instead of printk and pr_debug. Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* i2c: i2c-mpc: various coding style fixesWolfgang Grandegger2009-04-071-17/+18
| | | | | | | | Fix errors reported by checkpatch (indention, long lines, trailing white space, etc.). Signed-off-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* i2c: imx: Add missing request_mem_region in probe()Darius Augulis2009-04-071-5/+13
| | | | | | Signed-off-by: Darius Augulis <augulis.darius@gmail.com> [ben-linux@fluff.org: fix minor patch fault in remove] Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* i2c: i2c-s3c2410: Initialise Samsung I2C controller earlyMark Brown2009-04-071-2/+1
| | | | | | | | This is required in order to ensure that core system devices such as voltage regulators attached via I2C are avaiable early in boot. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* i2c-s3c2410: Simplify bus frequency calculationDaniel Silverstone2009-04-071-39/+11
| | | | | | | | | | | | | | | | | The platform data for the i2c-s3c2410 driver used to allow a min, max and desired frequency for the I2C bus. This patch reduces it to simply a desired frequency ceiling and corrects all the uses of the platform data appropriately. This means, for example, that on a system with a 66MHz fclk, a request for 100KHz will achieve 65KHz which is safe and acceptable, rather than 378KHz which it would have achieved without this change. Signed-off-by: Simtec Linux Team <linux@simtec.co.uk> Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk> [ben-linux@fluff.org: tidy subject and description] Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* i2c-s3c2410: sda_delay should be in ns, not clock ticksBen Dooks2009-04-071-5/+19
| | | | | | | The sda_delay field should be specified in ns, not in clock ticks as when using cpufreq we could be changing the bus rate. Signed-off-by: Ben Dooks <ben@simtec.co.uk>
* i2c: iMX/MXC supportDarius Augulis2009-04-073-0/+628
| | | | | | | | | | Implementation of I2C Adapter/Algorithm Driver for I2C Bus integrated in Freescale's i.MX/MXC processors. Signed-off-by: Darius Augulis <augulis.darius@gmail.com> Tested-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* i2c: Delete unused i2c-algo-sgi helper moduleJean Delvare2009-04-063-184/+0
| | | | | | | The i2c-algo-sgi code was merged into the vino driver, so we can delete it now. Signed-off-by: Jean Delvare <khali@linux-fr.org>
* Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds2009-03-304-339/+77
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: hwmon: (fschmd) Add support for the FSC Hades IC hwmon: (fschmd) Add support for the FSC Syleus IC i2c-i801: Instantiate FSC hardware montioring chips dmi: Let dmi_walk() users pass private data hwmon: Define a standard interface for chassis intrusion detection Move the pcf8591 driver to hwmon hwmon: (w83627ehf) Only expose in6 or temp3 on the W83667HG hwmon: (w83627ehf) Add support for W83667HG hwmon: (w83627ehf) Invert fan pin variables logic hwmon: (hdaps) Fix Thinkpad X41 axis inversion hwmon: (hdaps) Allow inversion of separate axis hwmon: (ds1621) Clean up documentation hwmon: (ds1621) Avoid unneeded register access hwmon: (ds1621) Clean up register access hwmon: (ds1621) Reorder code statements
| * i2c-i801: Instantiate FSC hardware montioring chipsHans de Goede2009-03-301-0/+77
| | | | | | | | | | | | | | | | | | | | | | Detect various FSC hwmon IC's based on DMI tables and then let the i2c-i801 driver instantiate the i2c client devices. Note that some of the info in the added table is indentical for all rows, still this is kept in the table to keep the code general and thus (hopefully) easily extensible in the future. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * Move the pcf8591 driver to hwmonJean Delvare2009-03-303-339/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Directory drivers/i2c/chips is going away, so drivers there must find new homes. For the pcf8591 driver, the best choice seems to be the hwmon subsystem. While the Philips PCF8591 device isn't a typical hardware monitoring chip, its DAC interface is compatible with the hwmon one, so it fits somewhat. If a better subsystem is ever created for ADC/DAC chips, the driver could be moved there. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Aurelien Jarno <aurelien@aurel32.net>
* | Merge commit 'origin/master' into nextBenjamin Herrenschmidt2009-03-3019-290/+546
|\ \ | |/ | | | | | | | | Manual merge of: arch/powerpc/include/asm/elf.h drivers/i2c/busses/i2c-mpc.c
| * Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6Linus Torvalds2009-03-2816-261/+514
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c-core: Some style cleanups i2c-piix4: Add support for the Broadcom HT1100 chipset i2c-piix4: Add support to SB800 SMBus changes i2c-pca-platform: Use defaults if no platform_data given i2c-algo-pca: Use timeout for checking the state machine i2c-algo-pca: Rework waiting for a free bus i2c-algo-pca: Add PCA9665 support i2c: Adapt debug macros for KERN_* constants i2c-davinci: Fix timeout handling i2c: Adapter timeout is in jiffies i2c: Set a default timeout value for all adapters i2c: Add missing KERN_* constants to printks i2c-algo-pcf: Handle timeout correctly i2c-algo-pcf: Style cleanups eeprom/at24: Remove EXPERIMENTAL i2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79 i2c: Clarify which clients are auto-removed i2c: Let checkpatch shout on users of the legacy model i2c: Document the different ways to instantiate i2c devices
| | * i2c-core: Some style cleanupsZhenwen Xu2009-03-281-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some lines over 80. The printk(KERN_ERR ... ) should be dev_err. And some blankspace should be deleted. Signed-off-by: Zhenwen Xu <helight.xu@gmail.com> Signed-off-by: Jean Delvare <khlai@linux-fr.org>
| | * i2c-piix4: Add support for the Broadcom HT1100 chipsetFlavio Leitner2009-03-282-1/+4
| | | | | | | | | | | | | | | | | | | | | Add support for the Broadcom HT1100 LD chipset (SMBus function.) Signed-off-by: Flavio Leitner <fbl@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| | * i2c-piix4: Add support to SB800 SMBus changesShane Huang2009-03-281-1/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the AMD SB800 Family series of products. Major changes include the changes to addressing the SMBus registers at different location from the locations in the previous compatible parts from AMD such as SB400/SB600/SB700. For SB800, the main features and register definitions of SMBus and other interfaces are still compatible with the previous products with the only change being in how to access the internal registers for these blocks. Signed-off-by: Shane Huang <shane.huang@amd.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| | * i2c-pca-platform: Use defaults if no platform_data givenWolfram Sang2009-03-281-7/+12
| | | | | | | | | | | | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| | * i2c-algo-pca: Use timeout for checking the state machineWolfram Sang2009-03-283-33/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now timeout also if the state machine does not change within the given time. For that, the driver-specific completion-functions are extended to return true or false depending on the timeout. This then gets checked in the algorithm. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| | * i2c-algo-pca: Rework waiting for a free busWolfram Sang2009-03-282-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | Waiting for a free bus now accepts the timeout value in jiffies and does proper checking using time_before. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| | * i2c-algo-pca: Add PCA9665 supportMarco Aurelio da Costa2009-03-284-26/+185
| | | | | | | | | | | | | | | | | | | | | Add support for the PCA9665 I2C controller. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| | * i2c: Adapt debug macros for KERN_* constantsFrank Seidel2009-03-281-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to kerneljanitors todo list all printk calls (beginning a new line) should have an according KERN_* constant. Those are the changes to the debug macros in the i2c subsystem to meet this requirement. Also changing no-debug statements to raw printks again. Signed-off-by: Frank Seidel <frank@f-seidel.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Wolfram Sang <w.sang@pengutronix.de>
| | * i2c-davinci: Fix timeout handlingJean Delvare2009-03-281-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Properly set the adapter timeout value in jiffies, and then use that value in the driver, rather than a hard-coded constant. Signed-off-by: Jean Delvare <khali@linux-fr.org> Tested-by: Troy Kisky <troy.kisky@boundarydevices.com> Cc: Kevin Hilman <khilman@mvista.com>
| | * i2c: Adapter timeout is in jiffiesJean Delvare2009-03-284-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i2c_adapter.timeout is in jiffies. Fix all drivers which thought otherwise. It didn't really matter as long as the value was only used inside the driver, but soon i2c-core will use it too so it must have the proper unit. Note: for the i2c-mpc driver, this fixes a bug in polling mode. Timeout would trigger after 1 jiffy, which is most probably not what the author wanted. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Clifford Wolf <clifford@clifford.at> Acked-by: Sean MacLennan <smaclennan@pikatech.com> Cc: Stefan Roese <sr@denx.de> Acked-by: Lennert Buytenhek <kernel@wantstofly.org> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: Mark A. Greer <mgreer@mvista.com>
| | * i2c: Set a default timeout value for all adaptersJean Delvare2009-03-283-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting a default timeout value on a per-algo basis doesn't make any sense. Move the default value setting to i2c-core. Individual adapter drivers can specify a different (non-zero) value if they wish. Also express the timeout value in a way which results in the same duration regarless of the value of HZ. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
| | * i2c: Add missing KERN_* constants to printksFrank Seidel2009-03-284-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | According to kerneljanitors todo list all printk calls (beginning a new line) should have an according KERN_* constant. Those are the missing pieces here for the i2c subsystem. Signed-off-by: Frank Seidel <frank@f-seidel.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
| | * i2c-algo-pcf: Handle timeout correctlyRoel Kluin2009-03-281-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With a postfix decrement these timeouts reach -1 rather than 0, but after the loop it is tested whether they have become 0. As pointed out by Jean Delvare, the msg_num should be tested before the timeout. With the current order, you could exit with a timeout error while all the messages were successfully transferred. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Eric Brower <ebrower@gmail.com>
| | * i2c-algo-pcf: Style cleanupsRoel Kluin2009-03-281-135/+115
| | | | | | | | | | | | | | | | | | | | | | | | cleanup whitespace, fix comments and remove the unused STUB_I2C. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Eric Brower <ebrower@gmail.com>
| | * i2c-nforce2: Add support for MCP67, MCP73, MCP78S and MCP79Jean Delvare2009-03-281-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MCP78S and MCP79 appear to be compatible with the previous nForce chips as far as the SMBus controller is concerned. The MCP67 and MCP73 were not tested yet but I'd be very surprised if they weren't compatible too. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Oleg Ryjkov <olegr@olegr.ca> Cc: Malcolm Lalkaka <mlalkaka@gmail.com> Cc: Zbigniew Luszpinski <zbiggy@o2.pl>
| | * i2c: Clarify which clients are auto-removedJean Delvare2009-03-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | The automatic removal of i2c clients only affects the clients which were created automatically in the first place. Add a comment saying that to avoid any confusion. Signed-off-by: Jean Delvare <khali@linux-fr.org>
| * | Merge branch 'origin' into develRussell King2009-03-281-1/+1
| |\ \ | | |/ | | | | | | | | | Conflicts: sound/soc/pxa/pxa2xx-i2s.c
| | * Driver core: implement uevent suppress in kobjectMing Lei2009-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements uevent suppress in kobject and removes it from struct device, based on the following ideas: 1,Uevent sending should be one attribute of kobject, so suppressing it in kobject layer is more natural than in device layer. By this way, we can do it for other objects embedded with kobject. 2,It may save several bytes for each instance of struct device.(On my omap3(32bit ARM) based box, can save 8bytes per device object) This patch also introduces dev_set|get_uevent_suppress() helpers to set and query uevent_suppress attribute in case to help kobject as private part of struct device in future. [This version is against the latest driver-core patch set of Greg,please ignore the last version.] Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.hRussell King2009-03-251-1/+1
| | | | | | | | | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | Merge branch 'omap-clks3' into develRussell King2009-03-191-25/+22
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: arch/arm/mach-omap2/clock.c
| | * | [ARM] omap: i2c: remove conditional ick clocksRussell King2009-02-081-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By providing a dummy ick for OMAP1510 and OMAP310, we avoid having SoC conditional clock information in i2c-omap.c. Also, fix the error handling by making sure we propagate the error returned via clk_get(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * | [ARM] omap: i2c: remove armxor_ckRussell King2009-02-081-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On OMAP1, the I2C functional clock (fck) is the armxor_ck, so there's no need to get "armxor_ck" separately. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| | * | [ARM] omap: i2c: use short connection idsRussell King2009-02-081-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | | Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into develRussell King2009-03-138-11/+17
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | Conflicts: arch/arm/mach-at91/gpio.c
| * | | [ARM] 5394/1: Add static bus numbering support to i2c-versatileCatalin Marinas2009-02-191-2/+8
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | If dev->id is not -1, the platform code may use static bus numbering rather than dynamic. The patch also changes the i2c_versatile_init to a subsys_initcall rather than module_init to make sure it is initialised before the I2C devices initialisation. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | Merge commit 'origin/master' into nextBenjamin Herrenschmidt2009-03-118-11/+17
|\ \ \ | | |/ | |/|
| * | Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2009-03-031-2/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] fix lots of ARM __devexit sillyness [ARM] 5417/1: Set the correct cacheid for ARMv6 CPUs with ARMv7 style MMU [ARM] 5416/1: Use unused address in v6_early_abort [ARM] 5411/1: S3C64XX: Fix EINT unmask [ARM] at91: fix for Atmel AT91 powersaving [ARM] RiscPC: Fix etherh oops
| | * | [ARM] fix lots of ARM __devexit sillynessRussell King2009-03-031-2/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `iop_adma_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `mv_xor_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `mv64xxx_i2c_unmap_regs' referenced in section `.devinit.text' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `mv64xxx_i2c_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `orion_nand_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o `pxafb_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.devexit.text' of drivers/built-in.o Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
| * | Add i2c_board_info for RiscPC PCF8583Russell King2009-02-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the necessary i2c_board_info structure to fix the lack of PCF8583 RTC on RiscPC. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Alessandro Zummo <a.zummo@towertech.it>
| * | i2c: Make sure i2c_algo_bit_data.timeout is HZ-independentJean Delvare2009-02-243-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | i2c_algo_bit_data.timeout is supposed to be in jiffies, so drivers should use set this value in terms of HZ. Ultimately I think this field should be discarded in favor of i2c_adapter.timeout, but that's left for a future patch. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Lennert Buytenhek <kernel@wantstofly.org> Acked-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
| * | i2c-dev: Clarify the unit of ioctl I2C_TIMEOUTJean Delvare2009-02-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit in which user-space can set the bus timeout value is jiffies for historical reasons (back when HZ was always 100.) This is however not good because user-space doesn't know how long a jiffy lasts. The timeout value should instead be set in a fixed time unit. Given the original value of HZ, this unit should be 10 ms, for compatibility. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Wolfram Sang <w.sang@pengutronix.de>
OpenPOWER on IntegriCloud