mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-16 21:58:15 +01:00
When bringing in the series 'arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"' I failed to notice that b4 noticed it was based on next and so took that as the base commit and merged that part of next to master. This reverts commit c8ffd1356d42223cbb8c86280a083cc3c93e6426, reversing changes made to 2ee6f3a5f7550de3599faef9704e166e5dcace35. Reported-by: Jonas Karlman <jonas@kwiboo.se> Signed-off-by: Tom Rini <trini@konsulko.com>
35 lines
705 B
C
35 lines
705 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright 2014 Freescale Semiconductor, Inc.
|
|
* Copyright 2020-21 NXP
|
|
* Copyright 2021 Microsoft Corporation
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <i2c.h>
|
|
#include "i2c_common.h"
|
|
|
|
#if CONFIG_IS_ENABLED(DM_I2C)
|
|
|
|
/* If DM is in use, retrieve the chip for the specified bus number */
|
|
int fsl_i2c_get_device(int address, int bus, DEVICE_HANDLE_T *dev)
|
|
{
|
|
int ret = i2c_get_chip_for_busnum(bus, address, 1, dev);
|
|
|
|
if (ret)
|
|
printf("I2C: Bus %d has no device with address 0x%02X\n",
|
|
bus, address);
|
|
return ret;
|
|
}
|
|
|
|
#else
|
|
|
|
/* Handle is passed directly */
|
|
int fsl_i2c_get_device(int address, int bus, DEVICE_HANDLE_T *dev)
|
|
{
|
|
*dev = address;
|
|
return 0;
|
|
}
|
|
|
|
#endif
|