- 01 11月, 2017 2 次提交
-
-
由 Baolin Wang 提交于
This patch adds support for Spreadtrum SC27xx series PMIC MFD core, and It provides communication through the SPI interfaces. The SC27xx series PMICs contains the following 6 major components: - DCDCs - LDOs - Battery management system - Audio codec - User interface function, such as indicator, flash LED - IC level function, such as power on/off, type-c Signed-off-by: NBaolin Wang <baolin.wang@spreadtrum.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Benjamin Gaignard 提交于
Use devm_of_platform_populate() instead of of_platform_populate() to be sure that of_platform_depopulate() is called when removing the driver. Signed-off-by: NBenjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 24 10月, 2017 3 次提交
-
-
由 Martin Kaiser 提交于
When fsl-imx25-tsadc is compiled as a module, loading, unloading and reloading the module will lead to a crash. Unable to handle kernel paging request at virtual address bf005430 [<c004df6c>] (irq_find_matching_fwspec) from [<c028d5ec>] (of_irq_get+0x58/0x74) [<c028d594>] (of_irq_get) from [<c01ff970>] (platform_get_irq+0x48/0xc8) [<c01ff928>] (platform_get_irq) from [<bf00e33c>] (mx25_tsadc_probe+0x220/0x2f4 [fsl_imx25_tsadc]) irq_find_matching_fwspec() loops over all registered irq domains. The irq domain is still registered from last time the module was loaded but the pointer to its operations is invalid after the module was unloaded. Add a removal function which clears the irq handler and removes the irq domain. With this cleanup in place, it's possible to unload and reload the module. Signed-off-by: NMartin Kaiser <martin@kaiser.cx> Reviewed-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Alexey Khoroshilov 提交于
There is the only path, where mxs_lradc_probe() leaves clk undisabled, since it does return instead of goto err_clk. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Joakim Tjernlund 提交于
Avoton/Rangeley are based on Silvermount micro-architecture, like Bay Trail, and uses the INTEL_SPI_BYT method to drive SPI. Cc: stable@vger.kernel.org Signed-off-by: NJoakim Tjernlund <joakim.tjernlund@infinera.com> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 13 10月, 2017 8 次提交
-
-
由 Keerthy 提交于
Currently the driver boots only via device tree hence add a dependency on CONFIG_OF. This leaves with a bunch of unused code so clean that up. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Keerthy 提交于
When the initial support was added for this PMIC was added only regulator support was present. Now we have GPIO and Powerbutton support as well. Hence correct the description of MFD_TPS65218 config option. Signed-off-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Martin Kaiser 提交于
Replace the two separate calls for setting the irq handler and data with a single irq_set_chained_handler_and_data() call. Signed-off-by: NMartin Kaiser <martin@kaiser.cx> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Rui Feng 提交于
Enable power saving for RTS5250S as following steps: 1.Set 0xFE58 to enable clock power management. 2.Check cfg space whether support L1SS or not. 3.If support L1SS, set 0xFF03 to free clkreq. 4.When entering idle status, enable aspm and set parameters for L1SS and LTR. 5.Wnen entering run status, disable aspm and set parameters for L1SS and LTR. If entering L1SS mode successfully, electric current will be below 2mA. Signed-off-by: NRui Feng <rui_feng@realsil.com.cn> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Takashi Iwai 提交于
This patch adds the MFD driver for Dollar Cove (TI version) PMIC with ACPI INT33F5 that is found on some Intel Cherry Trail devices. The driver is based on the original work by Intel, found at: https://github.com/01org/ProductionKernelQuilts This is a minimal version for adding the basic resources. Currently, only ACPI PMIC opregion and the external power-button are used. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=193891Signed-off-by: NTakashi Iwai <tiwai@suse.de> Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Maciej Purski 提交于
This patch adds muic of_compatible in order to use the muic device driver in device tree. Signed-off-by: NMaciej Purski <m.purski@samsung.com> Reviewed-by: NChanwoo Choi <cw00.choi@samsung.com> Reviewed-by: NKrzysztof Kozlowski <krzk@kernel.org> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Colin Ian King 提交于
Don't populate the arrays vcore_val, vpll_val and vaux_val on the stack, instead make them static const. Makes the object code smaller by over 370 bytes: Before: text data bss dec hex filename 6971 3248 64 10283 282b drivers/mfd/stw481x.o After: text data bss dec hex filename 6338 3504 64 9906 26b2 drivers/mfd/stw481x.o Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Keerthy 提交于
Currently the driver boots only via device tree hence add a dependency on CONFIG_OF. This leaves with a bunch of unused code so clean that up. This patch also makes use of probe_new function in place of the probe function so as to avoid passing i2c_device_id. Signed-off-by: NKeerthy <j-keerthy@ti.com> Reviewed-by: NJavier Martinez Canillas <javierm@redhat.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 14 9月, 2017 1 次提交
-
-
由 Christoph Hellwig 提交于
... and __initconst if applicable. Based on similar work for an older kernel in the Grsecurity patch. [JD: fix toshiba-wmi build] [JD: add htcpen] [JD: move __initconst where checkscript wants it] Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NJean Delvare <jdelvare@suse.de>
-
- 05 9月, 2017 26 次提交
-
-
由 Hans de Goede 提交于
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: Nrussianneuromancer <russianneuromancer@ya.ru> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Hans de Goede 提交于
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: Nrussianneuromancer <russianneuromancer@ya.ru> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Arnd Bergmann 提交于
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: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Arvind Yadav 提交于
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: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Furquan Shaikh 提交于
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: NFurquan Shaikh <furquan@google.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Arvind Yadav 提交于
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: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Florian R. Hölzlwimmer 提交于
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: NCoolStar <coolstarorganization@gmail.com> Tested-by: NMike Schwartz <mykesx@gmail.com> Tested-by: NBjörn Dahlgren <bjodah@gmail.com> Signed-off-by: NFlorian R. Hölzlwimmer <git.ich@frhoelzlwimmer.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Arvind Yadav 提交于
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: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Hans de Goede 提交于
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: NHans de Goede <hdegoede@redhat.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Axel Lin 提交于
This fixes missing mfd_remove_devices() call when unload the module. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NKeerthy <j-keerthy@ti.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Rajmohan Mani 提交于
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: NRajmohan Mani <rajmohan.mani@intel.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Mika Westerberg 提交于
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: NAbdó Roig-Marange <abdo.roig@gmail.com> Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Ludovic Desroches 提交于
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: NBoris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: NLudovic Desroches <ludovic.desroches@microchip.com> Acked-by: NBoris Brezillon <boris.brezillon@free-electrons.com> Acked-by: NNicolas Ferre <nicolas.ferre@microchip.com> Acked-by: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Quentin Schulz 提交于
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: NQuentin Schulz <quentin.schulz@free-electrons.com> Signed-off-by: NChen-Yu Tsai <wens@csie.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Chen-Yu Tsai 提交于
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: NChen-Yu Tsai <wens@csie.org> Acked-by: NMaxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Marek Vasut 提交于
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: NMarek Vasut <marek.vasut+renesas@gmail.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Guodong Xu 提交于
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: NGuodong Xu <guodong.xu@linaro.org> Signed-off-by: NWang Xiaoyin <hw.wangxiaoyin@hisilicon.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Guodong Xu 提交于
Update dev_err messages to make them more readable. Signed-off-by: NGuodong Xu <guodong.xu@linaro.org> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Guodong Xu 提交于
Change license text to a shorter form of GPLv2. Signed-off-by: NGuodong Xu <guodong.xu@linaro.org> Acked-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Michal Simek 提交于
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: NMichal Simek <michal.simek@xilinx.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Arvind Yadav 提交于
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: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Christophe JAILLET 提交于
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: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Julia Lawall 提交于
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: NJulia Lawall <Julia.Lawall@lip6.fr> Acked-by: NKees Cook <keescook@chromium.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Sebastian Reichel 提交于
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: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Colin Ian King 提交于
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: NColin Ian King <colin.king@canonical.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
由 Dan Carpenter 提交于
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: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-