xref: /linux/include/linux/soc/cirrus/ep93xx.h (revision c7546e2c3cb739a3c1a2f5acaf9bb629d401afe5)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _SOC_EP93XX_H
3 #define _SOC_EP93XX_H
4 
5 struct regmap;
6 struct spinlock_t;
7 
8 enum ep93xx_soc_model {
9 	EP93XX_9301_SOC,
10 	EP93XX_9307_SOC,
11 	EP93XX_9312_SOC,
12 };
13 
14 #include <linux/auxiliary_bus.h>
15 #include <linux/compiler_types.h>
16 #include <linux/container_of.h>
17 
18 #define EP93XX_CHIP_REV_D0	3
19 #define EP93XX_CHIP_REV_D1	4
20 #define EP93XX_CHIP_REV_E0	5
21 #define EP93XX_CHIP_REV_E1	6
22 #define EP93XX_CHIP_REV_E2	7
23 
24 struct ep93xx_regmap_adev {
25 	struct auxiliary_device adev;
26 	struct regmap *map;
27 	void __iomem *base;
28 	spinlock_t *lock;
29 	void (*write)(struct regmap *map, spinlock_t *lock, unsigned int reg,
30 		      unsigned int val);
31 	void (*update_bits)(struct regmap *map, spinlock_t *lock,
32 			    unsigned int reg, unsigned int mask, unsigned int val);
33 };
34 
35 #define to_ep93xx_regmap_adev(_adev) \
36 	container_of((_adev), struct ep93xx_regmap_adev, adev)
37 
38 #endif
39