mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-30 06:53:09 +00:00
0478dac62a
At this point in the conversion there should be no need to have logic to disable some symbol during the SPL build as all symbols should have an SPL counterpart. The main real changes done here are that we now must make proper use of CONFIG_IS_ENABLED(DM_SERIAL) rather than many of the odd tricks we developed prior to CONFIG_IS_ENABLED() being available. Signed-off-by: Tom Rini <trini@konsulko.com>
30 lines
849 B
C
30 lines
849 B
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright 2014 Freescale Semiconductor, Inc.
|
|
* Copyright 2020-21 NXP
|
|
* Copyright 2021 Microsoft Corporation
|
|
*/
|
|
|
|
#ifndef __NXP_I2C_COMMON_H__
|
|
#define __NXP_I2C_COMMON_H__
|
|
|
|
/* Common functionality shared by the I2C drivers for VID and the mux. */
|
|
#if CONFIG_IS_ENABLED(DM_I2C)
|
|
#define DEVICE_HANDLE_T struct udevice *
|
|
|
|
#define I2C_READ(dev, register, data, length) \
|
|
dm_i2c_read(dev, register, data, length)
|
|
#define I2C_WRITE(dev, register, data, length) \
|
|
dm_i2c_write(dev, register, data, length)
|
|
#else
|
|
#define DEVICE_HANDLE_T int
|
|
|
|
#define I2C_READ(dev, register, data, length) \
|
|
i2c_read(dev, register, 1, data, length)
|
|
#define I2C_WRITE(dev, register, data, length) \
|
|
i2c_write(dev, register, 1, data, length)
|
|
#endif
|
|
|
|
int fsl_i2c_get_device(int address, int bus, DEVICE_HANDLE_T *dev);
|
|
|
|
#endif
|