xref: /linux/include/linux/mfd/rsmu.h (revision 2da68a77)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Core interface for Renesas Synchronization Management Unit (SMU) devices.
4  *
5  * Copyright (C) 2021 Integrated Device Technology, Inc., a Renesas Company.
6  */
7 
8 #ifndef __LINUX_MFD_RSMU_H
9 #define __LINUX_MFD_RSMU_H
10 
11 /* The supported devices are ClockMatrix, Sabre and SnowLotus */
12 enum rsmu_type {
13 	RSMU_CM		= 0x34000,
14 	RSMU_SABRE	= 0x33810,
15 	RSMU_SL		= 0x19850,
16 };
17 
18 /**
19  *
20  * struct rsmu_ddata - device data structure for sub devices.
21  *
22  * @dev:    i2c/spi device.
23  * @regmap: i2c/spi bus access.
24  * @lock:   mutex used by sub devices to make sure a series of
25  *          bus access requests are not interrupted.
26  * @type:   RSMU device type.
27  * @page:   i2c/spi bus driver internal use only.
28  */
29 struct rsmu_ddata {
30 	struct device *dev;
31 	struct regmap *regmap;
32 	struct mutex lock;
33 	enum rsmu_type type;
34 	u16 page;
35 };
36 #endif /*  __LINUX_MFD_RSMU_H */
37