peci: Add device detection
Since PECI devices are discoverable, we can dynamically detect devices that are actually available in the system. This change complements the earlier implementation by rescanning PECI bus to detect available devices. For this purpose, it also introduces the minimal API for PECI requests. Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com> Link: https://lore.kernel.org/r/20220208153639.255278-7-iwona.winiarska@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a85e4c5208
commit
52857e6828
6 changed files with 225 additions and 1 deletions
|
|
@ -60,6 +60,7 @@ static inline struct peci_controller *to_peci_controller(void *d)
|
|||
* @dev: device object to register PECI device to the device model
|
||||
* @controller: manages the bus segment hosting this PECI device
|
||||
* @addr: address used on the PECI bus connected to the parent controller
|
||||
* @deleted: indicates that PECI device was already deleted
|
||||
*
|
||||
* A peci_device identifies a single device (i.e. CPU) connected to a PECI bus.
|
||||
* The behaviour exposed to the rest of the system is defined by the PECI driver
|
||||
|
|
@ -68,6 +69,7 @@ static inline struct peci_controller *to_peci_controller(void *d)
|
|||
struct peci_device {
|
||||
struct device dev;
|
||||
u8 addr;
|
||||
bool deleted;
|
||||
};
|
||||
|
||||
static inline struct peci_device *to_peci_device(struct device *d)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue