| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2006-2007 PA Semi, Inc |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * SMBus host driver for PA Semi PWRficient |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 8 | | - * published by the Free Software Foundation. |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | | - * GNU General Public License for more details. |
|---|
| 14 | 6 | */ |
|---|
| 15 | 7 | |
|---|
| 16 | 8 | #include <linux/module.h> |
|---|
| .. | .. |
|---|
| 145 | 137 | |
|---|
| 146 | 138 | TXFIFO_WR(smbus, msg->buf[msg->len-1] | |
|---|
| 147 | 139 | (stop ? MTXFIFO_STOP : 0)); |
|---|
| 140 | + |
|---|
| 141 | + if (stop) { |
|---|
| 142 | + err = pasemi_smb_waitready(smbus); |
|---|
| 143 | + if (err) |
|---|
| 144 | + goto reset_out; |
|---|
| 145 | + } |
|---|
| 148 | 146 | } |
|---|
| 149 | 147 | |
|---|
| 150 | 148 | return 0; |
|---|