30 Mar, 2020
19 commits
-
Intel Elkhart Lake LPSS I2C has 100 MHz input clock instead of 133 MHz
that was our preliminary information. This will result slower I2C bus
clock when driver calculates its timing parameters in case ACPI tables
don't provide them.Slower I2C bus clock is allowed but let's fix this to match with
reality.While at it, keep the same default I2C device properties as Intel
Broxton since it is not known do they need any update.Signed-off-by: Jarkko Nikula
Reviewed-by: Andy Shevchenko
Signed-off-by: Lee Jones -
There is still one call of sprintf() without checking the proper
buffer overflow in aat2870_dump_reg(). Replace it with scnprintf()
call for covering that.Signed-off-by: Takashi Iwai
Signed-off-by: Lee Jones -
On some platforms user may want to enumerate DLN2 device, its children,
to be enumerated via ACPI. In order to achieve this, let's distinguish
children by _ADR value.Signed-off-by: Andy Shevchenko
Signed-off-by: Lee Jones -
The da9062 interrupt handler cannot necessarily be low active.
Add a function to configure the interrupt type based on what is defined in the device tree.
The allowable interrupt type is either low or high level trigger.Signed-off-by: Shreyas Joshi
Reviewed-by: Linus Walleij
Reviewed-by: Adam Thomson
Signed-off-by: Lee Jones -
While the commit 2b8bd606b1e6 ("mfd: dln2: More sanity checking for endpoints")
tries to harden the sanity checks it made at the same time a regression,
i.e. mixed in and out endpoints. Obviously it should have been not tested on
real hardware at that time, but unluckily it didn't happen.So, fix above mentioned typo and make device being enumerated again.
While here, introduce an enumerator for magic values to prevent similar issue
to happen in the future.Fixes: 2b8bd606b1e6 ("mfd: dln2: More sanity checking for endpoints")
Cc: Oliver Neukum
Cc: Greg Kroah-Hartman
Signed-off-by: Andy Shevchenko
Signed-off-by: Lee Jones -
Intel Comet Lake PCH-V has the same LPSS than Intel Kaby Lake.
Add the new IDs to the list of supported devices.Signed-off-by: Andy Shevchenko
Signed-off-by: Lee Jones -
The Spreadtrum SC27XX series PMICs supply the USB charger type detection
function, and related registers are located on the PMIC global registers
region, thus we implement and export this function in the MFD driver for
users to get the USB charger type.Signed-off-by: Baolin Wang
Signed-off-by: Lee Jones -
RK805 has the same kind of dual-role sleep/shutdown pin as RK809/RK817,
so it makes little sense for the driver to have to have two completely
different mechanisms to handle essentially the same thing. Move RK805
over to the shutdown/suspend flow to clean things up.Signed-off-by: Robin Murphy
Signed-off-by: Lee Jones -
Rather than having 3 almost-identical functions plus the machinery to
keep track of them, it's far simpler to just dynamically select the
appropriate register field per variant.Signed-off-by: Robin Murphy
Signed-off-by: Lee Jones -
Setting the SLEEP pin to its shutdown function for appropriate PMICs
doesn't need to happen in single-CPU context, so there's really no point
involving the syscore machinery. Hook it up to the standard driver model
shutdown method instead. This also obviates the issue that the syscore
ops weren't being unregistered on probe failure or module removal.Signed-off-by: Robin Murphy
Signed-off-by: Lee Jones -
The RK809/RK817 suspend/resume hooks should not have to depend on
whether this driver owns the pm_power_off hook, and thus the global
rk808_i2c_client is set - indeed, the GPIO-based control is really
only relevant when PSCI firmware is in charge of power rather than
the kernel. As driver model callbacks, they have an appropriate
device argument to hand, so can just always use that.Signed-off-by: Robin Murphy
Signed-off-by: Lee Jones -
With the device tree property "rockchip,system-power-controller" we
explicitly request to use this PMIC to power off the system. So always
register our poweroff function, even if some other handler (probably
PSCI poweroff) was registered before.This does tend to reveal a warning on shutdown due to the Rockchip I2C
driver not implementing an atomic transfer method, however since the
write to DEV_OFF takes effect immediately the I2C completion interrupt
is moot anyway, and as the very last thing written to the console it is
only visible to users going out of their way to capture serial output.Signed-off-by: Soeren Moch
Reviewed-by: Heiko Stuebner
[ rm: note potential warning in commit message ]
Signed-off-by: Robin Murphy
Signed-off-by: Lee Jones -
device_driver name is const char pointer, so it not useful to cast
xx_driver_name (which is already const char).Signed-off-by: Corentin Labbe
Signed-off-by: Lee Jones -
Fix several variations of typo around functionali{ty,es}.
Signed-off-by: Christophe JAILLET
Signed-off-by: Lee Jones -
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:struct foo {
int stuff;
struct boo array[];
};By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.Also, notice that, dynamic memory allocations won't be affected by
this change:"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]This issue was found with the help of Coccinelle.
[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Lee Jones -
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:struct foo {
int stuff;
struct boo array[];
};By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.Also, notice that, dynamic memory allocations won't be affected by
this change:"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]This issue was found with the help of Coccinelle.
[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")Signed-off-by: Gustavo A. R. Silva
Signed-off-by: Lee Jones -
If only cpcap mfd driver is selected we will get:
ERROR: "devm_mfd_add_devices" [drivers/mfd/motorola-cpcap.ko] undefined!
This is because Kconfig is missing select for MFD_CORE.
Signed-off-by: Tony Lindgren
Signed-off-by: Lee Jones -
Add a check to ensure there is indeed an EC device tree entry before
adding the cros-usbpd-notify device. This covers configs where both
CONFIG_ACPI and CONFIG_OF are defined, but the EC device is defined
using device tree and not in ACPI.Fixes: 4602dce0361e ("mfd: cros_ec: Add cros-usbpd-notify subdevice")
Signed-off-by: Prashant Malani
Tested-by: Enric Balletbo i Serra
Signed-off-by: Lee Jones
27 Mar, 2020
5 commits
-
That list was just empty, so it can be removed if .probe_new
instead of .probe is usedSuggested-by: Lee Jones
Signed-off-by: Andreas Kemnade
Signed-off-by: Lee Jones -
Since the RC5T619 has a RTC, use a separate subdevice list for that.
The ADC should be the same as in the RN5T618, according to drivers
in the wild, but since it is not tested, the ADC is only added for
the RC5T619.Signed-off-by: Andreas Kemnade
Signed-off-by: Lee Jones -
Defines for some RTC related registers were missing, also
they were not included in the volatile register listSigned-off-by: Andreas Kemnade
Signed-off-by: Lee Jones -
This adds support for IRQ handling in the RC5T619 which is required
for properly implementing subdevices like RTC.
For now only definitions for the variant RC5T619 are included.Signed-off-by: Andreas Kemnade
Signed-off-by: Lee Jones -
This patch adds core support for the Azoteq IQS620A, IQS621, IQS622,
IQS624 and IQS625 multi-function sensors.Signed-off-by: Jeff LaBundy
Signed-off-by: Lee Jones
04 Feb, 2020
1 commit
-
…ernel/git/chrome-platform/linux
Pull chrome platform updates from Benson Leung:
"CrOS EC:- Refactoring of some of cros_ec's headers:
include/linux/mfd/cros_ec.h now removed, new cros_ec.h added to
drivers/platform/chrome which contains shared operations of cros_ec
transport drivers.- Response tracing in cros_ec_proto
Wilco EC:
- Fix unregistration order.
- Fix keyboard backlight probing on systems without keyboard
backlight- Minor cleanup (newlines in printks, COMPILE_TEST)
Misc:
- chromeos_laptop converted to use i2c_new_scanned_device instead of
i2c_new_probed_device"* tag 'tag-chrome-platform-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
platform/chrome: cros_ec: Match implementation with headers
platform/chrome: cros_ec: Drop unaligned.h include
platform/chrome: wilco_ec: Allow wilco to be compiled in COMPILE_TEST
platform/chrome: wilco_ec: Add newlines to printks
platform/chrome: wilco_ec: Fix unregistration order
cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h'
platform/chrome: cros_ec_ishtp: Make init_lock static
platform/chrome: chromeos_laptop: Convert to i2c_new_scanned_device
platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs
platform/chrome: cros_ec_proto: Add response tracing
platform/chrome: cros_ec_trace: Match trace commands with EC commands
03 Feb, 2020
1 commit
-
Pull MFD updates from Lee Jones:
"New Drivers:
- Add support for ROHM BD71828 PMICs and GPIOs
- Add support for Qualcomm Aqstic Audio Codecs WCD9340 and WCD9341New Device Support:
- Add support for BD71828 to BD70528 RTC driver
- Add support for Intel's Jasper Lake to LPSS PCINew Functionality:
- Add support for Power Key to ROHM BD71828
- Add support for Clocks to ROHM BD71828
- Add support for GPIOs to Dialog DA9062
- Add support for USB PD Notify to ChromiumOS EC
- Allow callers to specify args when requesting regmap lookup; sysconFix-ups:
- Improve error handling and sanity checking; atmel-hlcdc, dln2
- Device Tree support/documentation; bd71828, da9062, xylon,logicvc,
ab8500, max14577, atmel-usart
- Match devices using platform IDs; bd7xxxx
- Refactor BD718x7 regulator component; bd718x7-regulator
- Use standard interfaces/helpers; syscon, sm501
- Trivial (whitespace, spelling, etc); ab8500-core, Kconfig
- Remove unused code; db8500-prcmu, tqmx86
- Wait until boot has finished before accessing registers;
madera-core
- Provide missing register value defaults; cs47l15-tables
- Allow more time for hardware to reset; madera-coreBug Fixes:
- Fix erroneous register values; rohm-bd70528
- Fix register volatility; axp20x, rn5t618
- Fix Kconfig dependencies; MFD_MAX77650
- Fix incorrect compatible string; da9062-core
- Fix syscon_regmap_lookup_by_phandle_args() stub; syscon"* tag 'mfd-next-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (41 commits)
mfd: syscon: Fix syscon_regmap_lookup_by_phandle_args() dummy
mfd: wcd934x: Add support to wcd9340/wcd9341 codec
mfd: syscon: Add arguments support for syscon reference
mfd: rn5t618: Mark ADC control register volatile
dt-bindings: atmel-usart: Add microchip,sam9x60-{usart, dbgu}
dt-bindings: atmel-usart: Remove wildcard
mfd: cros_ec: Add cros-usbpd-notify subdevice
mfd: da9062: Fix watchdog compatible string
mfd: madera: Allow more time for hardware reset
mfd: cs47l15: Add missing register default
mfd: madera: Wait for boot done before accessing any other registers
mfd: Kconfig: Rename Samsung to lowercase
mfd: tqmx86: remove set but not used variable 'i2c_ien'
mfd: dbx500-prcmu: Drop DSI pll clock functions
mfd: dbx500-prcmu: Drop set_display_clocks()
mfd: max77650: Select REGMAP_IRQ in Kconfig
mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile
mfd: ab8500: Fix ab8500-clk typo
mfd: intel-lpss: Add Intel Jasper Lake PCI IDs
dt-bindings: mfd: max14577: Add reference to max14040_battery.txt descriptions
...
01 Feb, 2020
1 commit
-
Pull MIPS changes from Paul Burton:
"Nothing too big or scary in here:- Support mremap() for the VDSO, primarily to allow CRIU to restore
the VDSO to its checkpointed location.- Restore the MIPS32 cBPF JIT, after having reverted the enablement
of the eBPF JIT for MIPS32 systems in the 5.5 cycle.- Improve cop0 counter synchronization behaviour whilst onlining CPUs
by running with interrupts disabled.- Better match FPU behaviour when emulating multiply-accumulate
instructions on pre-r6 systems that implement IEEE754-2008 style
MACs.- Loongson64 kernels now build using the MIPS64r2 ISA, allowing them
to take advantage of instructions introduced by r2.- Support for the Ingenic X1000 SoC & the really nice little CU Neo
development board that's using it.- Support for WMAC on GARDENA Smart Gateway devices.
- Lots of cleanup & refactoring of SGI IP27 (Origin 2*) support in
preparation for introducing IP35 (Origin 3*) support.- Various Kconfig & Makefile cleanups"
* tag 'mips_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (60 commits)
MIPS: PCI: Add detection of IOC3 on IO7, IO8, IO9 and Fuel
MIPS: Loongson64: Disable exec hazard
MIPS: Loongson64: Bump ISA level to MIPSR2
MIPS: Make DIEI support as a config option
MIPS: OCTEON: octeon-irq: fix spelling mistake "to" -> "too"
MIPS: asm: local: add barriers for Loongson
MIPS: Loongson64: Select mac2008 only feature
MIPS: Add MAC2008 Support
Revert "MIPS: Add custom serial.h with BASE_BAUD override for generic kernel"
MIPS: sort MIPS and MIPS_GENERIC Kconfig selects alphabetically (again)
MIPS: make CPU_HAS_LOAD_STORE_LR opt-out
MIPS: generic: don't unconditionally select PINCTRL
MIPS: don't explicitly select LIBFDT in Kconfig
MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts
MIPS: SGI-IP30: Check for valid pointer before using it
MIPS: syscalls: fix indentation of the 'SYSNR' message
MIPS: boot: fix typo in 'vmlinux.lzma.its' target
MIPS: fix indentation of the 'RELOCS' message
dt-bindings: Document loongson vendor-prefix
MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi.
...
29 Jan, 2020
1 commit
-
Qualcomm WCD9340/WCD9341 Codec is a standalone Hi-Fi audio codec IC.
This codec has integrated SoundWire controller, pin controller and
interrupt controller.Signed-off-by: Srinivas Kandagatla
Reviewed-by: Pierre-Louis Bossart
Signed-off-by: Lee Jones
24 Jan, 2020
12 commits
-
There are a lot of similar global registers being used across multiple SoCs
from Unisoc. But most of these registers are assigned with different offset
for different SoCs. It is hard to handle all of them in an all-in-one
kernel image.Add a helper function to get regmap with arguments where we could put some
extra information such as the offset value.Signed-off-by: Orson Zhai
Tested-by: Baolin Wang
Reviewed-by: Arnd Bergmann
Signed-off-by: Lee Jones -
There is a bit which gets cleared after conversion.
Fixes: 9bb9e29c78f8 ("mfd: Add Ricoh RN5T618 PMIC core driver")
Signed-off-by: Andreas Kemnade
Signed-off-by: Lee Jones -
Add the cros-usbpd-notify driver as a subdevice on platforms that
support the EC_FEATURE_USB_PD EC feature flag and don't have the
ACPI PD notification device defined.This driver allows other cros-ec devices to receive PD event
notifications from the Chrome OS Embedded Controller (EC) via a
notification chain.Signed-off-by: Prashant Malani
Reviewed-by: Benson Leung
Signed-off-by: Lee Jones -
The watchdog driver compatible is "dlg,da9062-watchdog" and not
"dlg,da9062-wdt". Therefore the mfd-core can't populate the of_node and
fwnode. As result the watchdog driver can't parse the devicetree.Fixes: 9b40b030c4ad ("mfd: da9062: Supply core driver")
Signed-off-by: Marco Felsch
Acked-by: Guenter Roeck
Reviewed-by: Adam Thomson
Signed-off-by: Lee Jones -
Both manual and power on resets have a brief period where the chip will
not be accessible immediately afterwards. Extend the time allowed for
this from a minimum of 1mS to 2mS based on newer evaluation of the
hardware and ensure this reset happens in all reset conditions. Whilst
making the change also remove the redundant NULL checks in the reset
functions as the GPIO functions already check for this.Signed-off-by: Charles Keepax
Signed-off-by: Lee Jones -
Accessory detect mode 1 is missing a default, add one to the table.
Signed-off-by: Charles Keepax
Signed-off-by: Lee Jones -
It is advised to wait for the boot done bit to be set before reading
any other register, update the driver to respect this.Signed-off-by: Charles Keepax
Signed-off-by: Lee Jones -
Fix up inconsistent usage of upper and lowercase letters in "Samsung"
name."SAMSUNG" is not an abbreviation but a regular trademarked name.
Therefore it should be written with lowercase letters starting with
capital letter.Although advertisement materials usually use uppercase "SAMSUNG", the
lowercase version is used in all legal aspects (e.g. on Wikipedia and in
privacy/legal statements on
https://www.samsung.com/semiconductor/privacy-global/).Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Lee Jones -
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/mfd/tqmx86.c: In function ‘tqmx86_probe’:
drivers/mfd/tqmx86.c:161:29: warning: variable ‘i2c_ien’
set but not used I[-Wunused-but-set-variable]It is never used, and so can be removed.
Signed-off-by: yu kuai
Signed-off-by: Lee Jones -
The DSI PLLs are handled by the generic clock framework
since ages, this code is completely unused and misleading.
Delete it.Cc: Stephan Gerhold
Cc: Ulf Hansson
Signed-off-by: Linus Walleij
Signed-off-by: Lee Jones -
The display clocks are handled by the generic clock framework
since ages, this code is completely unused and misleading.
Delete it.Cc: Stephan Gerhold
Cc: Ulf Hansson
Signed-off-by: Linus Walleij
Signed-off-by: Lee Jones -
MAX77650 MFD driver uses regmap_irq API but doesn't select the required
REGMAP_IRQ option in Kconfig. This can cause the following build error
if regmap irq is not enabled implicitly by someone else:ld: drivers/mfd/max77650.o: in function `max77650_i2c_probe':
max77650.c:(.text+0xcb): undefined reference to `devm_regmap_add_irq_chip'
ld: max77650.c:(.text+0xdb): undefined reference to `regmap_irq_get_domain'
make: *** [Makefile:1079: vmlinux] Error 1Fix it by adding the missing option.
Fixes: d0f60334500b ("mfd: Add new driver for MAX77650 PMIC")
Reported-by: Paul Gazzillo
Signed-off-by: Bartosz Golaszewski
Signed-off-by: Lee Jones