- Apr 20, 2017
-
-
chin.yew.tan@intel.com authored
Sda-hold-time is an important parameter for tuning i2c to meet the electrical specification especially for high speed. I2C with incorrect sda-hold-time may cause lost arbitration error. Instead of loading all speed mode settings, only selected speed mode settings are loaded. Signed-off-by:
Tan Chin Yew <chin.yew.tan@intel.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
https://github.com/peda-r/i2c-muxWolfram Sang authored
Pull in trivial change from the i2c-mux subsubsystem: "I thought Mauro would take this patch, but then he just added a tag. So, here's a late incremental pull request for v4.12-rc1..."
-
- Apr 19, 2017
-
-
Peter Rosin authored
i2c_mux_add_adapter already logs a message on failure. Reviewed-by:
Wolfram Sang <wsa@the-dreams.de> Reviewed-by:
Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
- Apr 17, 2017
-
-
Wolfram Sang authored
Pull in the immutable branch with I2C ACPI core extensions to support the INT33FE driver.
-
Hans de Goede authored
By default the i2c-core will try to get an irq with index 0 on ACPI / of instantiated devices. This is troublesome on some ACPI systems where the irq info at index 0 in the CRS table may contain nonsense and/or point to an irqchip for which there is no Linux driver. If this happens then before this commit the driver's probe method would never get called because i2c_device_probe will try to get an irq by calling acpi_dev_gpio_irq_get which will always return -EPROBE in this case, as it waits for a matching irqchip driver to load. Thus causing the driver to not get a chance to bind. This commit adds a new disable_i2c_core_irq_mapping flag to struct i2c_driver which a driver can set to tell the core to skip irq mapping. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Hans de Goede authored
By default the i2c subsys creates an i2c-client for the first I2cSerialBus resource of an acpi_device, but some acpi_devices have multiple I2cSerialBus resources and we may want to instantiate i2c-clients for the others. This commit adds a new i2c_acpi_new_device function which can be used to create an i2c-client for any I2cSerialBus resource of an acpi_device. Note that the other resources may even be on a different i2c bus, so just retrieving the client address is not enough. Here is an example DSDT excerpt from such a device: Device (WIDR) { Name (_HID, "INT33FE" /* XPOWER Battery Device */) Name (_CID, "INT33FE" /* XPOWER Battery Device */) Name (_DDN, "WC PMIC Battery Device") <snip> Name (RBUF, ResourceTemplate () { I2cSerialBusV2 (0x005E, ControllerInitiated, 0x000186A0, AddressingMode7Bit, "\\_SB.PCI0.I2C7", 0x00, ResourceConsumer, , Exclusive, ) I2cSerialBusV2 (0x0036, ControllerInitiated, 0x000186A0, AddressingMode7Bit, "\\_SB.PCI0.I2C1", 0x00, ResourceConsumer, , Exclusive, ) I2cSerialBusV2 (0x0022, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.PCI0.I2C1", 0x00, ResourceConsumer, , Exclusive, ) I2cSerialBusV2 (0x0054, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.PCI0.I2C1", 0x00, ResourceConsumer, , Exclusive, ) GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000, "\\_SB.PCI0.I2C7.PMI5", 0x00, ResourceConsumer, , ) { // Pin list 0x0012 } GpioInt (Edge, ActiveLow, ExclusiveAndWake, PullNone, 0x0000, "\\_SB.GPO1", 0x00, ResourceConsumer, , ) { // Pin list 0x0005 } GpioInt (Level, ActiveLow, Exclusive, PullNone, 0x0000, "\\_SB.PCI0.I2C7.PMI5", 0x00, ResourceConsumer, , ) { // Pin list 0x0013 } }) Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Return (RBUF) /* \_SB_.PCI0.I2C7.WIDR.RBUF */ } <snip> } Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Hans de Goede authored
Modify struct i2c_acpi_lookup and i2c_acpi_fill_info() to allow using them to get the info from a certain index in the ACPI-resource list rather then taking the first I2cSerialBus resource. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Reviewed-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Geliang Tang authored
Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by:
Geliang Tang <geliangtang@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Edgar Cherkasov authored
Description of the problem: - i2c-scmi driver contains only two identifiers "SMBUS01" and "SMBUSIBM"; - the fist HID (SMBUS01) is clearly defined in "SMBus Control Method Interface Specification, version 1.0": "Each device must specify 'SMBUS01' as its _HID and use a unique _UID value"; - unfortunately, BIOS vendors (like AMI) seem to ignore this requirement and implement "SMB0001" HID instead of "SMBUS01"; - I speculate that they do this because only "SMB0001" is hard coded in Windows SMBus driver produced by Microsoft. This leads to following situation: - SMBus works out of box in Windows but not in Linux; - board vendors are forced to add correct "SMBUS01" HID to BIOS to make SMBus work in Linux. Moreover the same board vendors complain that tools (3-rd party ASL compiler) do not like the "SMBUS01" identifier and produce errors. So they need to constantly patch the compiler for each new version of BIOS. As it is very unlikely that BIOS vendors implement a correct HID in future, I would propose to consider whether it is possible to work around the problem by adding MS HID to the Linux i2c-scmi driver. v2: move the definition of the new HID to the driver itself. Signed-off-by:
Edgar Cherkasov <echerkasov@dev.rtsoft.ru> Signed-off-by:
Michael Brunner <Michael.Brunner@kontron.com> Acked-by:
Viktor Krasnov <vkrasnov@dev.rtsoft.ru> Reviewed-by:
Jean Delvare <jdelvare@suse.de> Reviewed-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
https://github.com/peda-r/i2c-muxWolfram Sang authored
Pull in changes from the i2c-mux subsubsystem: "Here are a new LTC4306/5 driver, a fix needed by the RT kernel and some error message cleanup."
-
- Apr 12, 2017
-
-
Michael Hennerich authored
This patch adds support for the Analog Devices / Linear Technology LTC4306 and LTC4305 4/2 Channel I2C Bus Multiplexer/Switches. The LTC4306 optionally provides two general purpose input/output pins (GPIOs) that can be configured as logic inputs, opendrain outputs or push-pull outputs via the generic GPIOLIB framework. Signed-off-by:
Michael Hennerich <michael.hennerich@analog.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
Michael Hennerich authored
This patch adds support for the Analog Devices / Linear Technology LTC4306 and LTC4305 4/2 Channel I2C Bus Multiplexer/Switches. The LTC4306 optionally provides two general purpose input/output pins (GPIOs) that can be configured as logic inputs, opendrain outputs or push-pull outputs via the generic GPIOLIB framework. Signed-off-by:
Michael Hennerich <michael.hennerich@analog.com> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
- Apr 03, 2017
-
-
Peter Rosin authored
i2c_mux_add_adapter already logs a message on failure. Reviewed-by:
Wolfram Sang <wsa@the-dreams.de> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
Peter Rosin authored
i2c_mux_add_adapter already logs a message on failure. Reviewed-by:
Wolfram Sang <wsa@the-dreams.de> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
Peter Rosin authored
i2c_mux_add_adapter already logs a message on failure. Reviewed-by:
Wolfram Sang <wsa@the-dreams.de> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
Peter Rosin authored
i2c_mux_add_adapter already logs a message on failure. Reviewed-by:
Wolfram Sang <wsa@the-dreams.de> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
Peter Rosin authored
i2c_mux_add_adapter already logs a message on failure. Reviewed-by:
Wolfram Sang <wsa@the-dreams.de> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
Peter Rosin authored
i2c_mux_add_adapter already logs a message on failure. Reviewed-by:
Wolfram Sang <wsa@the-dreams.de> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
Peter Rosin authored
No callers then need to report any further info, thus reducing both the amount of code and the log noise. Reviewed-by:
Wolfram Sang <wsa@the-dreams.de> Signed-off-by:
Peter Rosin <peda@axentia.se>
-
- Mar 30, 2017
-
-
Heiner Kallweit authored
The preceding changes in this patch series now allow to simplify the interrupt handler significantly. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Heiner Kallweit authored
meson_i2c_write_tokens is always called directly after meson_i2c_prepare_xfer (and only then). So we can simplify the code by removing meson_i2c_write_tokens and moving the two statements of meson_i2c_write_tokens to the end of meson_i2c_prepare_xfer. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Heiner Kallweit authored
We can directly add the stop token to the token chain including the last transfer chunk. This is more efficient than creating a separate token chain just for the stop command. And it allows us to get rid of state STATE_STOP completely. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Heiner Kallweit authored
If state is STATE_IDLE no interrupt should occur. Return IRQ_NONE if such a spurious interrupt is detected. Not having to take care of STATE_IDLE later in the interrupt handler allows to further simplify the interrupt handler in subsequent patches of this series. In addition move resetting REG_CTRL_START bit to the start of the interrupt handler to ensure that the start bit is always reset. Currently the start bit is not reset for STATE_STOP because i2c->state is set to STATE_IDLE. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Heiner Kallweit authored
Variable count has always the same value as i, so we don't need it. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Heiner Kallweit authored
The clock divider has 12 bits, splitted into a 10 bit field and a 2 bit field. The extra 2 bits aren't used currently. Change this to use the full 12 bits and warn if the requested frequency is too low. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Acked-by:
Jerome Brunet <jbrunet@baylibre.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Heiner Kallweit authored
We don't have to parse the DT manually to retrieve the bus frequency and we don't have to maintain an own default for the bus frequency. Let the i2c core do this for us. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by:
Jerome Brunet <jbrunet@baylibre.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Heiner Kallweit authored
The bus frequency is fixed to what is set DT, therefore we can set the clock divider in probe already and we don't have to set it for each transfer. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Heiner Kallweit authored
Member irq can be replaced with a local variable in probe because it's nowhere else accessed. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by:
Jerome Brunet <jbrunet@baylibre.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Heiner Kallweit authored
Use min instead of min_t where min_t isn't needed. Signed-off-by:
Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Mar 24, 2017
-
-
Jan Glauber authored
Add support for reading the system clock and the TWSI clock frequency from ACPI DSDT. TWSI clock was already covered by using device_property_read(). Signed-off-by:
Jan Glauber <jglauber@cavium.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Jayachandran C authored
ARCH_VULCAN arm64 platform (for Broadcom Vulcan ARM64 processors) has been discontinued. Cavium's ThunderX2 CN99XX (ARCH_THUNDER2) will be the next revision of the platform. Update compile dependencies and ACPI ID to reflect this change. There is not need to retain ARCH_VULCAN since the Vulcan processor was never in production and the config option will be removed soon. Signed-off-by:
Jayachandran C <jnair@caviumnetworks.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Philipp Zabel authored
As of commit bb475230 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by:
Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Jon Hunter authored
Enable the Tegra BPMP I2C adapter by default if the Tegra BPMP itself is enabled. This adapter is used as the I2C interface for the PMIC on the Tegra186 Jetson-TX2 platform. Signed-off-by:
Jon Hunter <jonathanh@nvidia.com> Acked-by:
Thierry Reding <treding@nvidia.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
- Mar 22, 2017
-
-
Liang Chen authored
The rk3328 i2c is the same as rk3399 Signed-off-by:
Liang Chen <cl@rock-chips.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Hans de Goede authored
Cherrytrail devices use the dw i2c-bus with uid 7 to access their PMIC. Even if the i2c-bus to the PMIC is not shared with the SoC's P-Unit and i2c-designware-baytrail.c thus does not set the pm_disabled flag, we still need to disable pm so that ACPI PMIC opregions can access the PMIC during late-suspend and early-resume. This fixes errors like these blocking suspend: i2c_designware 808622C1:06: timeout waiting for bus ready ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion] acpi 80860F14:02: Failed to change power state to D3hot PM: late suspend of devices failed Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Hans de Goede authored
Currently we are already setting a pm_runtime_disabled flag and disabling runtime-pm for i2c-busses used for accessing the system PMIC on x86. But this is not enough, there are ACPI opregions which may want to access the PMIC during late-suspend and early-resume, so we need to completely disable pm to be safe. This commit renames the flag from pm_runtime_disabled to pm_disabled and adds the following new behavior if the flag is set: 1) Call dev_pm_syscore_device(dev, true) which disables normal suspend / resume and remove the pm_runtime_disabled check from dw_i2c_plat_resume since that will now never get called. This fixes suspend_late handlers which use ACPI PMIC opregions causing errors like these: PM: Suspending system (freeze) PM: suspend of devices complete after 1127.751 msecs i2c_designware 808622C1:06: timeout waiting for bus ready ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion] acpi 80860F14:02: Failed to change power state to D3hot PM: late suspend of devices failed 2) Set IRQF_NO_SUSPEND irq flag. This fixes resume_early handlers which handlers which use ACPI PMIC opregions causing errors like these: PM: resume from suspend-to-idle i2c_designware 808622C1:06: controller timed out ACPI Exception: AE_ERROR, Returned by Handler for [UserDefinedRegion] Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Oliver Neukum authored
Our testing shows the semaphore failing to be transferred on CherryTrail in about 0.5% of all cases. The existing timeout needs to be lengthened to accommodate the worst cases. V2: Rebased on https://cgit.freedesktop.org/drm-intel/commit/?h=topic/designware-baytrail Signed-off-by:
Oliver Neukum <oneukum@suse.com> Reviewed-by:
Hans de Goede <hdegoede@redhat.com> Acked-by:
Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by:
Wolfram Sang <wsa@the-dreams.de>
-
Wolfram Sang authored
Merge tag 'topic/designware-baytrail-2017-03-02' of git://anongit.freedesktop.org/git/drm-intel into i2c/for-next Pull immutable branch as a common base for further development: "Baytrail PMIC vs. PMU race fixes from Hans de Goede This time the right version (v4), with the compile fix."
-
- Mar 20, 2017
-
-
Linus Torvalds authored
-
Linus Torvalds authored
This BUG_ON() triggered for me once at shutdown, and I don't see a reason for the check. The code correctly checks whether the swap slot cache is usable or not, so an uninitialized swap slot cache is not actually problematic afaik. I've temporarily just switched the BUG_ON() to a WARN_ON_ONCE(), since I'm not sure why that seemingly pointless check was there. I suspect the real fix is to just remove it entirely, but for now we'll warn about it but not bring the machine down. Cc: "Huang, Ying" <ying.huang@intel.com> Cc: Tim Chen <tim.c.chen@linux.intel.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-