Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+25 -48
+1 -1
Documentation/driver-api/media/v4l2-subdev.rst
··· 451 451 "module_foo", "chipid", 0x36, NULL); 452 452 453 453 This loads the given module (can be ``NULL`` if no module needs to be loaded) 454 - and calls :c:func:`i2c_new_device` with the given ``i2c_adapter`` and 454 + and calls :c:func:`i2c_new_client_device` with the given ``i2c_adapter`` and 455 455 chip/address arguments. If all goes well, then it registers the subdev with 456 456 the v4l2_device. 457 457
+1 -1
Documentation/i2c/smbus-protocol.rst
··· 57 57 58 58 This sends a single bit to the device, at the place of the Rd/Wr bit:: 59 59 60 - A Addr Rd/Wr [A] P 60 + S Addr Rd/Wr [A] P 61 61 62 62 Functionality flag: I2C_FUNC_SMBUS_QUICK 63 63
+1 -1
Documentation/userspace-api/media/conf_nitpick.py
··· 27 27 ("c:func", "copy_to_user"), 28 28 ("c:func", "determine_valid_ioctls"), 29 29 ("c:func", "ERR_PTR"), 30 - ("c:func", "i2c_new_device"), 30 + ("c:func", "i2c_new_client_device"), 31 31 ("c:func", "ioctl"), 32 32 ("c:func", "IS_ERR"), 33 33 ("c:func", "KERNEL_VERSION"),
+9
MAINTAINERS
··· 14196 14196 S: Supported 14197 14197 F: drivers/dma/qcom/hidma* 14198 14198 14199 + QUALCOMM I2C CCI DRIVER 14200 + M: Loic Poulain <loic.poulain@linaro.org> 14201 + M: Robert Foss <robert.foss@linaro.org> 14202 + L: linux-i2c@vger.kernel.org 14203 + L: linux-arm-msm@vger.kernel.org 14204 + S: Maintained 14205 + F: Documentation/devicetree/bindings/i2c/i2c-qcom-cci.txt 14206 + F: drivers/i2c/busses/i2c-qcom-cci.c 14207 + 14199 14208 QUALCOMM IOMMU 14200 14209 M: Rob Clark <robdclark@gmail.com> 14201 14210 L: iommu@lists.linux-foundation.org
+2 -2
arch/x86/platform/intel-mid/sfi.c
··· 287 287 288 288 adapter = i2c_get_adapter(i2c_bus[i]); 289 289 if (adapter) { 290 - client = i2c_new_device(adapter, i2c_devs[i]); 291 - if (!client) 290 + client = i2c_new_client_device(adapter, i2c_devs[i]); 291 + if (IS_ERR(client)) 292 292 pr_err("can't create i2c device %s\n", 293 293 i2c_devs[i]->type); 294 294 } else
+5 -10
drivers/gpu/drm/drm_encoder_slave.c
··· 61 61 62 62 request_module("%s%s", I2C_MODULE_PREFIX, info->type); 63 63 64 - client = i2c_new_device(adap, info); 65 - if (!client) { 66 - err = -ENOMEM; 67 - goto fail; 68 - } 69 - 70 - if (!client->dev.driver) { 64 + client = i2c_new_client_device(adap, info); 65 + if (!i2c_client_has_driver(client)) { 71 66 err = -ENODEV; 72 67 goto fail_unregister; 73 68 } ··· 79 84 80 85 err = encoder_drv->encoder_init(client, dev, encoder); 81 86 if (err) 82 - goto fail_unregister; 87 + goto fail_module_put; 83 88 84 89 if (info->platform_data) 85 90 encoder->slave_funcs->set_config(&encoder->base, ··· 87 92 88 93 return 0; 89 94 95 + fail_module_put: 96 + module_put(module); 90 97 fail_unregister: 91 98 i2c_unregister_device(client); 92 - module_put(module); 93 - fail: 94 99 return err; 95 100 } 96 101 EXPORT_SYMBOL(drm_i2c_encoder_init);
-25
drivers/i2c/i2c-core-base.c
··· 816 816 EXPORT_SYMBOL_GPL(i2c_new_client_device); 817 817 818 818 /** 819 - * i2c_new_device - instantiate an i2c device 820 - * @adap: the adapter managing the device 821 - * @info: describes one I2C device; bus_num is ignored 822 - * Context: can sleep 823 - * 824 - * This deprecated function has the same functionality as 825 - * @i2c_new_client_device, it just returns NULL instead of an ERR_PTR in case of 826 - * an error for compatibility with current I2C API. It will be removed once all 827 - * users are converted. 828 - * 829 - * This returns the new i2c client, which may be saved for later use with 830 - * i2c_unregister_device(); or NULL to indicate an error. 831 - */ 832 - struct i2c_client * 833 - i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) 834 - { 835 - struct i2c_client *ret; 836 - 837 - ret = i2c_new_client_device(adap, info); 838 - return IS_ERR(ret) ? NULL : ret; 839 - } 840 - EXPORT_SYMBOL_GPL(i2c_new_device); 841 - 842 - 843 - /** 844 819 * i2c_unregister_device - reverse effect of i2c_new_*_device() 845 820 * @client: value returned from i2c_new_*_device() 846 821 * Context: can sleep
+1 -1
drivers/i2c/i2c-core-smbus.c
··· 4 4 * 5 5 * This file contains the SMBus functions which are always included in the I2C 6 6 * core because they can be emulated via I2C. SMBus specific extensions 7 - * (e.g. smbalert) are handled in a seperate i2c-smbus module. 7 + * (e.g. smbalert) are handled in a separate i2c-smbus module. 8 8 * 9 9 * All SMBus-related things are written by Frodo Looijaard <frodol@dds.nl> 10 10 * SMBus 2.0 support by Mark Studebaker <mdsxyz123@yahoo.com> and
+2 -2
drivers/video/backlight/tosa_lcd.c
··· 107 107 /* TG LCD GVSS */ 108 108 tosa_tg_send(spi, TG_PINICTL, 0x0); 109 109 110 - if (!data->i2c) { 110 + if (IS_ERR_OR_NULL(data->i2c)) { 111 111 /* 112 112 * after the pannel is powered up the first time, 113 113 * we can access the i2c bus so probe for the DAC ··· 119 119 .addr = DAC_BASE, 120 120 .platform_data = data->spi, 121 121 }; 122 - data->i2c = i2c_new_device(adap, &info); 122 + data->i2c = i2c_new_client_device(adap, &info); 123 123 } 124 124 } 125 125
+3 -5
include/linux/i2c.h
··· 408 408 * that are present. This information is used to grow the driver model tree. 409 409 * For mainboards this is done statically using i2c_register_board_info(); 410 410 * bus numbers identify adapters that aren't yet available. For add-on boards, 411 - * i2c_new_device() does this dynamically with the adapter already known. 411 + * i2c_new_client_device() does this dynamically with the adapter already known. 412 412 */ 413 413 struct i2c_board_info { 414 414 char type[I2C_NAME_SIZE]; ··· 439 439 440 440 441 441 #if IS_ENABLED(CONFIG_I2C) 442 - /* Add-on boards should register/unregister their devices; e.g. a board 442 + /* 443 + * Add-on boards should register/unregister their devices; e.g. a board 443 444 * with integrated I2C, a config eeprom, sensors, and a codec that's 444 445 * used in conjunction with the primary hardware. 445 446 */ 446 - struct i2c_client * 447 - i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info); 448 - 449 447 struct i2c_client * 450 448 i2c_new_client_device(struct i2c_adapter *adap, struct i2c_board_info const *info); 451 449