mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
i2c: microchip-corei2c: Use generic definitions for bus frequencies
Since we have generic definitions for bus frequencies, let's use them. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20260618141346.3241286-1-andriy.shevchenko@linux.intel.com
This commit is contained in:
parent
08d50f1517
commit
dfdca0b1eb
|
|
@ -565,10 +565,10 @@ static int mchp_corei2c_probe(struct platform_device *pdev)
|
|||
&idev->bus_clk_rate);
|
||||
if (ret || !idev->bus_clk_rate) {
|
||||
dev_info(&pdev->dev, "default to 100kHz\n");
|
||||
idev->bus_clk_rate = 100000;
|
||||
idev->bus_clk_rate = I2C_MAX_STANDARD_MODE_FREQ;
|
||||
}
|
||||
|
||||
if (idev->bus_clk_rate > 400000)
|
||||
if (idev->bus_clk_rate > I2C_MAX_FAST_MODE_FREQ)
|
||||
return dev_err_probe(&pdev->dev, -EINVAL,
|
||||
"clock-frequency too high: %d\n",
|
||||
idev->bus_clk_rate);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user