一種I2C會發生的issue, arbitration lost的中文可以稱作”仲裁損失”
若是發生這種狀態的話, 有一種workaround的方式處理, 就是將此I2C切換為GPIO 啟用/關閉後, I2C就變正常了
nvidia 也針對這個issue提出作法, 且以GPL授權發布在網路上
/* * arch/arm/mach-tegra/i2c_error_recovery.c * * Copyright (c) 2011, NVIDIA Corporation. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
arm: tegra: cardhu: Added I2C arbitration lost recovery mechanism
Added the code for arbitration lost recovery mechanism for i2c
driver and Initialize gpio number for i2c clock and data as
part of platform data.
沒有留言:
張貼留言