summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/saa7146_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/common/saa7146_i2c.c')
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index d4c8446b8..fb876b03b 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -4,6 +4,7 @@
#endif
/* helper function */
+static
void my_wait(struct saa7146_dev *dev, long ms)
{
unsigned long timeout = jiffies + ((ms+9)/10);
@@ -23,6 +24,7 @@ u32 saa7146_i2c_func(struct i2c_adapter *adapter)
}
/* this function returns the status-register of our i2c-device */
+static inline
u32 saa7146_i2c_status(struct saa7146_dev *dev)
{
u32 iicsta = saa7146_read(dev, I2C_STATUS);
@@ -36,6 +38,7 @@ u32 saa7146_i2c_status(struct saa7146_dev *dev)
sent through the saa7146. have a look at the specifications p. 122 ff
to understand this. it returns the number of u32s to send, or -1
in case of an error. */
+static
int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op)
{
int h1, h2;
@@ -100,6 +103,7 @@ int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op)
which bytes were read through the adapter and write them back to the corresponding
i2c-message. but instead, we simply write back all bytes.
fixme: this could be improved. */
+static
int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op)
{
int i, j;
@@ -122,6 +126,7 @@ int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op)
}
/* this functions resets the i2c-device and returns 0 if everything was fine, otherwise -1 */
+static
int saa7146_i2c_reset(struct saa7146_dev *dev)
{
/* get current status */
@@ -186,6 +191,7 @@ int saa7146_i2c_reset(struct saa7146_dev *dev)
/* this functions writes out the data-byte 'dword' to the i2c-device.
it returns 0 if ok, -1 if the transfer failed, -2 if the transfer
failed badly (e.g. address error) */
+static
int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword)
{
int i = 0;
@@ -345,6 +351,7 @@ out:
}
/* utility functions */
+static
int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
{
struct saa7146_dev* dev = (struct saa7146_dev*)adapter->data;
@@ -356,11 +363,13 @@ int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
}
/* these are just for completeness */
+static
int saa7146_i2c_reg(struct i2c_client *client)
{
return 0;
}
+static
int saa7146_i2c_unreg(struct i2c_client *client)
{
return 0;
@@ -386,6 +395,7 @@ void saa7146_i2c_dec_use(struct i2c_adapter *adap)
/* i2c-adapter helper functions */
/* exported algorithm data */
+static
struct i2c_algorithm saa7146_algo = {
"saa7146 i2c algorithm",
I2C_ALGO_SAA7146,