Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / gpio / gpio-i8255.h
blob9dcf639b94dfd41cbb73aa37d669aba236e6321f
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright 2022 William Breathitt Gray */
3 #ifndef _I8255_H_
4 #define _I8255_H_
6 struct device;
7 struct irq_domain;
8 struct regmap;
10 #define i8255_volatile_regmap_range(_base) regmap_reg_range(_base, _base + 0x2)
12 /**
13 * struct i8255_regmap_config - Configuration for the register map of an i8255
14 * @parent: parent device
15 * @map: regmap for the i8255
16 * @num_ppi: number of i8255 Programmable Peripheral Interface
17 * @names: (optional) array of names for gpios
18 * @domain: (optional) IRQ domain if the controller is interrupt-capable
20 * Note: The regmap is expected to have cache enabled and i8255 control
21 * registers not marked as volatile.
23 struct i8255_regmap_config {
24 struct device *parent;
25 struct regmap *map;
26 int num_ppi;
27 const char *const *names;
28 struct irq_domain *domain;
31 int devm_i8255_regmap_register(struct device *dev,
32 const struct i8255_regmap_config *config);
34 #endif /* _I8255_H_ */