Lines Matching refs:chip
38 struct gpio_chip chip; member
42 static int octeon_gpio_dir_in(struct gpio_chip *chip, unsigned offset) in octeon_gpio_dir_in() argument
44 struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); in octeon_gpio_dir_in()
50 static void octeon_gpio_set(struct gpio_chip *chip, unsigned offset, int value) in octeon_gpio_set() argument
52 struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); in octeon_gpio_set()
58 static int octeon_gpio_dir_out(struct gpio_chip *chip, unsigned offset, in octeon_gpio_dir_out() argument
61 struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); in octeon_gpio_dir_out()
64 octeon_gpio_set(chip, offset, value); in octeon_gpio_dir_out()
73 static int octeon_gpio_get(struct gpio_chip *chip, unsigned offset) in octeon_gpio_get() argument
75 struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); in octeon_gpio_get()
84 struct gpio_chip *chip; in octeon_gpio_probe() local
91 chip = &gpio->chip; in octeon_gpio_probe()
109 pdev->dev.platform_data = chip; in octeon_gpio_probe()
110 chip->label = "octeon-gpio"; in octeon_gpio_probe()
111 chip->dev = &pdev->dev; in octeon_gpio_probe()
112 chip->owner = THIS_MODULE; in octeon_gpio_probe()
113 chip->base = 0; in octeon_gpio_probe()
114 chip->can_sleep = false; in octeon_gpio_probe()
115 chip->ngpio = 20; in octeon_gpio_probe()
116 chip->direction_input = octeon_gpio_dir_in; in octeon_gpio_probe()
117 chip->get = octeon_gpio_get; in octeon_gpio_probe()
118 chip->direction_output = octeon_gpio_dir_out; in octeon_gpio_probe()
119 chip->set = octeon_gpio_set; in octeon_gpio_probe()
120 err = gpiochip_add(chip); in octeon_gpio_probe()
131 struct gpio_chip *chip = pdev->dev.platform_data; in octeon_gpio_remove() local
132 gpiochip_remove(chip); in octeon_gpio_remove()