- 30 5月, 2020 4 次提交
-
-
由 Serge Semin 提交于
Since commit 4f827280 ("Documentation: update kbuild loadable modules goals & examples") `-objs` is fitted for building host programs, lets change DW I2C core, platform and PCI driver kbuild directives to using `-y`, which more straightforward for device drivers. By doing so we can discard the ifeq construction in favor to the more natural and less bulky `<module>-$(CONFIG_X) += x.o` Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Serge Semin 提交于
Add the "baikal,bt1-sys-i2c" compatible string to the DW I2C binding. Even though the corresponding node is supposed to be a child of the Baikal-T1 System Controller, its reg property is left required for compatibility. Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Serge Semin 提交于
dtc currently doesn't support I2C_OWN_SLAVE_ADDRESS flag set in the i2c "reg" property. If dtc finds an i2c-slave sub-node having an address higher than ten-bits wide it'll print an ugly warning: Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64: I2C bus unit address format error, expected "40000064" Warning (i2c_bus_reg): /example-2/i2c@1120000/eeprom@64:reg: I2C address must be less than 10-bits, got "0x40000064" In order to silence dtc up let's replace the corresponding DT binding example with a normal DW I2C master mode-based one. It's done by clearing the I2C_OWN_SLAVE_ADDRESS bit in the reg property and converting the sub-node to be compatible with normal EEPROM like "atmel,24c02". Just revert this commit when dtc is fixed. Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Serge Semin 提交于
Modern device tree bindings are supposed to be created as YAML-files in accordance with dt-schema. This commit replaces Synopsys DW I2C legacy bare text bindings with YAML file. As before the bindings file states that the corresponding dts node is supposed to be compatible either with generic DW I2C controller or with Microsemi Ocelot SoC I2C one, to have registers, interrupts and clocks properties. In addition the node may have clock-frequency, i2c-sda-hold-time-ns, i2c-scl-falling-time-ns and i2c-sda-falling-time-ns optional properties. Signed-off-by: NSerge Semin <Sergey.Semin@baikalelectronics.ru> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 29 5月, 2020 7 次提交
-
-
由 Viresh Kumar 提交于
This currently generates a warning: drivers/i2c/busses/i2c-sh_mobile.c: In function 'sh_mobile_i2c_isr': drivers/i2c/busses/i2c-sh_mobile.c:399:26: warning: 'data' may be used uninitialized in this function [-Wmaybe-uninitialized] Though the code looks okay and shouldn't ever use the variable uninitialized. Fix the warning by moving the code around and getting rid of 'data'. Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org> Tested-by: NWolfram Sang <wsa+renesas@sang-engineering.com> [wsa: minor updates to commit message] Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Jean Delvare 提交于
Call the function to instantiate SPD EEPROMs automatically on the main SMBus controller. Multiplexed SMBus systems are excluded for now as they are more complex to handle. Signed-off-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Jean Delvare 提交于
In simple cases we can instantiate SPD EEPROMs on the SMBus automatically. Start with just DDR2, DDR3 and DDR4 on x86 for now, and only for systems with no more than 4 memory slots. These limitations may be lifted later. Signed-off-by: NJean Delvare <jdelvare@suse.de> [wsa: minor change for new API] Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
i2c_client pointers are usually named 'client'. Use it here to get rid of the ambiguity of 'dev->dev'. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
Support for 16-bit addresses has been added, so remove it from the todo list. Also, in the introductory sentence, may clear we talk about "slave IP cores" to make reading easier. Fixes: 82d51481 ("i2c-eeprom_slave: Add support for more eeprom models") Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
We have a kzalloced struct, no need to init to 0. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
acpi_dev_get_resources() does perform the NULL pointer check against ACPI companion device which is given as function parameter. Thus, there is no need to duplicate this check in the caller. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 27 5月, 2020 2 次提交
-
-
由 Aishwarya Ramakrishnan 提交于
PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: NAishwarya Ramakrishnan <aishwaryarj100@gmail.com> Reviewed-by: NAjay Gupta <ajayg@nvidia.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
No need to populate a variable if it is used only in debug output which may get compiled away anyhow. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 22 5月, 2020 11 次提交
-
-
由 Tang Bin 提交于
The function efm32_i2c_probe() is only called with an openfirmware platform device.Therefore there is no need to check that it has an openfirmware node. Signed-off-by: NShengju Zhang <zhangshengju@cmss.chinamobile.com> Signed-off-by: NTang Bin <tangbin@cmss.chinamobile.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Tang Bin 提交于
In the function efm32_i2c_probe(),when get irq failed,the function platform_get_irq() logs an error message,so remove redundant message here. Signed-off-by: NShengju Zhang <zhangshengju@cmss.chinamobile.com> Signed-off-by: NTang Bin <tangbin@cmss.chinamobile.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
This reverts commit 6aab46bc. Testing in linux-next showed it needs some more time. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
This reverts commit 6fe12cdb. Testing in linux-next showed it needs some more time. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
It's not clear why the commit fe20ff5c ("i2c-designware: Add support for Designware core behind PCI devices.") followed by commit b61b1415 ("i2c-designware: add support for Intel Lynxpoint") chose to hard code FIFO depth size. The FIFO depth on all hardware, I have tested on, can be nicely detected automatically. Thus, we may safely drop hard coded FIFO sizes from the driver. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
PCI devices may have been backed with ACPI handle which supplies an additional information to the drivers, such as counters. Call for ACPI configuration from PCI driver in order to utilize counters provided by ACPI. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
For possible code reuse in the future, move ACPI parts into common module. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
We may bailout directly from the loop instead of breaking it and testing a loop counter. This also gives advantages such as decreased indentation level along with dropped unneeded condition. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
In order to export array supported speed for wider use, move it to a header along with i2c_dw_validate_speed() helper moved to a common code. No functional changes intended. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
This header is a user of some generic ones, include them respectively. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
Do not spread PCI specifics over common code. It seems to be a layering violation which can be easily avoided. Refactor PCI driver and drop PCI specifics from common code. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 20 5月, 2020 9 次提交
-
-
由 Russell King 提交于
Implement generic GPIO-based I2C bus recovery for the PXA I2C driver. Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
Merge tag 'for-5.8-i2c' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into i2c/for-5.8 i2c: tegra: Changes for v5.8-rc1 This includes a few improvements to make the Tegra I2C controller behave properly on suspend/resume, does a bit of cleanup and adds support for the VI-variant of the I2C controller that is used primarily for video capture purposes.
-
由 Atsushi Nemoto 提交于
Protect altr_i2c_int_enable() by the mutex and remove unneeded spinlock. Signed-off-by: NAtsushi Nemoto <atsushi.nemoto@sord.co.jp> Reviewed-by: NThor Thayer <thor.thayer@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
-
由 Bibby Hsieh 提交于
Although in the most platforms, the bus power of i2c are alway on, some platforms disable the i2c bus power in order to meet low power request. We get and enable bulk regulator in i2c adapter device. Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Reviewed-by: NTomasz Figa <tfiga@chromium.org> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Bibby Hsieh 提交于
In some platforms, they disable the power-supply of i2c due to power consumption reduction. This patch add bus-supply property. Signed-off-by: NBibby Hsieh <bibby.hsieh@mediatek.com> Acked-by: NRob Herring <robh@kernel.org> [wsa: rebased to i2c/for-next] Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
Atomic transfers are not only about sending messages like the original wording suggested. Speak of 'accessing' now like in i2c.h. Reported-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
I don't plan to support every EEPROM type, but the 24c512 ones need a tiny code update, so let's have that upstream. Reported-by: NPatrick Williams <patrick@stwcx.xyz> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NPatrick Williams <patrick@stwcx.xyz> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Qii Wang 提交于
This patch adds a algorithm to calculate some ac-timing parameters which can fully meet I2C Spec. Signed-off-by: NQii Wang <qii.wang@mediatek.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 15 5月, 2020 6 次提交
-
-
由 Qii Wang 提交于
Add Qii Wang as maintainer for mediatek i2c controller driver. Signed-off-by: NQii Wang <qii.wang@mediatek.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Gustavo A. R. Silva 提交于
The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] sizeof(flexible-array-member) triggers a warning because flexible array members have incomplete type[1]. There are some instances of code in which the sizeof operator is being incorrectly/erroneously applied to zero-length arrays and the result is zero. Such instances may be hiding some bugs. So, this work (flexible-array member conversions) will also help to get completely rid of those sorts of issues. This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732 ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org> Reviewed-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Christophe JAILLET 提交于
A call to 'i2c_demux_deactivate_master()' is missing in the error handling path, as already done in the remove function. Fixes: 50a5ba87 ("i2c: mux: demux-pinctrl: add driver") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Atsushi Nemoto 提交于
Use a mutex to protect access to idev->msg_len, idev->buf, etc. which are modified by both altr_i2c_xfer_msg() and altr_i2c_isr(). This is the minimal fix for easy backporting. A cleanup to remove the spinlock will be added later. Signed-off-by: NAtsushi Nemoto <atsushi.nemoto@sord.co.jp> Acked-by: NThor Thayer <thor.thayer@linux.intel.com> [wsa: updated commit message] Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Wolfram Sang 提交于
The 'pengutronix' address is defunct for years. Use the proper contact address. Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Codrin Ciubotariu 提交于
devm_gpiod_get() usually calls gpio_request_enable() for non-strict pinmux drivers. These puts the pins in GPIO mode, whithout notifying the pinctrl driver. At this point, the I2C bus no longer owns the pins. To mux the pins back to the I2C bus, we use the pinctrl driver to change the state of the pins to GPIO, before using devm_gpiod_get(). After the pins are received as GPIOs, we switch theer pinctrl state back to the default one, Fixes: d3d3fdcc ("i2c: at91: implement i2c bus recovery") Signed-off-by: NCodrin Ciubotariu <codrin.ciubotariu@microchip.com> Acked-by: NLudovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 13 5月, 2020 1 次提交
-
-
由 Andy Shevchenko 提交于
Allow slave mode for PCI enumerated devices by calling a common i2c_dw_probe() instead of i2c_dw_probe_master(). While dropping dependency to platform driver in slave module, move its configuration section above, closer to core. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-