hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/drivers/i2c/busses/i2c-wmt.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Wondermedia I2C Master Mode Driver
34 *
....@@ -5,11 +6,6 @@
56 *
67 * Derived from GPLv2+ licensed source:
78 * - Copyright (C) 2008 WonderMedia Technologies, Inc.
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2, or
11
- * (at your option) any later version. as published by the Free Software
12
- * Foundation
139 */
1410
1511 #include <linux/clk.h>
....@@ -403,7 +399,7 @@
403399
404400 i2c_dev->mode = I2C_MODE_STANDARD;
405401 err = of_property_read_u32(np, "clock-frequency", &clk_rate);
406
- if ((!err) && (clk_rate == 400000))
402
+ if (!err && (clk_rate == I2C_MAX_FAST_MODE_FREQ))
407403 i2c_dev->mode = I2C_MODE_FAST;
408404
409405 i2c_dev->dev = &pdev->dev;