GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / arch / arm / plat-samsung / include / plat / iic.h
blob133308bf595dcf775cf29626164e33ae02dedc25
1 /* arch/arm/plat-s3c/include/plat/iic.h
3 * Copyright 2004-2009 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk>
6 * S3C - I2C Controller platform_device info
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #ifndef __ASM_ARCH_IIC_H
14 #define __ASM_ARCH_IIC_H __FILE__
16 #define S3C_IICFLG_FILTER (1<<0) /* enable s3c2440 filter */
18 /**
19 * struct s3c2410_platform_i2c - Platform data for s3c I2C.
20 * @bus_num: The bus number to use (if possible).
21 * @flags: Any flags for the I2C bus (E.g. S3C_IICFLK_FILTER).
22 * @slave_addr: The I2C address for the slave device (if enabled).
23 * @frequency: The desired frequency in Hz of the bus. This is
24 * guaranteed to not be exceeded. If the caller does
25 * not care, use zero and the driver will select a
26 * useful default.
27 * @sda_delay: The delay (in ns) applied to SDA edges.
28 * @cfg_gpio: A callback to configure the pins for I2C operation.
30 struct s3c2410_platform_i2c {
31 int bus_num;
32 unsigned int flags;
33 unsigned int slave_addr;
34 unsigned long frequency;
35 unsigned int sda_delay;
37 void (*cfg_gpio)(struct platform_device *dev);
40 /**
41 * s3c_i2c0_set_platdata - set platform data for i2c0 device
42 * @i2c: The platform data to set, or NULL for default data.
44 * Register the given platform data for use with the i2c0 device. This
45 * call copies the platform data, so the caller can use __initdata for
46 * their copy.
48 * This call will set cfg_gpio if is null to the default platform
49 * implementation.
51 * Any user of s3c_device_i2c0 should call this, even if it is with
52 * NULL to ensure that the device is given the default platform data
53 * as the driver will no longer carry defaults.
55 extern void s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *i2c);
56 extern void s3c_i2c1_set_platdata(struct s3c2410_platform_i2c *i2c);
57 extern void s3c_i2c2_set_platdata(struct s3c2410_platform_i2c *i2c);
59 /* defined by architecture to configure gpio */
60 extern void s3c_i2c0_cfg_gpio(struct platform_device *dev);
61 extern void s3c_i2c1_cfg_gpio(struct platform_device *dev);
62 extern void s3c_i2c2_cfg_gpio(struct platform_device *dev);
64 #endif /* __ASM_ARCH_IIC_H */