i2c-mpc.c (4f2c0a4acffbec01079c28f839422e64ddeff004) i2c-mpc.c (89151f6b007915fca95c5225cd1c37a419ba8cb9)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * This is a combined i2c adapter and algorithm driver for the
4 * MPC107/Tsi107 PowerPC northbridge and processors that include
5 * the same I2C unit (8240, 8245, 85xx).
6 *
7 * Copyright (C) 2003-2004 Humboldt Solutions Ltd, adrian@humboldt.co.uk
8 * Copyright (C) 2021 Allied Telesis Labs

--- 828 unchanged lines hidden (view full) ---

837 clock = *prop;
838 }
839
840 data = device_get_match_data(&op->dev);
841 if (data) {
842 data->setup(op->dev.of_node, i2c, clock);
843 } else {
844 /* Backwards compatibility */
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * This is a combined i2c adapter and algorithm driver for the
4 * MPC107/Tsi107 PowerPC northbridge and processors that include
5 * the same I2C unit (8240, 8245, 85xx).
6 *
7 * Copyright (C) 2003-2004 Humboldt Solutions Ltd, adrian@humboldt.co.uk
8 * Copyright (C) 2021 Allied Telesis Labs

--- 828 unchanged lines hidden (view full) ---

837 clock = *prop;
838 }
839
840 data = device_get_match_data(&op->dev);
841 if (data) {
842 data->setup(op->dev.of_node, i2c, clock);
843 } else {
844 /* Backwards compatibility */
845 if (of_get_property(op->dev.of_node, "dfsrr", NULL))
845 if (of_property_read_bool(op->dev.of_node, "dfsrr"))
846 mpc_i2c_setup_8xxx(op->dev.of_node, i2c, clock);
847 }
848
849 prop = of_get_property(op->dev.of_node, "fsl,timeout", &plen);
850 if (prop && plen == sizeof(u32)) {
851 mpc_ops.timeout = *prop * HZ / 1000000;
852 if (mpc_ops.timeout < 5)
853 mpc_ops.timeout = 5;

--- 111 unchanged lines hidden ---
846 mpc_i2c_setup_8xxx(op->dev.of_node, i2c, clock);
847 }
848
849 prop = of_get_property(op->dev.of_node, "fsl,timeout", &plen);
850 if (prop && plen == sizeof(u32)) {
851 mpc_ops.timeout = *prop * HZ / 1000000;
852 if (mpc_ops.timeout < 5)
853 mpc_ops.timeout = 5;

--- 111 unchanged lines hidden ---