Lines Matching +full:i2c +full:- +full:bus +full:- +full:name

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Helper module for board specific I2C bus registration
8 #include <linux/i2c.h>
9 #include <linux/platform_data/i2c-omap.h>
13 #include "i2c.h"
18 static const char name[] = "omap_i2c"; variable
39 return -EINVAL; in omap_i2c_add_bus()
43 pdev = &omap_i2c_devices[bus_id - 1]; in omap_i2c_add_bus()
44 pdev->id = bus_id; in omap_i2c_add_bus()
45 pdev->name = name; in omap_i2c_add_bus()
46 pdev->num_resources = ARRAY_SIZE(i2c_resources); in omap_i2c_add_bus()
53 pdev->resource = res; in omap_i2c_add_bus()
56 pdata->rev = OMAP_I2C_IP_VERSION_1; in omap_i2c_add_bus()
58 /* all OMAP1 I2C are implemented like this */ in omap_i2c_add_bus()
59 pdata->flags = OMAP_I2C_FLAG_NO_FIFO | in omap_i2c_add_bus()
64 /* how the cpu bus is wired up differs for 7xx only */ in omap_i2c_add_bus()
66 pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_2; in omap_i2c_add_bus()
68 pdev->dev.platform_data = pdata; in omap_i2c_add_bus()
79 * omap_i2c_bus_setup - Process command line options for the I2C bus speed
82 * This function allow to override the default I2C bus speed for given I2C
83 * bus with a command line option.
97 i2c_pdata[ints[1] - 1].clkrate = ints[2]; in omap_i2c_bus_setup()
98 i2c_pdata[ints[1] - 1].clkrate |= OMAP_I2C_CMDLINE_SETUP; in omap_i2c_bus_setup()
125 * omap_register_i2c_bus - register I2C bus with device descriptors
126 * @bus_id: bus id counting from number 1
127 * @clkrate: clock rate of the bus in kHz
128 * @info: pointer into I2C device descriptor table or NULL
147 if (!i2c_pdata[bus_id - 1].clkrate) in omap_register_i2c_bus()
148 i2c_pdata[bus_id - 1].clkrate = clkrate; in omap_register_i2c_bus()
150 i2c_pdata[bus_id - 1].clkrate &= ~OMAP_I2C_CMDLINE_SETUP; in omap_register_i2c_bus()
152 return omap_i2c_add_bus(&i2c_pdata[bus_id - 1], bus_id); in omap_register_i2c_bus()