aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-idio-16.h
blob: 93b08ad73065aefb3d47e10701518de7a058f2f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright 2022 William Breathitt Gray */
#ifndef _IDIO_16_H_
#define _IDIO_16_H_

struct device;
struct regmap;
struct regmap_irq;

/**
 * struct idio_16_regmap_config - Configuration for the IDIO-16 register map
 * @parent:		parent device
 * @map:		regmap for the IDIO-16 device
 * @regmap_irqs:	descriptors for individual IRQs
 * @num_regmap_irqs:	number of IRQ descriptors
 * @irq:		IRQ number for the IDIO-16 device
 * @no_status:		device has no status register
 * @filters:		device has input filters
 */
struct idio_16_regmap_config {
	struct device *parent;
	struct regmap *map;
	const struct regmap_irq *regmap_irqs;
	int num_regmap_irqs;
	unsigned int irq;
	bool no_status;
	bool filters;
};

int devm_idio_16_regmap_register(struct device *dev, const struct idio_16_regmap_config *config);

#endif /* _IDIO_16_H_ */