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