- 29 6月, 2019 6 次提交
-
-
由 Charles Keepax 提交于
Bring the ACPI path in sync with the device tree path and handle all the IRQ fetching at probe time. This leaves the only IRQ handling at device registration time being that which is passed directly through the board info as either a resource or an actual IRQ number. Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Charles Keepax 提交于
In preparation for future refactoring factor out the fetch of the IRQ into its own helper function. Whilst we are at it update the handling to return the actual error code returned from acpi_dev_get_resources as well. Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Charles Keepax 提交于
Use the available IRQ helper functions, most of the functions have additional helpful side affects like configuring the trigger type of the IRQ. Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Charles Keepax 提交于
Remove the static from i2c_dev_irq_from _resources so that other parts of the core code can use this helper function. Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
https://github.com/peda-r/i2c-mux由 Wolfram Sang 提交于
I realize that there are changes in drivers/i2c/busses/i2c-i801.c that strictly speaking don't belong here, but I hope you don't mind. These changes are all about the interaction with the i2c-mux-gpio code, and I did a test-merge a few days ago w/o conflicts. Anyway, the GPIO-work from Linus Walleij (with help from Serge Semin) in the i2c-mux-gpio and i2c-arb-gpio-challenge drivers is the main feature.
-
由 Wolfram Sang 提交于
Merge tag 'at24-v5.3-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-5.3 at24: updates for v5.3 - simplify the probing code by using devm_i2c_new_dummy_device() - simplify the code further by moving the code around a bit - use struct_size() instead of calculating the required structure size by hand - remove any references to now removed platform data from comments
-
- 27 6月, 2019 1 次提交
-
-
由 Bartosz Golaszewski 提交于
We no longer have platform data in at24, so this comment is invalid. Make it refer to device tree & properties instead. Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: NWolfram Sang <wsa@the-dreams.de>
-
- 26 6月, 2019 9 次提交
-
-
由 Peter Ujfalusi 提交于
J721E SoCs have same I2C IP as OMAP SoCs. Add new compatible to handle J721E SoCs. Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NVignesh Raghavendra <vigneshr@ti.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Maxime Ripard 提交于
Switch the DT binding to a YAML schema to enable the DT validation. Signed-off-by: NMaxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: NRob Herring <robh@kernel.org> Acked-by: NGregory CLEMENT <gregory.clement@bootlin.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Maxime Ripard 提交于
Switch the DT binding to a YAML schema to enable the DT validation. Signed-off-by: NMaxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Stefan Roese 提交于
This patch adds a driver for the I2C controller found on the MediaTek MT7621/7628/7688 SoC's. The base version of this driver was done by Steven Liu (according to the copyright and MODULE_AUTHOR lines). It can be found in the OpenWRT repositories (v4.14 at the time I looked). The base driver had many issues, which are disccussed here: https://en.forum.labs.mediatek.com/t/openwrt-15-05-loads-non-working-i2c-kernel-module-for-mt7688/1286/3 >From this link an enhanced driver version (complete rewrite, mayor changes: support clock stretching, repeated start, ACK handling and unlimited message length) from Jan Breuer can be found here: https://gist.github.com/j123b567/9b555b635c2b4069d716b24198546954 This patch now adds this enhanced I2C driver to mainline. Changes by Stefan Roese for upstreaming: - Add devicetree bindings - checkpatch clean - Use module_platform_driver() - Minor cosmetic enhancements - Removed IO warpped functions - Use readl_relaxed_poll_timeout() and drop poll_down_timeout() - Removed superfluous barrier() in mtk_i2c_reset() - Use i2c_8bit_addr_from_msg() - Added I2C_FUNC_PROTOCOL_MANGLING - Removed adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD; Signed-off-by: NStefan Roese <sr@denx.de> Tested-by: NRené van Dorst <opensource@vdorst.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Stefan Roese 提交于
Add bindings for the I2C controller that can be found in the MediaTek MT7621/7628/7688 SoCs. Signed-off-by: NStefan Roese <sr@denx.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
We are using sysfs functions directly, so we should include the header. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Annaliese McDermond 提交于
Probe function fails to recognize that upstream clock actually doesn't yet exist because clock driver has not been initialized. Actually try to go get the clock and test for its existence before trying to set up a downstream clock based upon it. This fixes a bug that causes the i2c driver not to work with monolithic kernels. Fixes: bebff81f ("i2c: bcm2835: Model Divider in CCF") Signed-off-by: NAnnaliese McDermond <nh6z@nh6z.net> Acked-by: NStefan Wahren <wahrenst@gmx.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Annaliese McDermond 提交于
If any of the clock code in the probe fails and returns, the IRQ will not be freed. Moving the IRQ request to last allows it to be freed on any errors further up in the probe function. devm_ calls can apparently not be used because there are some potential race conditions that will arise. Fixes: bebff81f ("i2c: bcm2835: Model Divider in CCF") Signed-off-by: NAnnaliese McDermond <nh6z@nh6z.net> Acked-by: NStefan Wahren <wahrenst@gmx.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Nobody (including me) noticed that these functions were exported but not added to the header :/ Fixes: 7159dbda ("i2c: core: improve return value handling of i2c_new_device and i2c_new_dummy") Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NBartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: NKieran Bingham <kieran.bingham+renesas@ideasonboard.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 22 6月, 2019 8 次提交
-
-
由 Wolfram Sang 提交于
Use my commercial address, not my community one. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> [Removed a misplaced newline. /Peter] Signed-off-by: NPeter Rosin <peda@axentia.se>
-
由 Wolfram Sang 提交于
We are using sysfs functions directly, so we should include the header. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NPeter Rosin <peda@axentia.se>
-
由 Linus Walleij 提交于
This switches the i801 GPIO mux to use GPIO descriptors for handling the GPIO lines. The previous hack which was reaching inside the GPIO chips etc cannot live on. We pass descriptors along with the GPIO mux device at creation instead. The GPIO mux was only used by way of platform data with a platform device from one place in the kernel: the i801 i2c bus driver. Let's just associate the GPIO descriptor table with the actual device like everyone else and dynamically create a descriptor table passed along with the GPIO i2c mux. This enables simplification of the GPIO i2c mux driver to use only the descriptor API and the OF probe path gets simplified in the process. The i801 driver was registering the GPIO i2c mux with PLATFORM_DEVID_AUTO which would make it hard to predict the device name and assign the descriptor table properly, but this seems to be a mistake to begin with: all of the GPIO mux devices are hardcoded to look up GPIO lines from the "gpio_ich" GPIO chip. If there are more than one mux, there is certainly more than one gpio chip as well, and then we have more serious problems. Switch to PLATFORM_DEVID_NONE instead. There can be only one. Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Peter Rosin <peda@axentia.se> Cc: Jean Delvare <jdelvare@suse.com> Signed-off-by: NSerge Semin <fancer.lancer@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> [Removed a newline, suggested by Andy. /Peter] Signed-off-by: NPeter Rosin <peda@axentia.se>
-
由 Bitan Biswas 提交于
The usage of BUG() macro is generally discouraged in kernel, unless it's a problem that results in a physical damage or loss of data. This patch removes unnecessary BUG() macros and replaces the rest with warning. Signed-off-by: NBitan Biswas <bbiswas@nvidia.com> Reviewed-by: NDmitry Osipenko <digetx@gmail.com> Tested-by: NDmitry Osipenko <digetx@gmail.com> Acked-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Jarkko Nikula 提交于
Add PCI ID for Intel Elkhart Lake PCH. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Reviewed-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Alexander Sverdlin 提交于
Add SMBUS 2.0 Block Write-Block Read Process Call command support. Signed-off-by: NAlexander Sverdlin <alexander.sverdlin@nokia.com> Reviewed-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Fabrice Gasnier 提交于
During probe, return the "get_irq" error value instead of -EINVAL which allows the driver to be deferred probed if needed. Fix also the case where of_irq_get() returns a negative value. Note : On failure of_irq_get() returns 0 or a negative value while platform_get_irq() returns a negative value. Fixes: aeb068c5 ("i2c: i2c-stm32f7: add driver") Reviewed-by: NPierre-Yves MORDRET <pierre-yves.mordret@st.com> Signed-off-by: NFabien Dessenne <fabien.dessenne@st.com> Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
match_string() returns the array index of a matching string. Use it instead of the open-coded implementation. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Reviewed-by: NJean Delvare <jdelvare@suse.de> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 15 6月, 2019 13 次提交
-
-
由 Lee Jones 提交于
Add a match table to allow automatic probing of ACPI device QCOM0220. Ignore clock attainment errors. Set default clock frequency value. Signed-off-by: NLee Jones <lee.jones@linaro.org> Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Lee Jones 提交于
The Qualcomm Geni I2C driver currently probes silently which can be confusing when debugging potential issues. Add a low level (INFO) print when each I2C controller is successfully initially set-up. Signed-off-by: NLee Jones <lee.jones@linaro.org> Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: NBjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Bitan Biswas 提交于
Post suspend I2C registers have power on reset values. Before any transfer initialize I2C registers to prevent I2C transfer timeout and implement suspend and resume callbacks needed. Fix below errors post suspend: 1) Tegra I2C transfer timeout during jetson tx2 resume: [ 27.520613] pca953x 1-0074: calling pca953x_resume+0x0/0x1b0 @ 2939, parent: i2c-1 [ 27.633623] tegra-i2c 3160000.i2c: i2c transfer timed out [ 27.639162] pca953x 1-0074: Unable to sync registers 0x3-0x5. -110 [ 27.645336] pca953x 1-0074: Failed to sync GPIO dir registers: -110 [ 27.651596] PM: dpm_run_callback(): pca953x_resume+0x0/0x1b0 returns -110 [ 27.658375] pca953x 1-0074: pca953x_resume+0x0/0x1b0 returned -110 after 127152 usecs [ 27.666194] PM: Device 1-0074 failed to resume: error -110 2) Tegra I2C transfer timeout error on jetson Xavier post resume. Remove i2c bus lock-unlock calls in resume callback as i2c_mark_adapter_* (suspended-resumed) help ensure i2c core calls from client are not executed before i2c-tegra resume. Signed-off-by: NBitan Biswas <bbiswas@nvidia.com> Reviewed-by: NDmitry Osipenko <digetx@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Let's stick to coding style. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Update kerneldoc for i2c client flags because they increased over time. Also, move them to a position where they can be more easily found. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Much better to read and understand. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
Much better to read and understand. Naming for i2c_adapter is not consistent (yet), so use the name which is also used in core code. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Wolfram Sang 提交于
It is not a struct device, so 'dev' is confusing. Use 'adap', the most common name. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sagar Shrikant Kadam 提交于
The i2c-ocore driver already has a polling mode interface.But it needs a workaround for FU540 Chipset on HiFive unleashed board (RevA00). There is an erratum in FU540 chip that prevents interrupt driven i2c transfers from working, and also the I2C controller's interrupt bit cannot be cleared if set, due to this the existing i2c polling mode interface added in mainline earlier doesn't work, and CPU stall's infinitely, when-ever i2c transfer is initiated. Ref: commit dd7dbf0e ("i2c: ocores: refactor setup for polling") The workaround / fix under OCORES_FLAG_BROKEN_IRQ is particularly for FU540-COOO SoC. The polling function identifies a SiFive device based on the device node and enables the workaround. Signed-off-by: NSagar Shrikant Kadam <sagar.kadam@sifive.com> Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sagar Shrikant Kadam 提交于
Update device id table for Opencore's I2C master based re-implementation used in FU540-c000 chipset on HiFive Unleashed platform. Device ID's include Sifive, soc-specific device for chip specific tweaks and sifive IP block specific device for generic programming model. Signed-off-by: NSagar Shrikant Kadam <sagar.kadam@sifive.com> Reviewed-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Sagar Shrikant Kadam 提交于
Reformatted compatibility strings to one valid combination on each line. Add FU540-C000 specific device tree bindings to already available i2-ocores file. This device is available on HiFive Unleashed Rev A00 board. Move interrupt under optional property list as this can be optional. The FU540-C000 SoC from sifive, has an Opencore's I2C block reimplementation. The DT compatibility string for this IP is present in HDL and available at. https://github.com/sifive/sifive-blocks/blob/master/src/main/scala/devices/i2c/I2C.scala#L73Signed-off-by: NSagar Shrikant Kadam <sagar.kadam@sifive.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Thierry Reding 提交于
If the driver defers probe because of a missing clock, avoid outputting an error message. The clock will show up eventually. Signed-off-by: NThierry Reding <treding@nvidia.com> Acked-by: NJon Hunter <jonathanh@nvidia.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Andy Shevchenko 提交于
The commit 19b07cb4 ("i2c: i801: Register optional lis3lv02d I2C device on Dell machines") introduced a new check in order to enumerate some slave devices on Dell machines. Though, it brings a regression on machines where DMI vendor is not set. BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 8 PID: 1 Comm: swapper/0 Not tainted 5.2.0-rc4-next-20190613+ #317 RIP: 0010:strcmp+0xc/0x20 To fix this crash, check if vendor field is present before accessing to it. Fixes: 19b07cb4 ("i2c: i801: Register optional lis3lv02d I2C device on Dell machines") Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
- 12 6月, 2019 3 次提交
-
-
由 Linus Walleij 提交于
The IOP3xx has some elaborate code to directly slam the GPIO lines multiplexed with I2C down low before enablement, apparently a workaround for a hardware bug found in the early chips. After consulting the developer documentation for IOP80321 and IOP80331 I can clearly see that this may be useful for IOP80321 family (mach-iop32x) but it is highly dubious for any 80331 series or later chip: in these chips the lines are not multiplexed for UARTs. We convert the code to pass optional GPIO descriptors and register these only on the 80321-based boards where it makes sense, optionally obtain them in the driver and use the gpiod_set_raw_value() to ascertain the line gets driven low when needed. The GPIO driver does not give the GPIO chip a reasonable label so the patch also adds that so that these machine descriptor tables can be used. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NDan Williams <dan.j.williams@intel.com> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Linus Walleij 提交于
The S3C2410 does some funny dance around its pins: - First try to call back to the platform to get and control some GPIO pins - If this doesn't work, it tries to get a pin control handle - If this doesn't work, it retrieves two GPIOs from the device tree node and does nothing with them If we're gonna retrieve two GPIOs and do nothing with them, we might as well do it using the GPIO descriptor API. When we use the resource management API, the code gets smaller. Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NKrzysztof Kozlowski <krzk@kernel.org> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Annaliese McDermond 提交于
Model the I2C bus clock divider as a part of the Core Clock Framework. Primarily this removes the clk_get_rate() call from each transfer. This call causes problems for slave drivers that themselves have internal clock components that are controlled by an I2C interface. When the slave's internal clock component is prepared, the prepare lock is obtained, and it makes calls to the I2C subsystem to command the hardware to activate the clock. In order to perform the I2C transfer, this driver sets the divider, which requires it to get the parent clock rate, which it does with clk_get_rate(). Unfortunately, this function will try to take the clock prepare lock, which is already held by the slave's internal clock calls creating a deadlock. Modeling the divider in the CCF natively removes this dependency and the divider value is only set upon changing the bus clock frequency or changes in the parent clock that cascade down to this divisor. This obviates the need to set the divider with every transfer and avoids the deadlock described above. It also should provide better clock debugging and save a few cycles on each transfer due to not having to recalcuate the divider value. Signed-off-by: NAnnaliese McDermond <nh6z@nh6z.net> Acked-by: NStefan Wahren <stefan.wahren@i2se.com> Reviewed-by: NEric Anholt <eric@anholt.net> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-