File Index
Files and directories
Sign in
FILE

bcm590xx.h

File preview with syntax highlighting.

linux-6.19.14/include/linux/mfd/bcm590xx.h C
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 2/*
 3 * Broadcom BCM590xx PMU
 4 *
 5 * Copyright 2014 Linaro Limited
 6 * Author: Matt Porter <mporter@linaro.org>
 7 */
 8
 9#ifndef __LINUX_MFD_BCM590XX_H
10#define __LINUX_MFD_BCM590XX_H
11
12#include <linux/device.h>
13#include <linux/i2c.h>
14#include <linux/regmap.h>
15
16/* PMU ID register values; also used as device type */
17#define BCM590XX_PMUID_BCM59054		0x54
18#define BCM590XX_PMUID_BCM59056		0x56
19
20/* Known chip revision IDs */
21#define BCM59054_REV_DIGITAL_A1		1
22#define BCM59054_REV_ANALOG_A1		2
23
24#define BCM59056_REV_DIGITAL_A0		1
25#define BCM59056_REV_ANALOG_A0		1
26
27#define BCM59056_REV_DIGITAL_B0		2
28#define BCM59056_REV_ANALOG_B0		2
29
30/* regmap types */
31enum bcm590xx_regmap_type {
32	BCM590XX_REGMAP_PRI,
33	BCM590XX_REGMAP_SEC,
34};
35
36/* max register address */
37#define BCM590XX_MAX_REGISTER_PRI	0xe7
38#define BCM590XX_MAX_REGISTER_SEC	0xf0
39
40struct bcm590xx {
41	struct device *dev;
42	struct i2c_client *i2c_pri;
43	struct i2c_client *i2c_sec;
44	struct regmap *regmap_pri;
45	struct regmap *regmap_sec;
46
47	/* PMU ID value; also used as device type */
48	u8 pmu_id;
49
50	/* Chip revision, read from PMUREV reg */
51	u8 rev_digital;
52	u8 rev_analog;
53};
54
55#endif /*  __LINUX_MFD_BCM590XX_H */
~/ Read-only file preview.