Thomas Gleixner | 74ba920 | 2019-05-20 09:19:02 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Guenter Roeck | 442aba7 | 2011-01-26 20:09:02 -0800 | [diff] [blame] | 2 | /* |
| 3 | * Hardware monitoring driver for PMBus devices |
| 4 | * |
| 5 | * Copyright (c) 2010, 2011 Ericsson AB. |
Guenter Roeck | 442aba7 | 2011-01-26 20:09:02 -0800 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef _PMBUS_H_ |
| 9 | #define _PMBUS_H_ |
| 10 | |
| 11 | /* flags */ |
| 12 | |
| 13 | /* |
| 14 | * PMBUS_SKIP_STATUS_CHECK |
| 15 | * |
| 16 | * During register detection, skip checking the status register for |
| 17 | * communication or command errors. |
| 18 | * |
| 19 | * Some PMBus chips respond with valid data when trying to read an unsupported |
| 20 | * register. For such chips, checking the status register is mandatory when |
| 21 | * trying to determine if a chip register exists or not. |
| 22 | * Other PMBus chips don't support the STATUS_CML register, or report |
| 23 | * communication errors for no explicable reason. For such chips, checking |
| 24 | * the status register must be disabled. |
| 25 | */ |
| 26 | #define PMBUS_SKIP_STATUS_CHECK (1 << 0) |
| 27 | |
| 28 | struct pmbus_platform_data { |
| 29 | u32 flags; /* Device specific flags */ |
Alan Tull | ddbb4db | 2014-10-15 13:55:09 -0500 | [diff] [blame] | 30 | |
| 31 | /* regulator support */ |
| 32 | int num_regulators; |
| 33 | struct regulator_init_data *reg_init_data; |
Guenter Roeck | 442aba7 | 2011-01-26 20:09:02 -0800 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | #endif /* _PMBUS_H_ */ |