drivers/smbus: add smbus console driver
This patch adds a new smbus console driver and Kconfig options to enable the driver. Change-Id: Ife77fb2c3e1cc77678a4972701317d50624ceb95 Signed-off-by: Husni Faiz <ahamedhusni73@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67339 Reviewed-by: Raul Rangel <rrangel@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Martin L Roth
parent
c5d0761dea
commit
67300f88cd
28
src/include/console/i2c_smbus.h
Normal file
28
src/include/console/i2c_smbus.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef CONSOLE_I2C_SMBUS_H
|
||||
#define CONSOLE_I2C_SMBUS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void i2c_smbus_console_init(void);
|
||||
void i2c_smbus_console_tx_byte(unsigned char c);
|
||||
|
||||
#define __CONSOLE_SMBUS_ENABLE__ CONFIG(CONSOLE_I2C_SMBUS)
|
||||
|
||||
#if __CONSOLE_SMBUS_ENABLE__
|
||||
static inline void __i2c_smbus_console_init(void)
|
||||
{
|
||||
i2c_smbus_console_init();
|
||||
}
|
||||
|
||||
static inline void __i2c_smbus_console_tx_byte(u8 data)
|
||||
{
|
||||
i2c_smbus_console_tx_byte(data);
|
||||
}
|
||||
#else
|
||||
static inline void __i2c_smbus_console_init(void) {}
|
||||
static inline void __i2c_smbus_console_tx_byte(u8 data) {}
|
||||
#endif /* __CONSOLE_SMBUS_ENABLE__ */
|
||||
|
||||
#endif /* CONSOLE_I2C_SMBUS_H */
|
Reference in New Issue
Block a user