aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-07-02MAINAINERS: Swap words in INTEL PMIC MULTIFUNCTION DEVICE DRIVERSAndy Shevchenko1-1/+1
Swap PMIC and MULTIFUNCTION words in the title to: - show that this is about Intel PMICs - keep MAINTAINERS properly sorted Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: cros_ec_dev: Register cros_ec_accel_legacy driver as a subdeviceGwendal Grignou1-0/+69
With this patch, the cros_ec_ctl driver will register the legacy accelerometer driver (named cros_ec_accel_legacy) if it fails to register sensors through the usual path cros_ec_sensors_register(). This legacy device is present on Chromebook devices with older EC firmware only supporting deprecated EC commands: - Glimmer based devices [Intel SOC using LPC transport] - Veyron minnie devices [ARM SOC using SPI transport] Tested-by: Gwendal Grignou <[email protected]> Signed-off-by: Enric Balletbo i Serra <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Gwendal Grignou <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: rk808: Prepare rk805 for poweroffStefan Mavrodiev2-15/+36
RK805 has SLEEP signal, which can put the device into SLEEP or OFF mode. The default is SLEEP mode. However, when the kernel performs power-off (actually the ATF) the device will not go fully off and this will result in higher power consumption and inability to wake the device with RTC alarm. The solution is to enable pm_power_off_prepare function, which will configure SLEEP pin for OFF function. Signed-off-by: Stefan Mavrodiev <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: rk808: Check pm_power_off pointerStefan Mavrodiev2-6/+12
The function pointer pm_power_off may point to function from other module (PSCI for example). If rk808 is removed, pm_power_off is overwritten to NULL and the system cannot be powered off. This patch checks if pm_power_off points to a module function. Signed-off-by: Stefan Mavrodiev <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: cros_ec: differentiate SCP from EC by feature bitPi-Hsun Shih2-0/+11
System Companion Processor (SCP) is Cortex M4 co-processor on some MediaTek platform that can run EC-style firmware. Since a SCP and EC would both exist on a system, and use the cros_ec_dev driver, we need to differentiate between them for the userspace, or they would both be registered at /dev/cros_ec, causing a conflict. Signed-off-by: Pi-Hsun Shih <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02dt-bindings: Add binding for cros-ec-rpmsgPi-Hsun Shih1-1/+4
Add a DT binding documentation for ChromeOS EC driver over rpmsg. Signed-off-by: Pi-Hsun Shih <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: madera: Add Madera core support for CS47L92Richard Fitzgerald9-0/+2244
This patch adds all the core support and defines for the Cirrus Logic CS42L92, CS47L92 and CS47L93 smart audio CODECs. Registers or fields are named MADERA_* if it is part of the common hardware platform and does not conflict with any other Madera codecs. It is named CS47L15_* if it is unique to CS47L15 and conflicts with definitions on other codecs. Signed-off-by: Stuart Henderson <[email protected]> Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: madera: Add Madera core support for CS47L15Richard Fitzgerald9-0/+1382
This patch adds all the core support and defines for the Cirrus Logic CS47L15 smart audio CODEC. Registers or fields are named MADERA_* if it is part of the common hardware platform and does not conflict with any other Madera codecs. It is named CS47L15_* if it is unique to CS47L15 and conflicts with definitions on other codecs. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: madera: Update DT bindings to add additional CODECsRichard Fitzgerald1-2/+6
This adds the cs47l15, cs42l92, cs47l92 and cs47l93 to the list of compatible strings and updates some properties that need to note the new CODECs. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: madera: Add supply mapping for MICVDDCharles Keepax1-3/+15
Currently we are relying on the exact match of the regulator name to find MICVDD, we should add an explicit supply mapping to allow this to be found more reliably. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: madera: Fix potential uninitialised use of variableStuart Henderson1-1/+1
regmap_read won't set val to anything if an ACKed bus fails. Signed-off-by: Stuart Henderson <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: madera: Fix bad reference to pinctrl.txt fileOtto Sabart1-1/+2
The pinctrl.txt file was converted into reStructuredText and moved into driver-api folder. This patch updates the broken reference. Fixes: 5a9b73832e9e ("pinctrl.txt: move it to the driver-api book") Signed-off-by: Otto Sabart <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: arizona: Fix undefined behaviorArnd Bergmann1-1/+1
When the driver is used with a subdevice that is disabled in the kernel configuration, clang gets a little confused about the control flow and fails to notice that n_subdevs is only uninitialized when subdevs is NULL, and we check for that, leading to a false-positive warning: drivers/mfd/arizona-core.c:1423:19: error: variable 'n_subdevs' is uninitialized when used here [-Werror,-Wuninitialized] subdevs, n_subdevs, NULL, 0, NULL); ^~~~~~~~~ drivers/mfd/arizona-core.c:999:15: note: initialize the variable 'n_subdevs' to silence this warning int n_subdevs, ret, i; ^ = 0 Ideally, we would rearrange the code to avoid all those early initializations and have an explicit exit in each disabled case, but it's much easier to chicken out and add one more initialization here to shut up the warning. Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: core: Set fwnode for created devicesRobert Hancock1-0/+1
The logic for setting the of_node on devices created by mfd did not set the fwnode pointer to match, which caused fwnode-based APIs to malfunction on these devices since the fwnode pointer was null. Fix this. Signed-off-by: Robert Hancock <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: intel-lpss: Keep device tables sorted by IDAndy Shevchenko1-3/+3
Easier to find and maintain if the device tables sorted by ID. Do it here for intel-lpss MFD driver. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: menelaus: Remove superfluous error messageAlexandre Belloni1-2/+0
The RTC core already has error messages in case of failure, there is no need to have another message in the driver. Signed-off-by: Alexandre Belloni <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: bd718x7: Make power button press duration configurableLeonard Crestez1-0/+42
Allow overwriting the values in BD718XX_REG_PWRONCONFIG0 and BD718XX_REG_PWRONCONFIG1 via devicetree. Read values in milliseconds and attempt to round them to something supported by the hardware. Keep existing values (from bootloader or OTP) if property is not present. Signed-off-by: Leonard Crestez <[email protected]> Reviewed-By: Matti Vaittinen <[email protected]> [Lee: Fixed-up merge/API conflict] Signed-off-by: Lee Jones <[email protected]>
2019-07-02dt-bindings: mfd: Document short/long press duration for BD718X7Leonard Crestez1-0/+8
These values can be overwritten at probe time. Signed-off-by: Leonard Crestez <[email protected]> Acked-By: Matti Vaittinen <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: bd718x7: Remove hardcoded config for button press durationLeonard Crestez1-23/+0
The reset button on imx8mm-evk is tied to PWRON_B pin of bd71847 and the long press duration is set to zero from OTP. The linux driver overrides those values and breaks reset from button. Overwriting OTP or bootloader configuration with some hardcoded defaults is not desirable, keep already programmed values instead. Signed-off-by: Leonard Crestez <[email protected]> Acked-By: Matti Vaittinen <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: cros_ec: Register cros_ec_lid_angle driver when presentedGwendal Grignou1-3/+10
Register driver when EC indicates has precise lid angle calculation code running. Fix incorrect extra resource allocation in cros_ec_sensors_register(). Signed-off-by: Gwendal Grignou <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02mfd: madera: Add missing of table registrationDaniel Gomez1-0/+1
MODULE_DEVICE_TABLE(of, <of_match_table>) should be called to complete DT OF mathing mechanism and register it. Before this patch: modinfo ./drivers/mfd/madera.ko | grep alias After this patch: modinfo ./drivers/mfd/madera.ko | grep alias alias: of:N*T*Ccirrus,wm1840C* alias: of:N*T*Ccirrus,wm1840 alias: of:N*T*Ccirrus,cs47l91C* alias: of:N*T*Ccirrus,cs47l91 alias: of:N*T*Ccirrus,cs47l90C* alias: of:N*T*Ccirrus,cs47l90 alias: of:N*T*Ccirrus,cs47l85C* alias: of:N*T*Ccirrus,cs47l85 alias: of:N*T*Ccirrus,cs47l35C* alias: of:N*T*Ccirrus,cs47l35 Reported-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Daniel Gomez <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-02Merge branches 'ib-mfd-clk-gpio-power-regulator-rtc-5.3', ↵Lee Jones16-781/+4103
'ib-mfd-clk-regulator-rtc-5.3', 'ib-mfd-cros-5.3' and 'ib-mfd-regulator-5.3' into ibs-for-mfd-merged
2019-07-02regulator: lp87565: Fix missing break in switch statementColin Ian King1-0/+1
Currently the LP87565_DEVICE_TYPE_LP87561_Q1 case does not have a break statement, causing it to fall through to a dev_err message. Fix this by adding in the missing break statement. Addresses-Coverity: ("Missing break in switch") Fixes: 7ee63bd74750 ("regulator: lp87565: Add 4-phase lp87561 regulator support") Signed-off-by: Colin Ian King <[email protected]> Reviewed-by: Keerthy <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27clk: RK808: Add RK809 and RK817 support.Tony Xie2-6/+67
RK809 and RK817 are power management IC chips for multimedia products. most of their functions and registers are same, including the clkout funciton. Signed-off-by: Tony Xie <[email protected]> Acked-by: Stephen Boyd <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27rtc: rk808: Add RK809 and RK817 support.Tony Xie2-16/+56
RK809 and RK817 are power management IC chips for multimedia products. Most of their functions and registers are same, including the rtc. Signed-off-by: Tony Xie <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27dt-bindings: mfd: rk808: Add binding information for RK809 and RK817.Tony Xie1-0/+44
Add device tree bindings documentation for Rockchip's RK809 & RK817 PMIC. Signed-off-by: Tony Xie <[email protected]> Reviewed-by: Rob Herring <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27regulator: rk808: Add RK809 and RK817 support.Heiko Stuebner3-28/+625
Add support for the rk809 and rk817 regulator driver. Their specifications are as follows: 1. The RK809 and RK809 consist of 5 DCDCs, 9 LDOs and have the same registers for these components except dcdc5. 2. The dcdc5 is a boost dcdc for RK817 and is a buck for RK809. 3. The RK817 has one switch but The Rk809 has two. The output voltages are configurable and are meant to supply power to the main processor and other components. Signed-off-by: Tony Xie <[email protected]> Acked-by: Mark Brown <[email protected]> [rebased on top of 5.2-rc1] Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27mfd: rk808: Add RK817 and RK809 supportTony Xie3-6/+364
The RK809 and RK817 are a Power Management IC (PMIC) for multimedia and handheld devices. They contains the following components: - Regulators - RTC - Clocking Both RK809 and RK817 chips are using a similar register map, so we can reuse the RTC and Clocking functionality. Most of regulators have a some implementation also. Signed-off-by: Tony Xie <[email protected]> Acked-by: Stephen Boyd <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27power: supply: Initial support for ROHM BD70528 PMIC charger blockMatti Vaittinen3-0/+753
ROHM BD70528 PMIC includes battery charger block. Support charger staus queries and doing few basic settings like input current limit and charging current. Signed-off-by: Matti Vaittinen <[email protected]> Acked-by: Sebastian Reichel <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27rtc: bd70528: Initial support for ROHM bd70528 RTCMatti Vaittinen3-0/+509
Support RTC block in ROHM bd70528 power management IC. Support getting and setting the time and date as well as arming an alarm which can also be used to wake the PMIC from standby state. HW supports wake interrupt only for the next 24 hours (sec, minute and hour information only) so we limit also the alarm interrupt to this 24 hours for the sake of consistency. Signed-off-by: Matti Vaittinen <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27gpio: Initial support for ROHM bd70528 GPIO blockMatti Vaittinen3-0/+244
ROHM BD70528 PMIC has 4 GPIO pins. Allow them to be controlled by GPIO framework. IRQs are handled by regmap-irq and GPIO driver is not aware of the irq usage. Signed-off-by: Matti Vaittinen <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27dt-bindings: mfd: Document first ROHM BD70528 bindingsMatti Vaittinen1-0/+102
Document bindings for regulators (3 bucks, 3 LDOs and 2 LED drivers) and 4 GPIO pins which can be configured for I/O or as interrupt sources withe configurable trigger levels. Signed-off-by: Matti Vaittinen <[email protected]> Reviewed-by: Rob Herring <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27clk: bd718x7: Support ROHM BD70528 clk blockMatti Vaittinen2-7/+19
ROHM BD70528 is an ultra low power PMIC with similar 32K clk as bd718x7. Only difference (from clk perspective) is register address. Add support for controlling BD70528 clk using bd718x7 driver. Signed-off-by: Matti Vaittinen <[email protected]> Acked-by: Stephen Boyd <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27mfd: bd70528: Support ROHM bd70528 PMIC coreMatti Vaittinen4-0/+743
ROHM BD70528MWV is an ultra-low quiescent current general purpose single-chip power management IC for battery-powered portable devices. Add MFD core which enables chip access for following subdevices: - regulators/LED drivers - battery-charger - gpios - 32.768kHz clk - RTC - watchdog Signed-off-by: Matti Vaittinen <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-27mfd: regulator: clk: Split rohm-bd718x7.hMatti Vaittinen5-40/+56
Split the bd718x7.h to ROHM common and bd718x7 specific parts so that we do not need to add same things in every new ROHM PMIC header. Please note that this change requires changes also in bd718x7 sub-device drivers for regulators and clk. Signed-off-by: Matti Vaittinen <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Stephen Boyd <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-17regulator: lp87565: Add 4-phase lp87561 regulator supportKeerthy1-1/+16
The LP8756x family has a single output 4-phase regulator configuration. Add support for the same. The control lies in the master buck which is buck0 for 4-phase configuration. Enable/disable/voltage set happen via buck0 registers. Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf Signed-off-by: Keerthy <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-17mfd: lp87565: Add support for 4-phase LP87561 combinationKeerthy2-0/+6
Add support for 4-phase LP87561 combination. Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf Signed-off-by: Keerthy <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-17dt-bindings: mfd: lp87565: Add LP87561 configurationKeerthy1-0/+36
lp87561 is a single output 4-phase regulator configuration. Add support for the same. Data Sheet: https://www.ti.com/lit/ds/symlink/lp87561-q1.pdf Signed-off-by: Keerthy <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Update I2S APIGwendal Grignou2-28/+24
Improve I2S API. Rename ec_response_codec_gain into ec_codec_i2s_gain, update caller accordlingly. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add Management API entry pointsGwendal Grignou1-0/+113
Add commands for test and management. Add command space for future development. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add SKU ID and Secure storage APIGwendal Grignou1-0/+107
Add API to store SKU, Cros board information in EC flash memory. Add API to store security data in EC. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add API for rwsigGwendal Grignou1-0/+26
Add command to retrieve signature of image stored in the RW memory slot(s). Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add API for Fingerprint supportGwendal Grignou1-0/+228
Add API for fingerprint sensor presented by embedded controller. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add API for Touchpad supportGwendal Grignou1-0/+26
Add API to control touchpad presented by Embedded Controller. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add API for EC-EC communicationGwendal Grignou1-0/+95
Allow EC to talk to other ECs that are not presented to the host. Neeed when EC are present in detachable keyboard. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add I2C passthru protection APIGwendal Grignou1-0/+22
Prevent direct i2c access to device behind EC when not in development mode. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add Smart Battery Firmware update APIGwendal Grignou1-0/+73
Add API to update battery firmware. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add Hibernate APIGwendal Grignou1-2/+70
Add support for controlling hibernation of the Embedded Controller. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Add API for keyboard testingGwendal Grignou1-0/+18
Add command to allow keyboard testing in factory. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-06-10mfd: cros_ec: Complete Power and USB PD APIGwendal Grignou1-8/+228
Improve API for USB Powe delivery and power management. Signed-off-by: Gwendal Grignou <[email protected]> Acked-by: Enric Balletbo i Serra <[email protected]> Acked-by: Benson Leung <[email protected]> Reviewed-by: Fabien Lahoudere <[email protected]> Signed-off-by: Lee Jones <[email protected]>