diff options
author | Tomas Marek <tomas.marek@elrest.cz> | 2024-04-10 18:34:46 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-04-16 15:37:04 +0200 |
commit | e476edd5322f789ed79d93a5849e8c4c998e3b3f (patch) | |
tree | 6101069042608bd0ecf53a572463ec719790e457 /include | |
parent | e77ccb480a8c59d440e1d2d45253c5db0aee3189 (diff) | |
download | barebox-e476edd5322f789ed79d93a5849e8c4c998e3b3f.tar.gz barebox-e476edd5322f789ed79d93a5849e8c4c998e3b3f.tar.xz |
gpio: Add Intel gpio controller support
Signed-off-by: Tomas Marek <tomas.marek@elrest.cz>
Link: https://lore.barebox.org/20240410163446.14401-1-tomas.marek@elrest.cz
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/platform_data/gpio-intel.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/platform_data/gpio-intel.h b/include/platform_data/gpio-intel.h new file mode 100644 index 0000000000..4da4764998 --- /dev/null +++ b/include/platform_data/gpio-intel.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef __GPIO_INTEL_H +#define __GPIO_INTEL_H + +#include <linux/types.h> + +struct gpio_intel_platform_data { + resource_size_t community_base; + resource_size_t community_size; + unsigned int ngpios; +}; + +static inline struct device *add_intel_gpio_device( + struct gpio_intel_platform_data *pdata +) +{ + return add_generic_device("intel-gpio", DEVICE_ID_DYNAMIC, NULL, + pdata->community_base, pdata->community_size, + IORESOURCE_MEM, pdata); +} + +#endif /* __GPIO_INTEL_H */ |