Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c fixes from Wolfram Sang: - a small collection of remaining API conversion patches (all acked) which allow to finally remove the deprecated API - some documentation fixes and a MAINTAINERS addition * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: MAINTAINERS: Add robert and myself as qcom i2c cci maintainers i2c: smbus: Fix spelling mistake in the comments Documentation/i2c: SMBus start signal is S not A i2c: remove deprecated i2c_new_device API Documentation: media: convert to use i2c_new_client_device() video: backlight: tosa_lcd: convert to use i2c_new_client_device() x86/platform/intel-mid: convert to use i2c_new_client_device() drm: encoder_slave: use new I2C API drm: encoder_slave: fix refcouting error for modules
This commit is contained in:
commit
a5c6a1f0fe
|
@ -451,7 +451,7 @@ The bridge driver also has some helper functions it can use:
|
|||
"module_foo", "chipid", 0x36, NULL);
|
||||
|
||||
This loads the given module (can be ``NULL`` if no module needs to be loaded)
|
||||
and calls :c:func:`i2c_new_device` with the given ``i2c_adapter`` and
|
||||
and calls :c:func:`i2c_new_client_device` with the given ``i2c_adapter`` and
|
||||
chip/address arguments. If all goes well, then it registers the subdev with
|
||||
the v4l2_device.
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ SMBus Quick Command
|
|||
|
||||
This sends a single bit to the device, at the place of the Rd/Wr bit::
|
||||
|
||||
A Addr Rd/Wr [A] P
|
||||
S Addr Rd/Wr [A] P
|
||||
|
||||
Functionality flag: I2C_FUNC_SMBUS_QUICK
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ nitpick_ignore = [
|
|||
("c:func", "copy_to_user"),
|
||||
("c:func", "determine_valid_ioctls"),
|
||||
("c:func", "ERR_PTR"),
|
||||
("c:func", "i2c_new_device"),
|
||||
("c:func", "i2c_new_client_device"),
|
||||
("c:func", "ioctl"),
|
||||
("c:func", "IS_ERR"),
|
||||
("c:func", "KERNEL_VERSION"),
|
||||
|
|
|
@ -14196,6 +14196,15 @@ L: dmaengine@vger.kernel.org
|
|||
S: Supported
|
||||
F: drivers/dma/qcom/hidma*
|
||||
|
||||
QUALCOMM I2C CCI DRIVER
|
||||
M: Loic Poulain <loic.poulain@linaro.org>
|
||||
M: Robert Foss <robert.foss@linaro.org>
|
||||
L: linux-i2c@vger.kernel.org
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/i2c/i2c-qcom-cci.txt
|
||||
F: drivers/i2c/busses/i2c-qcom-cci.c
|
||||
|
||||
QUALCOMM IOMMU
|
||||
M: Rob Clark <robdclark@gmail.com>
|
||||
L: iommu@lists.linux-foundation.org
|
||||
|
|
|
@ -287,8 +287,8 @@ void intel_scu_devices_create(void)
|
|||
|
||||
adapter = i2c_get_adapter(i2c_bus[i]);
|
||||
if (adapter) {
|
||||
client = i2c_new_device(adapter, i2c_devs[i]);
|
||||
if (!client)
|
||||
client = i2c_new_client_device(adapter, i2c_devs[i]);
|
||||
if (IS_ERR(client))
|
||||
pr_err("can't create i2c device %s\n",
|
||||
i2c_devs[i]->type);
|
||||
} else
|
||||
|
|
|
@ -61,13 +61,8 @@ int drm_i2c_encoder_init(struct drm_device *dev,
|
|||
|
||||
request_module("%s%s", I2C_MODULE_PREFIX, info->type);
|
||||
|
||||
client = i2c_new_device(adap, info);
|
||||
if (!client) {
|
||||
err = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!client->dev.driver) {
|
||||
client = i2c_new_client_device(adap, info);
|
||||
if (!i2c_client_has_driver(client)) {
|
||||
err = -ENODEV;
|
||||
goto fail_unregister;
|
||||
}
|
||||
|
@ -84,7 +79,7 @@ int drm_i2c_encoder_init(struct drm_device *dev,
|
|||
|
||||
err = encoder_drv->encoder_init(client, dev, encoder);
|
||||
if (err)
|
||||
goto fail_unregister;
|
||||
goto fail_module_put;
|
||||
|
||||
if (info->platform_data)
|
||||
encoder->slave_funcs->set_config(&encoder->base,
|
||||
|
@ -92,10 +87,10 @@ int drm_i2c_encoder_init(struct drm_device *dev,
|
|||
|
||||
return 0;
|
||||
|
||||
fail_module_put:
|
||||
module_put(module);
|
||||
fail_unregister:
|
||||
i2c_unregister_device(client);
|
||||
module_put(module);
|
||||
fail:
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_i2c_encoder_init);
|
||||
|
|
|
@ -815,31 +815,6 @@ out_err_silent:
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(i2c_new_client_device);
|
||||
|
||||
/**
|
||||
* i2c_new_device - instantiate an i2c device
|
||||
* @adap: the adapter managing the device
|
||||
* @info: describes one I2C device; bus_num is ignored
|
||||
* Context: can sleep
|
||||
*
|
||||
* This deprecated function has the same functionality as
|
||||
* @i2c_new_client_device, it just returns NULL instead of an ERR_PTR in case of
|
||||
* an error for compatibility with current I2C API. It will be removed once all
|
||||
* users are converted.
|
||||
*
|
||||
* This returns the new i2c client, which may be saved for later use with
|
||||
* i2c_unregister_device(); or NULL to indicate an error.
|
||||
*/
|
||||
struct i2c_client *
|
||||
i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
|
||||
{
|
||||
struct i2c_client *ret;
|
||||
|
||||
ret = i2c_new_client_device(adap, info);
|
||||
return IS_ERR(ret) ? NULL : ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(i2c_new_device);
|
||||
|
||||
|
||||
/**
|
||||
* i2c_unregister_device - reverse effect of i2c_new_*_device()
|
||||
* @client: value returned from i2c_new_*_device()
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* This file contains the SMBus functions which are always included in the I2C
|
||||
* core because they can be emulated via I2C. SMBus specific extensions
|
||||
* (e.g. smbalert) are handled in a seperate i2c-smbus module.
|
||||
* (e.g. smbalert) are handled in a separate i2c-smbus module.
|
||||
*
|
||||
* All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl>
|
||||
* SMBus 2.0 support by Mark Studebaker <mdsxyz123@yahoo.com> and
|
||||
|
|
|
@ -107,7 +107,7 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data)
|
|||
/* TG LCD GVSS */
|
||||
tosa_tg_send(spi, TG_PINICTL, 0x0);
|
||||
|
||||
if (!data->i2c) {
|
||||
if (IS_ERR_OR_NULL(data->i2c)) {
|
||||
/*
|
||||
* after the pannel is powered up the first time,
|
||||
* we can access the i2c bus so probe for the DAC
|
||||
|
@ -119,7 +119,7 @@ static void tosa_lcd_tg_on(struct tosa_lcd_data *data)
|
|||
.addr = DAC_BASE,
|
||||
.platform_data = data->spi,
|
||||
};
|
||||
data->i2c = i2c_new_device(adap, &info);
|
||||
data->i2c = i2c_new_client_device(adap, &info);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -408,7 +408,7 @@ static inline bool i2c_detect_slave_mode(struct device *dev) { return false; }
|
|||
* that are present. This information is used to grow the driver model tree.
|
||||
* For mainboards this is done statically using i2c_register_board_info();
|
||||
* bus numbers identify adapters that aren't yet available. For add-on boards,
|
||||
* i2c_new_device() does this dynamically with the adapter already known.
|
||||
* i2c_new_client_device() does this dynamically with the adapter already known.
|
||||
*/
|
||||
struct i2c_board_info {
|
||||
char type[I2C_NAME_SIZE];
|
||||
|
@ -439,13 +439,11 @@ struct i2c_board_info {
|
|||
|
||||
|
||||
#if IS_ENABLED(CONFIG_I2C)
|
||||
/* Add-on boards should register/unregister their devices; e.g. a board
|
||||
/*
|
||||
* Add-on boards should register/unregister their devices; e.g. a board
|
||||
* with integrated I2C, a config eeprom, sensors, and a codec that's
|
||||
* used in conjunction with the primary hardware.
|
||||
*/
|
||||
struct i2c_client *
|
||||
i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info);
|
||||
|
||||
struct i2c_client *
|
||||
i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info);
|
||||
|
||||
|
|
Loading…
Reference in New Issue