- 20 5月, 2020 4 次提交
-
-
由 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>
-
- 13 5月, 2020 5 次提交
-
-
由 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>
-
由 Andy Shevchenko 提交于
As a preparatory patch to support slave mode for PCI enumerated devices rename i2c_dw_probe() to i2c_dw_probe_master() and split common i2c_dw_probe() as inline helper. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
Since we have available helper to configure master mode, let's use it in the PCI driver instead of spread open-coded variant. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
Move configuration routines to respective modules, i.e. master and slave. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
Use devm_platform_ioremap_resource() instead of platform_get_resource() + devm_ioremap_resource(). Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 12 5月, 2020 10 次提交
-
-
由 Russell King 提交于
Use master-abort to send the stop condition after an address cycle rather than resetting the controller. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
If we timeout during a message transfer, the control register may contain bits that cause an action to be set. Read-modify-writing the register leaving these bits set may trigger the hardware to attempt one of these actions unintentionally. Always clear these bits when cleaning up after a message or after a timeout. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Remove unnecessary show_state() in the loop inside i2c_pxa_pio_set_master(), which can be unnecessarily verbose. Remove the i2c_pxa_scream_blue_murder() in i2c_pxa_pio_xfer(), which will trigger if we are probing the I2C bus and a slave does not respond; this is a normal event, and not something to report. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Ensure that the various timeout messages can identify where in the code they were produced from to aid debugging. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Running i2cdetect on a PXA I2C adapter is very noisy; it complains whenever a slave fails to respond to the address cycle. Since it is normal to probe for slaves in this way, we should not fill the kernel log. This is especially true with SFP modules that take a while to respond on the I2C bus, and probing via the I2C bus is the only way to detect that they are ready. Fix this by changing the internal transfer return code from I2C_RETRY to a new NO_SLAVE code (mapped to -ENXIO, as per the I2C documentation for this condition, but we still return -EREMOTEIO to the I2C stack to maintain long established driver behaviour.) Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Most of i2c_pxa_pio_xfer() and i2c_pxa_xfer() are identical; the only differences are that i2c_pxa_pio_xfer() may reset the bus, and they use different underlying transfer functions. The retry loop is the same. Consolidate these two functions. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
Use a shorter SPDX identifier instead of pasting the whole license. While here, replace duplicating PCA954x with PCA984x. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
device_create_file() is called the last in ->probe() but pca954x_cleanup(), which is called earlier in error path, tries to remove never created file. Move device_remove_file() call outside of pca954x_cleanup() to make it slightly closer to what pca954x_init() is doing. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
Device property API allows to gather device resources from different sources, such as ACPI. Convert the drivers to unleash the power of device property API. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Andy Shevchenko 提交于
Refactor pca954x_irq_handler() to: - use for_each_set_bit() macro - use IRQ_RETVAL() macro Above change makes code easy to read and understand. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPeter Rosin <peda@axentia.se> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 05 5月, 2020 13 次提交
-
-
由 Codrin Ciubotariu 提交于
After a transfer timeout, some faulty I2C slave devices might hold down the SDA pin. We can generate a bus clear command, hoping that the slave might release the pins. If the CLEAR command is not supported, we will use gpio recovery, if available, to reset the bus. 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>
-
由 Russell King 提交于
Fix i2c_pxa_wait_bus_not_busy()'s boundary conditions, so that a coincidental success and timeout results in the function returning success. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Clean up decode_bits() to use pr_cont(), and move the newline into the function rather than at its two callsites. Avoid printing an unnecessary space before the newline. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
The IRQ log output is supposed to appear on a single line. However, commit 3a2dc167 ("i2c: pxa: Update debug function to dump more info on error") resulted in it being printed one-entry-per-line, which is excessively long. Fixing this is not a trivial matter; using pr_cont() doesn't work as the previous dev_dbg() may not have been compiled in, or may be dynamic. Since the rest of this function output is at error level, and is also debug output, promote this to error level as well to avoid this problem. Reduce the number of always zero prefix digits to save screen real- estate. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Move the ID tables into one place, near the device dependent data. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Move driver-private definitions out of the i2c-pxa.h platform data header file into the driver itself. Nothing outside of the driver makes use of these constants. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Always set the fm and hs members of struct pxa_reg_layout. These members are already taking space, we don't need code as well. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Add definitions for the bits in the IBMR register, and use them in the code. This improves readability. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Arrange the register field definitions to be grouped together, rather than the Armada-3700 definitions being separated from the rest of the definitions. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Re-arrange the PXA I2C code to avoid forward declarations, and keep similar functionality (e.g. the non-IRQ mode support) together. This improves code readability. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
Arrange the includes to be in alphabetical order to help avoid duplicated includes. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
i2c-pxa does not need linux/sched.h nor linux/time.h includes, so remove these. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
由 Russell King 提交于
i2c-pxa was created before i2c_8bit_addr_from_msg() was implemented, and used its own i2c_pxa_addr_byte() which is functionally the same. Sadly, it was never updated to use this new helper. Switch it over. Signed-off-by: NRussell King <rmk+kernel@armlinux.org.uk> Signed-off-by: NWolfram Sang <wsa@kernel.org>
-
- 30 4月, 2020 2 次提交
-
-
由 Jason Yan 提交于
In i2c_powermac_register_devices(), variable 'found_onyx' is bool and assigned '0' and 'true' in different places. Use 'false' instead of '0'. Signed-off-by: NJason Yan <yanaijie@huawei.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Dan Carpenter 提交于
We want to break with "i" set to zero whether we find the rate we want or not. In the current code, if we don't find the rate we want then it exits the loop with "i" set to -1 and results in an array underflow. Fixes: 09cc9a3b ("i2c: stm32f7: allows for any bus frequency") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Reviewed-by: NAlain Volmat <alain.volmat@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 26 4月, 2020 6 次提交
-
-
由 Wolfram Sang 提交于
Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Rayagonda Kokatanur 提交于
Add support for SMBUS quick command. SMBUS quick command passes single bit of information to the slave (target) device. Can be used to turn slave device on or off. By default i2c_detect tool uses the smbus quick cmd to try and detect devices. Without this support it will not detect some slaves. Signed-off-by: NRayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Aishwarya R 提交于
Use of_property_read_u32 to read the "reg" and "i2c-address" property instead of using of_get_property to check the return values. Signed-off-by: NAishwarya R <aishwaryarj100@gmail.com> Tested-by: NErhard Furtner <erhard_f@mailbox.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jason Yan 提交于
The '>' expression itself is bool, no need to convert it to bool again. Signed-off-by: NJason Yan <yanaijie@huawei.com> Reviewed-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Dave Stevenson 提交于
If there is no interrupt defined then an error is logged due to the use of platform_get_irq. The driver handles not having the interrupt by falling back to polling, therefore make the appropriate call when claiming it. Signed-off-by: NDave Stevenson <dave.stevenson@raspberrypi.com> Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Some bindings are for the bus master, some are for the slaves. Regroup them and give them separate headings to make it clear. Also, remove references to "generic names" which is for nodes and not for compatibles. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-