root/i2c/trunk/kernel/i2c-algo-pcf.h @ 3314

Revision 3314, 0.9 KB (checked in by frodo, 15 years ago)

Initial CVS commit of the new i2c project

Several things have changed compared to previous versions of Simon's
package. Please read IMPORTANT_CHANGES for more information.

It should compile and install again as a separate project. It will *not*
work (yet) in the lm_sensors tree.

The file INSTALL has not yet be written; but if you want to use this, please
examine the top of the Makefile, and issue `make all' followed by
`make install' (regardless of the build system used).

There are now two build systems: the old one, which needs write-access
to the kernel tree, and a lm_sensors-like one, which does not. You can
select them at the top of the main Makefile.

The patches we applied in the lm_sensors project to the i2c code have
not yet been applied.

Please examine the package, and offer comments where needed, especially
regarding changes made.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#ifndef ALGO_PCF_H
2#define AGLO_PCF_H 1
3
4/* --- Defines for pcf-adapters --------------------------------------- */
5#include "i2c.h"
6
7struct pcf_adapter {
8   char name[32];               /* give it a nice name                  */
9   unsigned int id;     /* not used yet, maybe later            */
10   void *data;          /* private data for lolevel routines    */
11   void (*setpcf) (void *data, int ctl, int val);
12   int  (*getpcf) (void *data, int ctl);
13   int  (*getown) (void *data);
14   int  (*getclock) (void *data);
15   void (*waitforpin) (void);     
16
17        /* administrative calls */
18        int (*client_register)(struct i2c_client *);
19        int (*client_unregister)(struct i2c_client *);
20
21        /* local settings */
22        int udelay;
23        int mdelay;
24        int timeout;
25
26};
27
28extern struct pcf_adapter *pcf_adaps[];
29
30#define PCF_ADAP_MAX    16
31
32int i2c_pcf_add_bus(struct pcf_adapter *);
33int i2c_pcf_del_bus(struct pcf_adapter *);
34
35#endif /* ALGO_PCF_H */
Note: See TracBrowser for help on using the browser.