hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/i2c/busses/i2c-pasemi.c
....@@ -1,16 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2006-2007 PA Semi, Inc
34 *
45 * 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.
146 */
157
168 #include <linux/module.h>
....@@ -145,6 +137,12 @@
145137
146138 TXFIFO_WR(smbus, msg->buf[msg->len-1] |
147139 (stop ? MTXFIFO_STOP : 0));
140
+
141
+ if (stop) {
142
+ err = pasemi_smb_waitready(smbus);
143
+ if (err)
144
+ goto reset_out;
145
+ }
148146 }
149147
150148 return 0;