- 05 Sep, 2017 33 commits
-
-
Hans de Goede authored
Both Bay and Cherry Trail devices may be used together with a Crystal Cove PMIC. Each platform has its own variant of the PMIC, which both use the same ACPI HID, but they are not 100% compatible. This commits makes the intel_soc_pmic_core code check the _HRV of the ACPI-firmware-node and selects intel_soc_pmic_config_byt_crc resp. intel_soc_pmic_config_cht_crc based on this. This fixes the Bay Trail specific ACPI OpRegion code causing problems on Cherry Trail devices. Specifically this was causing the external microsd slot on a Dell Venue 8 5855 (Cherry Trail version) to not work and the eMMC to become unreliable and throw lots of errors. Fixes: 51652384 ("mfd: intel_soc_pmic: Core driver") Reported-and-tested-by:
russianneuromancer <russianneuromancer@ya.ru> Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Hans de Goede authored
Both Bay and Cherry Trail devices may be used together with a Crystal Cove PMIC. Each platform has its own variant of the PMIC, which both use the same ACPI HID, but they are not 100% compatible. Looking at the android x86 kernel sources where most of the Crystal Cove code comes from, it talks about "Valley View", "Bay Trail" and / or BYT without ever mentioning Cherry Trail, with the exception of the regulator driver. The Asus Zenfone-2 kernel code has 2 regulator drivers, one for Crystal Cove and one for what it calls Crystal Cove Plus. The Crystal Cove Plus regulator driver is the only one to mention Cherry Trail and that driver uses different register addresses then the normal (Bay Trail) Crystal Cove regulator driver, showing that at least the regulator register addresses are different. The GPIO code should work on both, and the PWM code is known to work on both and is necessary for backlight control on some Cherry Trail devices. Testing has shown that the ACPI OpRegion code otoh is causing problems on Cherry Trail devices, which is not surprising as it deals with the regulators and those have different register addresses on CHT. Specifically the ACPI OpRegion code causes the external microsd slot on a Dell Venue 8 5855 (Cherry Trail version) to not work and the eMMC to become unreliable and throw lots of errors. This commit replaces the single mfd_cell array currently used for Crystal Cove with 2 separate arrays, one for the Bay Trail variant and one for the Cherry Trail variant, note that the Cherry Trail version of the array only contains gpio and pwm cells. The PMIC OpRegion cell is deliberately not included and drivers for the other cells in the Bay Trail cell array were never upstreamed. Fixes: 7cf0a66f ("mfd: intel_soc_pmic: Crystal Cove support") Reported-and-tested-by:
russianneuromancer <russianneuromancer@ya.ru> Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Reviewed-by:
Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Andrey Smirnov authored
Add Device Tree bindings for RAVE Supervisory Processor, an MCU implementing varoius bits of housekeeping functionality (watchdoging, backlight control, LED control, etc) on RAVE family of products by Zodiac Inflight Innovations. Acked-by:
Rob Herring <robh+dt@kernel.org> Signed-off-by:
Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Arnd Bergmann authored
gcc-8 notices that the register number calculation is wrong when the offset is an 'u8' but the number is larger than 256: drivers/mfd/omap-usb-tll.c: In function 'omap_tll_init': drivers/mfd/omap-usb-tll.c:90:46: error: overflow in conversion from 'int' to 'u8 {aka unsigned char}' chages value from 'i * 256 + 2070' to '22' [-Werror=overflow] This addresses it by always using a 32-bit offset number for the register. This is apparently an old problem that previous compilers did not find. Fixes: 16fa3dc7 ("mfd: omap-usb-tll: HOST TLL platform driver") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Arvind Yadav authored
spi_device_id are not supposed to change at runtime. All functions working with spi_device_id provided by <linux/i2c.h> work with const spi_device_id. So mark the non-const structs as const. Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Furquan Shaikh authored
Commit 274e43ed ("mfd: intel-lpss: Do not put device in reset state on suspend") changed the behavior on suspend by not putting LPSS controllers into reset. This was done because S3/S0ix fail if UART device is put into reset and no_console_suspend flag is enabled. Because of the above change, I2C controller gets into a bad state if it observes that the I2C lines are pulled low when power to I2C device is cut off during suspend (generally, I2C lines are pulled to power rail of the I2C device in order to ensure that there is no leakage because of the pulls when device is turned off). This results in the controller timing out for all future I2C operations after resume. It is primarily because of the following sequence of operations: During suspend: 1. I2C controller is disabled, but it is not put into reset. 2. Power to I2C device is cut off. 3. #2 results in the I2C lines being pulled low. ==> At this point the I2C controller gets into a bad state On resume: 1. Power to I2C device is enabled. 2. #2 results in the I2C lines being pulled high. 3. I2C controller is enabled. However, even after enabling the I2C controller, all future I2C xfers fail since the controller is in a bad state and does not attempt to make any transactions and hence times out. In order to ensure that the controller does not get into a bad state, this change puts it into reset if the controller type is not UART. With this change, the order of operations is: During suspend: 1. I2C controller is disabled and put into reset. 2. Power to I2C device is cut off. 3. #2 results in the I2C lines being pulled low. On resume: 1. Power to I2C device is enabled. 2. #2 results in the I2C lines being pulled high. 3. I2C controller is enabled and taken out of reset. Signed-off-by:
Furquan Shaikh <furquan@google.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Arvind Yadav authored
i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by <linux/i2c.h> work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Florian R. Hölzlwimmer authored
This patch adds a missing PCI ID of the Intel Sunrise Point chipset to the Intel LPSS driver. It fixes a bug causing the touchpad of the Lenovo Yoga 720-15 not to be recognized. See also bug 1700657 on bugs.launchpad.net. Many thanks to CoolStar, who found this solution! Reported-by:
CoolStar <coolstarorganization@gmail.com> Tested-by:
Mike Schwartz <mykesx@gmail.com> Tested-by:
Björn Dahlgren <bjodah@gmail.com> Signed-off-by:
Florian R. Hölzlwimmer <git.ich@frhoelzlwimmer.de> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Arvind Yadav authored
clk_prepare_enable() can fail here and we must check its return value. we must disable clock, if t7l66xb_probe is not successful. Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Marek Vasut authored
Add DT bindings for the ROHM BD9571MWV-M PMIC. This PMIC has the following features: - multiple voltage monitors for 1V8, 2V5, 3V3 voltage rail - one voltage regulator for DVFS - two GPIOs Signed-off-by:
Marek Vasut <marek.vasut+renesas@gmail.com> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Hans de Goede authored
The PMIC provides ACPI OpRegions which must be available for other drivers' PS0 / PS3 methods early-on as such it must be builtin as the Kconfig help text already states. Somehow its Kconfig option ended up being a tristate though, this fixes this. Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Axel Lin authored
This fixes missing mfd_remove_devices() call when unload the module. Signed-off-by:
Axel Lin <axel.lin@ingics.com> Reviewed-by:
Keerthy <j-keerthy@ti.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Rajmohan Mani authored
The TPS68470 device is an advanced power management unit that powers a Compact Camera Module (CCM), generates clocks for image sensors, drives a dual LED for Flash and incorporates two LED drivers for general purpose indicators. This patch adds support for TPS68470 mfd device. Signed-off-by:
Rajmohan Mani <rajmohan.mani@intel.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Mika Westerberg authored
At least on Lenovo Thinkpad Yoga, the BIOS seems to monitor the SPI-NOR write protection bit and if it is flipped to read/write it assumes the BIOS configuration was changed on next reboot. It then, for unknown reasons, resets the BIOS settings back to default. We can prevent this by just leaving the write protection bit intact and let the SPI-NOR driver know whether the device is writable or not. In case of this particular Lenovo the SPI-NOR flash will be exposed as read-only. Fixes: ff00d7a3 ("mfd: lpc_ich: Add support for SPI serial flash host controller") Link: https://bugzilla.kernel.org/show_bug.cgi?id=195951Reported-by:
Abdó Roig-Marange <abdo.roig@gmail.com> Signed-off-by:
Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Ludovic Desroches authored
For HSMC controller, the register layout depends on the device i.e. the offset of setup, pulse, cycle, mode and timings registers is not the same. An helper is added to provide the correct register layout. Fixes: fe9d7cb2 ("mfd: syscon: atmel-smc: Add new helpers to ease SMC regs manipulation") Suggested-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by:
Ludovic Desroches <ludovic.desroches@microchip.com> Acked-by:
Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by:
Nicolas Ferre <nicolas.ferre@microchip.com> Acked-by:
Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Quentin Schulz authored
According to their datasheets, the AXP221, AXP223, AXP288, AXP803, AXP809 and AXP813 PEK have different values for startup time bits from the AXP20X, let's use the platform device id with the correct values. Signed-off-by:
Quentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by:
Chen-Yu Tsai <wens@csie.org> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Chen-Yu Tsai authored
The X-Powers AXP813 is a PMIC designed to be paired with Allwinner's A83T SoC. There is also an AXP818, which is paired with the H8 SoC. The two models seem to be identical, apart from the external markings. This patch introduces the basic mfd and regulator bindings for the AXP813. Signed-off-by:
Chen-Yu Tsai <wens@csie.org> Acked-by:
Rob Herring <robh@kernel.org> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Chen-Yu Tsai authored
The X-Powers AXP813 PMIC is normally used with Allwinner's A83T SoC. It has the same range of functions as other X-Powers PMICs, such as DC-DC buck converter and linear regulator outputs, AC-IN and VBUS power supplies, power button trigger, GPIOs, ADCs, and a battery charger. Note that the IRQ table given in the datasheet is incorrect: in IRQ enable/status registers 1, there are separate IRQs for ACIN and VBUS, instead of bits [7:5] being the same as bits [4:2]. So it shares the same IRQs as the AXP803, rather than the AXP288. This patch adds basic mfd support for it, with only the power button enabled. Signed-off-by:
Chen-Yu Tsai <wens@csie.org> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Chen-Yu Tsai authored
The binding already lists compatibles and regulators for the AXP806, but it is missing from the list of supported chips at the beginning. Add it. Fixes: 204ae296 ("mfd: axp20x: Add bindings for AXP806 PMIC") Signed-off-by:
Chen-Yu Tsai <wens@csie.org> Acked-by:
Rob Herring <robh@kernel.org> Acked-by:
Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Marek Vasut authored
Add the MFD part of the ROHM BD9571MWV-M PMIC driver and MAINTAINERS entry. The MFD part only specifies the regmap bits for the PMIC and binds the subdevs together. Signed-off-by:
Marek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Guodong Xu authored
Add support for HiSilicon Hi6421v530 PMIC. Hi6421v530 communicates with main SoC via memory-mapped I/O. Hi6421v530 and Hi6421 are PMIC chips from the same vendor, HiSilicon, but at different revisions. They share the same memory-mapped I/O design. They differ in integrated devices, such as regulator details, LDO voltage points. Signed-off-by:
Guodong Xu <guodong.xu@linaro.org> Signed-off-by:
Wang Xiaoyin <hw.wangxiaoyin@hisilicon.com> Acked-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Guodong Xu authored
Update dev_err messages to make them more readable. Signed-off-by:
Guodong Xu <guodong.xu@linaro.org> Acked-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Guodong Xu authored
Change license text to a shorter form of GPLv2. Signed-off-by:
Guodong Xu <guodong.xu@linaro.org> Acked-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Michal Simek authored
MTF_CORE should be enabled when driver is enabled. Without this patch you can configure: CONFIG_MFD_CORE is not set CONFIG_MFD_TPS65086=y ... which ends up with compilation error: drivers/mfd/tps65086.o: In function `tps65086_probe': drivers/mfd/tps65086.c:110: undefined reference to `mfd_add_devices' drivers/mfd/tps65086.c:110:(.text+0x128): relocation truncated to fit: \ R_AARCH64_CALL26 against undefined symbol `mfd_add_devices' Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Ludovic Desroches authored
A new compatible string is introduced for SMC on sama5d2 to manage a different layout of the registers. Signed-off-by:
Ludovic Desroches <ludovic.desroches@microchip.com> │Acked-by: Rob Herring <robh@kernel.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Arvind Yadav authored
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 16298 1009 184 17491 4453 drivers/mfd/ab8500-core.o File size After adding 'const': text data bss dec hex filename 16490 817 184 17491 4453 drivers/mfd/ab8500-core.o Signed-off-by:
Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Sebastian Reichel authored
DA9052 allows using the touchscreen input pins as general purpose analogue input pin by wiring analogue inputs to X+, X-, Y+ and Y- and providing a reference voltage at TSIREF pin. Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Christophe JAILLET authored
if 'max8998_i2c_parse_dt_pdata() fails (when out of memory), a NULL pointer dereference will occur in the error handling code. Return directly instead. Fixes: ee999fb3("mfd: max8998: Add support for Device Tree") Signed-off-by:
Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Julia Lawall authored
Drop static on a local variable, when the variable is initialized before any use, on every possible execution path through the function. The static has no benefit, and dropping it reduces the code size. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @bad exists@ position p; identifier x; type T; @@ static T x@p; ... x = <+...x...+> @@ identifier x; expression e; type T; position p != bad.p; @@ -static T x@p; ... when != x when strict ?x = e; // </smpl> The change in code size is indicates by the following output from the size command. before: text data bss dec hex filename 2579 240 16 2835 b13 drivers/mfd/max8925-i2c.o after: text data bss dec hex filename 2531 240 8 2779 adb drivers/mfd/max8925-i2c.o Signed-off-by:
Julia Lawall <Julia.Lawall@lip6.fr> Acked-by:
Kees Cook <keescook@chromium.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Sebastian Reichel authored
It is possible that under heavy system load, the counter in the completion struct, used for waiting for end of AD conversion, gets incremented twice. To make sure the driver recovers from this situation, the completion struct should be reinitialized. Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Colin Ian King authored
Don't populate the arrays depath and cd_mask on the stack but make them static const. Makes the object code smaller: text data bss dec hex filename 25413 7216 448 33077 8135 drivers/mfd/rtsx_pcr.o text data bss dec hex filename 25151 7360 448 32959 80bf drivers/mfd/rtsx_pcr.o Signed-off-by:
Colin Ian King <colin.king@canonical.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Dan Carpenter authored
Saying it "returns the result" seems tautological. The read function does not return num_bytes on success, it returns zero on success. I noticed this discrepancy because some of the callers were checking for >= 0. Signed-off-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Lee Jones authored
Merge branches 'ib-mfd-arm-i2c-4.14', 'ib-mfd-arm-usb-video-4.14', 'ib-mfd-hwmon-4.14', 'ib-mfd-iio-pwm-4.14', 'ib-mfd-input-rtc-4.14', 'ib-mfd-many-4.14' and 'ib-mfd-pinctrl-regulator-4.14' into ibs-for-mfd-merged
-
- 04 Sep, 2017 7 commits
-
-
Fabrice Gasnier authored
STM32 ADC supports hardware triggers like STM32 Low-Power Timer. For instance, STM32H7 ADC may be triggered by instances 1, 2 or 3. Add hardware triggered mode so Low-Power Timer Trigger driver can validate device. Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@st.com> Acked-by:
Jonathan Cameron <jic23@kernel.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Fabrice Gasnier authored
Add support for STM32 Low-Power Timer, that can be used as counter or quadrature encoder. Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Fabrice Gasnier authored
Add documentation for STMicroelectronics STM32 Low-Power Timer quadrature encoder and counter binding. Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@st.com> Acked-by:
Jonathan Cameron <jic23@kernel.org> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Fabrice Gasnier authored
Add support for LPTIMx_OUT triggers that can be found on some STM32 devices. These triggers can be used then by ADC or DAC. Typical usage is to configure LPTimer as PWM output (via pwm-stm32-lp) and have synchronised analog conversions with these triggers. Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by:
Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Fabrice Gasnier authored
Add documentation for STMicroelectronics STM32 Low-Power Timer Trigger binding. Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@st.com> Acked-by:
Jonathan Cameron <jic23@kernel.org> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Fabrice Gasnier authored
Add documentation for STMicroelectronics STM32 Low-Power Timer PWM binding. Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@st.com> Acked-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-
Fabrice Gasnier authored
Add support for single PWM channel on Low-Power Timer, that can be found on some STM32 platforms. Signed-off-by:
Fabrice Gasnier <fabrice.gasnier@st.com> Acked-by:
Thierry Reding <thierry.reding@gmail.com> Signed-off-by:
Lee Jones <lee.jones@linaro.org>
-