- 18 12月, 2015 2 次提交
-
-
由 Wolfram Sang 提交于
This function used to be DT only, so it lived inside a CONFIG_OF block. Now it uses device attributes and must be moved outside of it. No further code changes, only one whitespace improvement. Reported-by: NJim Davis <jim.epost@gmail.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Until we have proper support to make I2C slave support fully optional, select it to prevent build errors on randconfigs. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 16 12月, 2015 2 次提交
-
-
由 Måns Rullgård 提交于
The Sigma Designs variant of this controller has the ability to generate interrupts. This is controlled using two additional registers, oddly enough overlapping with the defined but unused HDSTATIM. This patch adds support for using this feature instead of busy-looping if an IRQ is specified. Signed-off-by: NMans Rullgard <mans@mansr.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Måns Rullgård 提交于
The BYTECNT register holds the transfer size minus one. Setting it to the correct value removes the need for a dummy read/write at the end of each transfer. As zero-length transfers are not supported, do not advertise I2C_FUNC_SMBUS_QUICK. In other words, this patch makes the driver transfer the number of bytes requested unless this is zero, which is not supported by the hardware and is thus refused. Signed-off-by: NMans Rullgard <mans@mansr.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 15 12月, 2015 1 次提交
-
-
由 Måns Rullgård 提交于
Sigma Designs chips use a variant of this controller with the following differences: - The BUSY bit in the STATUS register is inverted - Bit 8 of the CONFIG register must be set - The controller can generate interrupts This patch adds support for the first two of these. It also calculates and sets the correct clock divisor if a clk is provided. The bus frequency is optionally speficied in the device tree node. Signed-off-by: NMans Rullgard <mans@mansr.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 14 12月, 2015 9 次提交
-
-
由 Masahiro Yamada 提交于
There is code to divide by "bus_speed" some lines below. To eliminate the possibility of division by zero, bail out if "clock-frequency" is specified as zero. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Masahiro Yamada 提交于
This input clock is used to generate the sampling clock for I2C bus. If the clock rate is zero, there is something wrong with the clock driver. Bail out with the appropriate error message in such a case. It would make it easier to find the root cause of failure. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Masahiro Yamada 提交于
There is code to divide by "bus_speed" some lines below. To eliminate the possibility of division by zero, bail out if "clock-frequency" is specified as zero. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Masahiro Yamada 提交于
This input clock is used to generate the sampling clock for I2C bus. If the clock rate is zero, there is something wrong with the clock driver. Bail out with the appropriate error message in such a case. It would make it easier to find the root cause of failure. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Switch to the new generic functions. Plain convert, no functionality added yet. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
The probe function is a little bit messy, something here, something there. Rework it so that there is some order: first init the private structure, then the adapter, then do HW init. This also allows us to remove the device argument of the clock calculation function, because it now can be deduced from the private structure. Also, shorten some lines where possible. This is a preparation for further refactoring. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Inspired from the i2c-rk3x driver (thanks guys!) but refactored and extended. See built-in docs for further information. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Also, sort the properties alphabetically and make indentation consistent. Wording largely taken from i2c-rk3x.txt, thanks guys! Only "i2c-scl-internal-delay-ns" is new, the rest is used by two drivers already and was documented in their driver binding documentation. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 06 12月, 2015 1 次提交
-
-
由 Niklas Söderlund 提交于
Add I2C slave provider using the generic slave interface. Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 04 12月, 2015 4 次提交
-
-
由 Paul Burton 提交于
Allow the eg20t I2C driver to be built for MIPS platforms, in preparation for use on the MIPS Boston board. Signed-off-by: NPaul Burton <paul.burton@imgtec.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Paul Burton 提交于
Set the I2C adapter devices of_node to that of the PCI device, such that I2C clients may be instantiated via device tree. Signed-off-by: NPaul Burton <paul.burton@imgtec.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Ludovic Desroches 提交于
The hold field allows to configure the data hold time which can be set with the help of the generic binding 'i2c-sda-hold-time-ns'. This feature has been introduced with SAMA5D4 SoC family. Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com> Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
smatch rightfully says: drivers/i2c/busses/i2c-piix4.c:504 piix4_access warn: unused return: i = inb_p() drivers/i2c/busses/i2c-piix4.c:537 piix4_access warn: unused return: i = inb_p() Signed-off-by: NWolfram Sang <wsa@the-dreams.de> Tested-by: NChristian Fetzer <fetzer.ch@gmail.com>
-
- 01 12月, 2015 9 次提交
-
-
由 Liguo Zhang 提交于
For platform with auto restart support, between every transfer, i2c controller will trigger an interrupt and SW need to handle it to start new transfer. When doing write-then-read transfer, instead of restart mechanism, using WRRD mode to have controller send both transfer in one request to reduce latency. Signed-off-by: NLiguo Zhang <liguo.zhang@mediatek.com> Reviewed-by: NEddie Huang <eddie.huang@mediatek.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Shubhrajyoti Datta 提交于
The suspended flag is a flag holding the device's PM status. The runtime framework does that for us. Use pm_runtime_suspended call instead. Signed-off-by: NShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Shubhrajyoti Datta 提交于
Currently the clocks are enabled at probe and disabled at remove. Which keeps the clocks enabled even if no transaction is going on. This patch enables the clocks at the start of transfer and disables after it. Also adapts to runtime pm. converts dev pm to const to silence a checkpatch warning. Signed-off-by: NShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Nicola Corna 提交于
This patch adds a i2c_check_quirks helper function to check the quirk flags of an i2c adapter, in a similar way to i2c_check_functionality. Signed-off-by: NNicola Corna <nicola@corna.info> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Nicola Corna 提交于
As reported in the links given below. the BCM2835 has a hardware bug in its i2c module which prevents a correct clock stretching. This patch adds the I2C_AQ_NO_CLK_STRETCH quirk flag to i2c-bcm2835. Signed-off-by: NNicola Corna <nicola@corna.info> [wsa: put the links into the code as comments] Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Nicola Corna 提交于
Add I2C_AQ_NO_CLK_STRETCH to drivers/i2c/algos/i2c-algo-bit.c when getscl is not available. Signed-off-by: NNicola Corna <nicola@corna.info> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Nicola Corna 提交于
Add I2C_AQ_NO_CLK_STRETCH quirk flag, to be used when clock stretching is not supported. Signed-off-by: NNicola Corna <nicola@corna.info> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Lars-Peter Clausen 提交于
All protected sections are only called from sleep-able context, so there is no need to use a spinlock. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Reviewed-by: NShubhrajyoti Datta <shubhraj@xilinx.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 LABBE Corentin 提交于
The simple_strtoul function is marked as obsolete. This patch replace it by kstrtou8. Reviewed-by: NJean Delvare <jdelvare@suse.de> Tested-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NLABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 30 11月, 2015 12 次提交
-
-
由 Christian Fetzer 提交于
This patch adds support for port names for the SB800 chipset. Since the chipset supports a multiplexed main SMBus controller, adding the channel name to the adapter name is necessary to differentiate the ports better (for example in sensors output). Signed-off-by: NChristian Fetzer <fetzer.ch@gmail.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Christian Fetzer 提交于
The SB800 chipset supports a multiplexed main SMBus controller with four ports. The multiplexed ports share the same SMBus address and register set. The port is selected by bits 2:1 of the smb_en register (0x2C). Only one port can be active at any point in time therefore a mutex is needed in order to synchronize access. Additionally, the commit avoids requesting and releasing the SMBus base address index region on every multiplexed transfer by moving the request_region call into piix4_probe. Tested on HP ProLiant MicroServer G7 N54L (where this patch adds support to access sensor data from the w83795adg). Cc: Thomas Brandon <tbrandonau@gmail.com> Cc: Eddi De Pieri <eddi@depieri.net> Signed-off-by: NChristian Fetzer <fetzer.ch@gmail.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Christian Fetzer 提交于
The SB800 chipset supports a multiplexed main SMBus controller with four ports. Therefore the static variable piix4_main_adapter is converted into a piix4_main_adapters array that can hold one i2c_adapter for each multiplexed port. The auxiliary adapter remains unchanged since it represents the second (not multiplexed) SMBus controller on the SB800 chipset. Signed-off-by: NChristian Fetzer <fetzer.ch@gmail.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Signed-off-by: NRyo Kataoka <ryo.kataoka.wt@renesas.com> Signed-off-by: NHiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Update the comments to match current behaviour. Shorten some comments. Update copyrights. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
If we don't clear START generation as soon as possible, it may cause another message to be generated, e.g. when receiving NACK in address phase. To keep the race window as small as possible, we clear it right at the beginning of the interrupt. We don't need any checks since we always want to stop START and STOP generation on the next occasion after we started it. This patch improves the situation but sadly does not completely fix it. It is still to be researched if we can do better given this HW design. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Due to the HW design, master IRQs are timing critical, so give them precedence over slave IRQ. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
The manual says (55.4.8.6) that HW does automatically send STOP after NACK was received. My measuerments confirm that. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Setting up new messages was done in process context while handling a message was in interrupt context. Because of the HW design, this IP core is sensitive to timing, so the context switches were too expensive. Move this setup to interrupt context as well. In my test setup, this fixed the occasional 'data byte sent twice' issue which a number of people have seen. It also fixes to send REP_START after a read message which was wrongly send as a STOP + START sequence before. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
We want to reuse this function later. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
After making sure to reinit the HW and clear interrupts in the timeout case, we know that interrupts are always disabled in the sections protected by the spinlock. Thus, we can simply remove it which is a preparation for further refactoring. While here, rename the timeout variable to time_left which is way more readable. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-