linux/include/linux/i2c-algo-pca.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_I2C_ALGO_PCA_H
#define _LINUX_I2C_ALGO_PCA_H

/* Chips known to the pca algo */
#define I2C_PCA_CHIP_9564
#define I2C_PCA_CHIP_9665

/* Internal period for PCA9665 oscilator */
#define I2C_PCA_OSC_PER

/* Clock speeds for the bus for PCA9564*/
#define I2C_PCA_CON_330kHz
#define I2C_PCA_CON_288kHz
#define I2C_PCA_CON_217kHz
#define I2C_PCA_CON_146kHz
#define I2C_PCA_CON_88kHz
#define I2C_PCA_CON_59kHz
#define I2C_PCA_CON_44kHz
#define I2C_PCA_CON_36kHz

/* PCA9564 registers */
#define I2C_PCA_STA
#define I2C_PCA_TO
#define I2C_PCA_DAT
#define I2C_PCA_ADR
#define I2C_PCA_CON

/* PCA9665 registers */
#define I2C_PCA_INDPTR
#define I2C_PCA_IND

/* PCA9665 indirect registers */
#define I2C_PCA_ICOUNT
#define I2C_PCA_IADR
#define I2C_PCA_ISCLL
#define I2C_PCA_ISCLH
#define I2C_PCA_ITO
#define I2C_PCA_IPRESET
#define I2C_PCA_IMODE

/* PCA9665 I2C bus mode */
#define I2C_PCA_MODE_STD
#define I2C_PCA_MODE_FAST
#define I2C_PCA_MODE_FASTP
#define I2C_PCA_MODE_TURBO


#define I2C_PCA_CON_AA
#define I2C_PCA_CON_ENSIO
#define I2C_PCA_CON_STA
#define I2C_PCA_CON_STO
#define I2C_PCA_CON_SI
#define I2C_PCA_CON_CR

/**
 * struct pca_i2c_bus_settings - The configured PCA i2c bus settings
 * @mode: Configured i2c bus mode
 * @tlow: Configured SCL LOW period
 * @thi: Configured SCL HIGH period
 * @clock_freq: The configured clock frequency
 */
struct pca_i2c_bus_settings {};

struct i2c_algo_pca_data {};

int i2c_pca_add_bus(struct i2c_adapter *);
int i2c_pca_add_numbered_bus(struct i2c_adapter *);

#endif /* _LINUX_I2C_ALGO_PCA_H */