Blame view

include/linux/i2c-mux-gpio.h 1.35 KB
92ed1a76c   Peter Korsgaard   i2c: Add generic ...
1
  /*
e7065e20d   Jean Delvare   i2c: Rename last ...
2
   * i2c-mux-gpio interface to platform code
92ed1a76c   Peter Korsgaard   i2c: Add generic ...
3
4
5
6
7
8
9
   *
   * Peter Korsgaard <peter.korsgaard@barco.com>
   *
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   */
e7065e20d   Jean Delvare   i2c: Rename last ...
10
11
  #ifndef _LINUX_I2C_MUX_GPIO_H
  #define _LINUX_I2C_MUX_GPIO_H
92ed1a76c   Peter Korsgaard   i2c: Add generic ...
12
13
  
  /* MUX has no specific idle mode */
e7065e20d   Jean Delvare   i2c: Rename last ...
14
  #define I2C_MUX_GPIO_NO_IDLE	((unsigned)-1)
92ed1a76c   Peter Korsgaard   i2c: Add generic ...
15
16
  
  /**
e7065e20d   Jean Delvare   i2c: Rename last ...
17
   * struct i2c_mux_gpio_platform_data - Platform-dependent data for i2c-mux-gpio
92ed1a76c   Peter Korsgaard   i2c: Add generic ...
18
19
20
21
22
   * @parent: Parent I2C bus adapter number
   * @base_nr: Base I2C bus number to number adapters from or zero for dynamic
   * @values: Array of bitmasks of GPIO settings (low/high) for each
   *	position
   * @n_values: Number of multiplexer positions (busses to instantiate)
eee543e82   Jean Delvare   i2c-mux: Add supp...
23
   * @classes: Optional I2C auto-detection classes
e7ee51405   Jean Delvare   i2c-mux-gpio: Add...
24
25
   * @gpio_chip: Optional GPIO chip name; if set, GPIO pin numbers are given
   *	relative to the base GPIO number of that chip
92ed1a76c   Peter Korsgaard   i2c: Add generic ...
26
27
28
29
   * @gpios: Array of GPIO numbers used to control MUX
   * @n_gpios: Number of GPIOs used to control MUX
   * @idle: Bitmask to write to MUX when idle or GPIO_I2CMUX_NO_IDLE if not used
   */
e7065e20d   Jean Delvare   i2c: Rename last ...
30
  struct i2c_mux_gpio_platform_data {
92ed1a76c   Peter Korsgaard   i2c: Add generic ...
31
32
33
34
  	int parent;
  	int base_nr;
  	const unsigned *values;
  	int n_values;
eee543e82   Jean Delvare   i2c-mux: Add supp...
35
  	const unsigned *classes;
e7ee51405   Jean Delvare   i2c-mux-gpio: Add...
36
  	char *gpio_chip;
92ed1a76c   Peter Korsgaard   i2c: Add generic ...
37
38
39
40
  	const unsigned *gpios;
  	int n_gpios;
  	unsigned idle;
  };
e7065e20d   Jean Delvare   i2c: Rename last ...
41
  #endif /* _LINUX_I2C_MUX_GPIO_H */