1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Hardware monitoring driver for PMBus devices
5 * Copyright (c) 2010, 2011 Ericsson AB.
11 #include <linux/bits.h>
16 * PMBUS_SKIP_STATUS_CHECK
18 * During register detection, skip checking the status register for
19 * communication or command errors.
21 * Some PMBus chips respond with valid data when trying to read an unsupported
22 * register. For such chips, checking the status register is mandatory when
23 * trying to determine if a chip register exists or not.
24 * Other PMBus chips don't support the STATUS_CML register, or report
25 * communication errors for no explicable reason. For such chips, checking
26 * the status register must be disabled.
28 #define PMBUS_SKIP_STATUS_CHECK BIT(0)
31 * PMBUS_WRITE_PROTECTED
32 * Set if the chip is write protected and write protection is not determined
33 * by the standard WRITE_PROTECT command.
35 #define PMBUS_WRITE_PROTECTED BIT(1)
40 * Some PMBus chips don't respond with valid data when reading the CAPABILITY
41 * register. For such chips, this flag should be set so that the PMBus core
42 * driver doesn't use CAPABILITY to determine it's behavior.
44 #define PMBUS_NO_CAPABILITY BIT(2)
46 struct pmbus_platform_data {
47 u32 flags; /* Device specific flags */
49 /* regulator support */
51 struct regulator_init_data *reg_init_data;
54 #endif /* _PMBUS_H_ */