1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * OF helpers for the old of_mm_gpio_chip, used on ppc32 and nios2,
4 * do not use in new code.
6 * Copyright (c) 2007-2008 MontaVista Software, Inc.
8 * Author: Anton Vorontsov <avorontsov@ru.mvista.com>
11 #ifndef __LINUX_GPIO_LEGACY_OF_MM_GPIO_CHIP_H
12 #define __LINUX_GPIO_LEGACY_OF_MM_GPIO_CHIP_H
14 #include <linux/gpio/driver.h>
18 * OF GPIO chip for memory mapped banks
20 struct of_mm_gpio_chip {
22 void (*save_regs)(struct of_mm_gpio_chip *mm_gc);
26 static inline struct of_mm_gpio_chip *to_of_mm_gpio_chip(struct gpio_chip *gc)
28 return container_of(gc, struct of_mm_gpio_chip, gc);
31 extern int of_mm_gpiochip_add_data(struct device_node *np,
32 struct of_mm_gpio_chip *mm_gc,
34 extern void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc);
36 #endif /* __LINUX_GPIO_LEGACY_OF_MM_GPIO_CHIP_H */