Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Peter Tyser | 9902e42 | 2008-12-17 16:36:21 -0600 | [diff] [blame] | 2 | /* |
| 3 | * Copyright 2008 Extreme Engineering Solutions, Inc. |
Peter Tyser | 9902e42 | 2008-12-17 16:36:21 -0600 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef __PCA953X_H_ |
| 7 | #define __PCA953X_H_ |
| 8 | |
| 9 | #define PCA953X_IN 0x00 |
| 10 | #define PCA953X_OUT 0x01 |
| 11 | #define PCA953X_POL 0x02 |
| 12 | #define PCA953X_CONF 0x03 |
| 13 | |
| 14 | #define PCA953X_OUT_LOW 0 |
| 15 | #define PCA953X_OUT_HIGH 1 |
| 16 | #define PCA953X_POL_NORMAL 0 |
| 17 | #define PCA953X_POL_INVERT 1 |
| 18 | #define PCA953X_DIR_OUT 0 |
| 19 | #define PCA953X_DIR_IN 1 |
| 20 | |
| 21 | int pca953x_set_val(u8 chip, uint mask, uint data); |
| 22 | int pca953x_set_pol(u8 chip, uint mask, uint data); |
| 23 | int pca953x_set_dir(u8 chip, uint mask, uint data); |
| 24 | int pca953x_get_val(u8 chip); |
| 25 | |
| 26 | #endif /* __PCA953X_H_ */ |