Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef MAX1600_H
0003 #define MAX1600_H
0004 
0005 struct gpio_desc;
0006 
0007 enum {
0008     MAX1600_GPIO_0VCC = 0,
0009     MAX1600_GPIO_1VCC,
0010     MAX1600_GPIO_0VPP,
0011     MAX1600_GPIO_1VPP,
0012     MAX1600_GPIO_MAX,
0013 
0014     MAX1600_CHAN_A,
0015     MAX1600_CHAN_B,
0016 
0017     MAX1600_CODE_LOW,
0018     MAX1600_CODE_HIGH,
0019 };
0020 
0021 struct max1600 {
0022     struct gpio_desc *gpio[MAX1600_GPIO_MAX];
0023     struct device *dev;
0024     unsigned int code;
0025 };
0026 
0027 int max1600_init(struct device *dev, struct max1600 **ptr,
0028     unsigned int channel, unsigned int code);
0029 
0030 int max1600_configure(struct max1600 *, unsigned int vcc, unsigned int vpp);
0031 
0032 #endif