aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd
AgeCommit message (Collapse)AuthorFilesLines
2021-10-21mfd: ti_am335x_tscadc: Rename the subsystem enable macroMiquel Raynal1-3/+3
This bit is common to all devices (ADC, Touchscreen, Magnetic reader) so make it clear that it can be used from any location by operating a mechanical rename: s/CNTRLREG_TSCSSENB/CNTRLREG_SSENB/ Signed-off-by: Miquel Raynal <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Gather the ctrl register logic in one placeMiquel Raynal1-25/+14
Instead of deriving in the probe and in the resume path the value of the ctrl register, let's do it only once in the probe, save the value of this register (all but the subsystem enable bit) in the driver's structure and use it from the resume callback. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Reorder the initialization stepsMiquel Raynal1-6/+5
TI AM335X TRM [1] states that most of the configuration should be set in the control register in the first place, before actually enabling the hardware with the subsystem enable bit. So far only half of the configuration was made in the first step (before enabling the "subsystem"), which does not make really sense. Also, the probe and the resume patch were acting differently. Let's harmonize all this by following these steps: 1/ Configure the CLKDIV register 2/ Configure the CTRL register 3/ Configure the idle configuration 4/ Really enable the device by rewriting the CTRL register with the subsystem enable bit set. [1] https://www.ti.com/lit/pdf/spruh73 Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Always provide an idle configurationMiquel Raynal1-3/+5
The idle register is valid no matter if the touchscreen is used or not, let's always configure it. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Drop useless variables from the driver structureMiquel Raynal1-11/+4
Keeping the count of tsc_cells and adc_cells is completely redundant, we can derive this information from other variables. Plus, these variables are not used anywhere else now. Let's get rid of them. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Mimic the probe from resume()Miquel Raynal1-1/+1
Use the number of touchscreen wires (tsc_wires) instead of the flag indicating a touchscreen cell (tsc_cell) to mimic the logic from the probe. Besides keeping a certain harmony in the driver, the main benefit is that we are going to simplify the number of entries in the main MFD structure and tsc_cell can now be removed more easily. Signed-off-by: Miquel Raynal <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Use driver dataMiquel Raynal1-6/+16
So far every sub-cell parameter in this driver was hardcoded: cell name, cell compatible, specific clock name and desired clock frequency. As we are about to introduce support for ADC1/magnetic reader, we need a bit of flexibility. Let's add a driver data structure which will contain these information. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Move the driver structure allocation earlierMiquel Raynal1-7/+7
Allocating the driver structure should be done earlier in the probe so that we can used its members from the beginning. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Simplify divisor calculationMiquel Raynal1-5/+1
Let's rewrite this on a single line, it does not hurt the readability and saves a useless temporary variable. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Don't search the tree for our clockMiquel Raynal1-1/+1
There is a single clock available in our node, which is named "fck". The clock handler then points to adc_tsc_fck but no need to point directly to it and do a full tree search. Signed-off-by: Miquel Raynal <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Reword the comment explaining the dividersMiquel Raynal1-6/+6
The comment misses the main information which is that we assume that a sample takes 15 ADC clock cycles to be generated. Let's take the occasion to rework a little bit this comment. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Drop extra spacing when declaring stack variablesMiquel Raynal1-15/+15
Many variables will be updated (renamed, dropped, added) in the upcoming changes, so let's simplify the style to avoid messing with spaces over and over again. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Get rid of useless gotosMiquel Raynal1-4/+3
Goto's jumping to a return statement are not really useful, drop them. Signed-off-by: Miquel Raynal <[email protected]> Acked-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Fix styleMiquel Raynal1-2/+4
These are mostly deffects reported by checkpatch.pl. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Replace license text with SPDX tagMiquel Raynal1-9/+1
Drop the text license and replace it with an equivalent SPDX license tag identifier which also matches the MODULE_LICENSE(GPL) macro. Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-20mfd: ti_am335x_tscadc: Ensure a balanced number of node get/putMiquel Raynal1-0/+5
of_node_put() should be called after a successful of_get_child_by_name(). Signed-off-by: Miquel Raynal <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-10-05mfd: hi6421-spmi-pmic: Cleanup drvdata to only include regmapMauro Carvalho Chehab1-11/+5
There are lots of fields in struct hi6421_spmi_pmic that aren't used. As a matter of fact, only regmap is needed. So, drop the struct as a whole, and set regmap as the drvdata. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/1828cb783b1ebca0b98bf0b3077d8701adb228f7.1630586862.git.mchehab+huawei@kernel.org
2021-09-07Merge tag 'mfd-next-5.15' of ↵Linus Torvalds24-58/+799
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Frameworks: - Add support for registering devices via MFD cells to Simple MFD (I2C) New Drivers: - Add support for Renesas Synchronization Management Unit (SMU) New Device Support: - Add support for N5010 to Intel M10 BMC - Add support for Cannon Lake to Intel LPSS ACPI - Add support for Samsung SSG{1,2} to ST-Ericsson's U8500 family - Add support for TQMx110EB and TQMxE40x to TQ-Systems PLD TQMx86 New Functionality: - Add support for GPIO to Intel LPC ICH - Add support for Reset to Texas Instruments TPS65086 Fix-ups: - Trivial, sorting, whitespace, renaming, etc; mt6360-core, db8500-prcmu-regs, tqmx86 - Device Tree fiddling; syscon, axp20x, qcom,pm8008, ti,tps65086, brcm,cru - Use proper APIs for IRQ map resolution; ab8500-core, stmpe, tc3589x, wm8994-irq - Pass 'supplied-from' property through axp288_fuel_gauge via swnode - Remove unused file entry; MAINTAINERS - Make interrupt line optional; tps65086 - Rename db8500-cpuidle driver symbol; db8500-prcmu - Remove support for unused hardware; tqmx86 - Provide a standard LPC clock frequency for unknown boards; tqmx86 - Remove unused code; ti_am335x_tscadc - Use of_iomap() instead of ioremap(); syscon Bug Fixes: - Clear GPIO IRQ resource flags when no IRQ is set; tqmx86 - Fix incorrect/misleading frequencies; db8500-prcmu - Mitigate namespace clash with other GPIOBASE users" * tag 'mfd-next-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (31 commits) mfd: lpc_sch: Rename GPIOBASE to prevent build error mfd: syscon: Use of_iomap() instead of ioremap() dt-bindings: mfd: Add Broadcom CRU mfd: ti_am335x_tscadc: Delete superfluous error message mfd: tqmx86: Assume 24MHz LPC clock for unknown boards mfd: tqmx86: Add support for TQ-Systems DMI IDs mfd: tqmx86: Add support for TQMx110EB and TQMxE40x mfd: tqmx86: Fix typo in "platform" mfd: tqmx86: Remove incorrect TQMx90UC board ID mfd: tqmx86: Clear GPIO IRQ resource when no IRQ is set mfd: simple-mfd-i2c: Add support for registering devices via MFD cells mfd/cpuidle: ux500: Rename driver symbol mfd: tps65086: Add cell entry for reset driver mfd: tps65086: Make interrupt line optional dt-bindings: mfd: Convert tps65086.txt to YAML MAINTAINERS: Adjust ARM/NOMADIK/Ux500 ARCHITECTURES to file renaming mfd: db8500-prcmu: Handle missing FW variant mfd: db8500-prcmu: Rename register header mfd: axp20x: Add supplied-from property to axp288_fuel_gauge cell mfd: Don't use irq_create_mapping() to resolve a mapping ...
2021-09-07Merge tag 'gpio-updates-for-v5.15' of ↵Linus Torvalds1-34/+37
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: "We mostly have various improvements and refactoring all over the place but also some interesting new features - like the virtio GPIO driver that allows guest VMs to use host's GPIOs. We also have a new/old GPIO driver for rockchip - this one has been split out of the pinctrl driver. Summary: - new driver: gpio-virtio allowing a guest VM running linux to access GPIO lines provided by the host - split the GPIO driver out of the rockchip pin control driver - add support for a new model to gpio-aspeed-sgpio, refactor the driver and use generic device property interfaces, improve property sanitization - add ACPI support to gpio-tegra186 - improve the code setting the line names to support multiple GPIO banks per device - constify a bunch of OF functions in the core GPIO code and make the declaration for one of the core OF functions we use consistent within its header - use software nodes in intel_quark_i2c_gpio - add support for the gpio-line-names property in gpio-mt7621 - use the standard GPIO function for setting the GPIO names in gpio-brcmstb - fix a bunch of leaks and other bugs in gpio-mpc8xxx - use generic pm callbacks in gpio-ml-ioh - improve resource management and PM handling in gpio-mlxbf2 - modernize and improve the gpio-dwapb driver - coding style improvements in gpio-rcar - documentation fixes and improvements - update the MAINTAINERS entry for gpio-zynq - minor tweaks in several drivers" * tag 'gpio-updates-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (35 commits) gpio: mpc8xxx: Use 'devm_gpiochip_add_data()' to simplify the code and avoid a leak gpio: mpc8xxx: Fix a potential double iounmap call in 'mpc8xxx_probe()' gpio: mpc8xxx: Fix a resources leak in the error handling path of 'mpc8xxx_probe()' gpio: viperboard: remove platform_set_drvdata() call in probe gpio: virtio: Add missing mailings lists in MAINTAINERS entry gpio: virtio: Fix sparse warnings gpio: remove the obsolete MX35 3DS BOARD MC9S08DZ60 GPIO functions gpio: max730x: Use the right include gpio: Add virtio-gpio driver gpio: mlxbf2: Use DEFINE_RES_MEM_NAMED() helper macro gpio: mlxbf2: Use devm_platform_ioremap_resource() gpio: mlxbf2: Drop wrong use of ACPI_PTR() gpio: mlxbf2: Convert to device PM ops gpio: dwapb: Get rid of legacy platform data mfd: intel_quark_i2c_gpio: Convert GPIO to use software nodes gpio: dwapb: Read GPIO base from gpio-base property gpio: dwapb: Unify ACPI enumeration checks in get_irq() and configure_irqs() gpiolib: Deduplicate forward declaration in the consumer.h header MAINTAINERS: update gpio-zynq.yaml reference gpio: tegra186: Add ACPI support ...
2021-09-07mfd: lpc_sch: Rename GPIOBASE to prevent build errorRandy Dunlap1-2/+2
One MIPS platform (mach-rc32434) defines GPIOBASE. This macro conflicts with one of the same name in lpc_sch.c. Rename the latter one to prevent the build error. ../drivers/mfd/lpc_sch.c:25: error: "GPIOBASE" redefined [-Werror] 25 | #define GPIOBASE 0x44 ../arch/mips/include/asm/mach-rc32434/rb.h:32: note: this is the location of the previous definition 32 | #define GPIOBASE 0x050000 Cc: Denis Turischev <[email protected]> Fixes: e82c60ae7d3a ("mfd: Introduce lpc_sch for Intel SCH LPC bridge") Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-09-07mfd: syscon: Use of_iomap() instead of ioremap()Hector Martin1-1/+1
This automatically selects between ioremap() and ioremap_np() on platforms that require it, such as Apple SoCs. Signed-off-by: Hector Martin <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-09-02Merge tag 'clk-for-linus' of ↵Linus Torvalds1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "Nothing changed in the clk framework core this time around. We did get some updates to the basic clk types to use determine_rate for the divider type and add a power of two fractional divider flag though. Otherwise, this is a collection of clk driver updates. More than half the diffstat is in the Qualcomm clk driver where we add a bunch of data to describe clks on various SoCs and fix bugs. The other big new thing in here is the Mediatek MT8192 clk driver. That's been under review for a while and it's nice to see that it's finally upstream. Beyond that it's the usual set of minor fixes and tweaks to clk drivers. There are some non-clk driver bits in here which have all been acked by the respective maintainers. New Drivers: - Support video, gpu, display clks on qcom sc7280 SoCs - GCC clks on qcom MSM8953, SM4250/6115, and SM6350 SoCs - Multimedia clks (MMCC) on qcom MSM8994/MSM8992 - RPMh clks on qcom SM6350 SoCs - Support for Mediatek MT8192 SoCs - Add display (DU and DSI) clocks on Renesas R-Car V3U - Add I2C, DMAC, USB, sound (SSIF-2), GPIO, CANFD, and ADC clocks and resets on Renesas RZ/G2L Updates: - Support the SD/OE pin on IDT VersaClock 5 and 6 clock generators - Add power of two flag to fractional divider clk type - Migrate some clk drivers to clk_divider_ops.determine_rate - Migrate to clk_parent_data in gcc-sdm660 - Fix CLKOUT clocks on i.MX8MM and i.MX8MN by using imx_clk_hw_mux2 - Switch from .round_rate to .determine_rate in clk-divider-gate - Fix clock tree update for TF-A controlled clocks for all i.MX8M - Add missing M7 core clock for i.MX8MN - YAML conversion of rk3399 clock controller binding - Removal of GRF dependency for the rk3328/rk3036 pll types - Drop CLK_IS_CRITICAL flag from Tegra fuse clk - Make CLK_R9A06G032 Kconfig symbol invisible - Convert various DT bindings to YAML" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (128 commits) dt-bindings: clock: samsung: fix header path in example clk: tegra: fix old-style declaration clk: qcom: Add SM6350 GCC driver MAINTAINERS: clock: include S3C and S5P in Samsung SoC clock entry dt-bindings: clock: samsung: convert S5Pv210 AudSS to dtschema dt-bindings: clock: samsung: convert Exynos AudSS to dtschema dt-bindings: clock: samsung: convert Exynos4 to dtschema dt-bindings: clock: samsung: convert Exynos3250 to dtschema dt-bindings: clock: samsung: convert Exynos542x to dtschema dt-bindings: clock: samsung: add bindings for Exynos external clock dt-bindings: clock: samsung: convert Exynos5250 to dtschema clk: vc5: Add properties for configuring SD/OE behavior clk: vc5: Use dev_err_probe dt-bindings: clk: vc5: Add properties for configuring the SD/OE pin dt-bindings: clock: brcm,iproc-clocks: fix armpll properties clk: zynqmp: Fix kernel-doc format clk: at91: clk-generated: Limit the requested rate to our range clk: ralink: avoid to set 'CLK_IS_CRITICAL' flag for gates clk: zynqmp: Fix a memory leak clk: zynqmp: Check the return type ...
2021-09-01Merge tag 'staging-5.15-rc1' of ↵Linus Torvalds3-0/+89
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull IIO and staging driver updates from Greg KH: "Here is the big set of staging and IIO driver updates for 5.15-rc1. Also included in here are the counter driver subsystem updates as the IIO drivers needed them. Lots of churn in some staging drivers, we dropped the "old" rtl8188eu driver and replaced it with a newer version of the driver that had been maintained out-of-tree by Larry with the end goal of actually being able to get this driver out of staging eventually. Despite that driver being "newer" the line count of this pull request is going up. Some drivers moved out of staging as well, which is always nice to see, that is why there are additions to the mfc and misc driver subsystems. All of these were acked by the various subsystem maintainers involved. But by far, as normal, it's coding style cleanups all over the drivers/staging/ tree in here. Full details of these changes are in the shortlog. All of these have been in linux-next for a while with no reported problems" [ Note: the r8188eu merge clashed with commit 89939e890605 ("staging: rtlwifi: use siocdevprivate") from the networking tree. When resolving the issue, I noted that the whole r8188eu rtw_android code is dead since commit ae7471cae00a ("staging: r8188eu: remove rtw_ioctl function"). End result: the merge resolution was to throw all of that away, rather than do the mindless fixup to code that isn't actually reachable - Linus ] * tag 'staging-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (551 commits) staging: vt6655: Remove filenames in files staging: r8188eu: add extra TODO entries staging: vt6656: Remove filenames in files staging: wlan-ng: fix invalid assignment warning staging: r8188eu: rename fields of struct rtl_ps staging: r8188eu: remove ODM_DynamicPrimaryCCA_DupRTS() staging: r8188eu: rename fields of struct dyn_primary_cca staging: r8188eu: rename struct field Wifi_Error_Status staging: r8188eu: Provide a TODO file for this driver staging: r8188eu: remove unneeded variable staging: r8188eu: remove unneeded conversions to bool staging: r8188eu: remove {read,write}_macreg staging: r8188eu: core: remove condition with no effect staging: r8188eu: remove ethernet.h header file staging: r8188eu: remove ip.h header file staging: r8188eu: remove if_ether.h header file staging: r8188eu: make rtw_deinit_intf_priv return void staging: r8188eu: use is_multicast_ether_addr in os_dep/recv_linux.c staging: r8188eu: use is_multicast_ether_addr in hal/rtl8188eu_xmit.c staging: r8188eu: use is_multicast_ether_addr in core/rtw_xmit.c ...
2021-09-01Merge tag 'driver-core-5.15-rc1' of ↵Linus Torvalds1-2/+1
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the big set of driver core patches for 5.15-rc1. These do change a number of different things across different subsystems, and because of that, there were 2 stable tags created that might have already come into your tree from different pulls that did the following - changed the bus remove callback to return void - sysfs iomem_get_mapping rework Other than those two things, there's only a few small things in here: - kernfs performance improvements for huge numbers of sysfs users at once - tiny api cleanups - other minor changes All of these have been in linux-next for a while with no reported problems, other than the before-mentioned merge issue" * tag 'driver-core-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (33 commits) MAINTAINERS: Add dri-devel for component.[hc] driver core: platform: Remove platform_device_add_properties() ARM: tegra: paz00: Handle device properties with software node API bitmap: extend comment to bitmap_print_bitmask/list_to_buf drivers/base/node.c: use bin_attribute to break the size limitation of cpumap ABI topology: use bin_attribute to break the size limitation of cpumap ABI lib: test_bitmap: add bitmap_print_bitmask/list_to_buf test cases cpumask: introduce cpumap_print_list/bitmask_to_buf to support large bitmask and list sysfs: Rename struct bin_attribute member to f_mapping sysfs: Invoke iomem_get_mapping() from the sysfs open callback debugfs: Return error during {full/open}_proxy_open() on rmmod zorro: Drop useless (and hardly used) .driver member in struct zorro_dev zorro: Simplify remove callback sh: superhyway: Simplify check in remove callback nubus: Simplify check in remove callback nubus: Make struct nubus_driver::remove return void kernfs: dont call d_splice_alias() under kernfs node lock kernfs: use i_lock to protect concurrent inode updates kernfs: switch kernfs to use an rwsem kernfs: use VFS negative dentry caching ...
2021-08-16mfd: ti_am335x_tscadc: Delete superfluous error messageTang Bin1-3/+2
In the function ti_tscadc_probe(), when get irq failed, platform_get_irq() logs an error message, so remove redundant message here. Signed-off-by: Tang Bin <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd: tqmx86: Assume 24MHz LPC clock for unknown boardsMatthias Schiffer1-3/+5
All future TQMx86 modules should use a 24MHz LPC clock. Warn about unknown boards, but assume this is the case. Signed-off-by: Matthias Schiffer <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd: tqmx86: Add support for TQ-Systems DMI IDsMatthias Schiffer1-0/+8
Newer TQMx86 modules use TQ-Systems instead of TQ-Group as their vendor ID. Signed-off-by: Matthias Schiffer <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd: tqmx86: Add support for TQMx110EB and TQMxE40xMatthias Schiffer1-0/+20
Add the board IDs for the TQMx110EB and the TQMxE40x family. All use a 24MHz LPC clock. Signed-off-by: Matthias Schiffer <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd: tqmx86: Fix typo in "platform"Matthias Schiffer1-4/+4
Rename variable from "ocores_platfom_data" to "ocores_platform_data". Signed-off-by: Matthias Schiffer <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd: tqmx86: Remove incorrect TQMx90UC board IDMatthias Schiffer1-4/+0
No TQMx90UC exists at the moment, and it is undecided whether ID 10 will be used eventually (and if it is, how that SoM will be named). Signed-off-by: Matthias Schiffer <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd: tqmx86: Clear GPIO IRQ resource when no IRQ is setMatthias Schiffer1-0/+2
The driver was registering IRQ 0 when no IRQ was set. This leads to warnings with newer kernels. Clear the resource flags, so no resource is registered at all in this case. Fixes: 2f17dd34ffed ("mfd: tqmx86: IO controller with I2C, Wachdog and GPIO") Signed-off-by: Matthias Schiffer <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd: simple-mfd-i2c: Add support for registering devices via MFD cellsLee Jones2-8/+65
More devices are cropping up requiring only Regmap initialisation and child registration functionality. We currently only support that if all required devices are represented by their own Device Tree nodes complete with compatible strings. However, not everyone is happy with adding empty nodes that provide no additional device information into the Device Tree. Rather than have a plethora of mostly empty, function-less drivers in MFD, we'll support those simple cases in here instead via MFD cells. Cc: Mark Brown <[email protected]> Tested-by: Michael Walle <[email protected]> Reviewed-by: Alistair Francis <[email protected]> Tested-by: Alistair Francis <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd/cpuidle: ux500: Rename driver symbolLinus Walleij1-2/+1
The PRCMU driver defines this as a DT node but there are no bindings for it and it needs no data from the device tree. Just spawn the device directly in the same way as the watchdog. Name it "db8500-cpuidle" since there are no ambitions to support any more SoCs than this one. This rids this annoying boot message: [ 0.032610] cpuidle-dbx500: Failed to locate of_node [id: 0] However I think the device still spawns and work just fine, despite not finding a device tree node. Cc: Rafael J. Wysocki <[email protected]> Cc: [email protected] Signed-off-by: Linus Walleij <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd: tps65086: Add cell entry for reset driverEmil Renner Berthing1-0/+1
The only way to reset the BeagleV Starlight v0.9 board[1] properly is to tell the PMIC to reset itself which will then assert the external reset lines of the SoC, USB hub and ethernet phy. This adds an mfd cell entry for the reset driver doing just that. [1] https://github.com/beagleboard/beaglev-starlight Signed-off-by: Emil Renner Berthing <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-16mfd: tps65086: Make interrupt line optionalEmil Renner Berthing1-10/+11
The BeagleV Starlight v0.9 board[1] doesn't have the IRQB line routed to the SoC, but it is still useful to be able to reach the PMIC over I2C for the other functionality it provides such as GPIOs and regulator settings. [1] https://github.com/beagleboard/beaglev-starlight Signed-off-by: Emil Renner Berthing <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-12clk: fractional-divider: Introduce POWER_OF_TWO_PS flagAndy Shevchenko1-1/+2
The newly introduced POWER_OF_TWO_PS flag, when set, makes the flow to skip the assumption that the caller will use an additional 2^scale prescaler to get the desired clock rate. Reported-by: Liu Ying <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
2021-08-12mfd: Bulk conversion to generic_handle_domain_irq()Marc Zyngier4-16/+10
Wherever possible, replace constructs that match either generic_handle_irq(irq_find_mapping()) or generic_handle_irq(irq_linear_revmap()) to a single call to generic_handle_domain_irq(). Acked-by: Lee Jones <[email protected]> Signed-off-by: Marc Zyngier <[email protected]>
2021-08-11mfd: intel_quark_i2c_gpio: Convert GPIO to use software nodesAndy Shevchenko1-33/+37
The driver can provide a software node group instead of passing legacy platform data. This will allow to drop the legacy platform data structures along with unifying a child device driver to use same interface for all property providers, i.e. Device Tree, ACPI, and board files. Signed-off-by: Andy Shevchenko <[email protected]> Tested-by: Serge Semin <[email protected]> Acked-for-MFD-by: Lee Jones <[email protected]> Reviewed-by: Linus Walleij <[email protected]>
2021-08-11gpio: dwapb: Unify ACPI enumeration checks in get_irq() and configure_irqs()Andy Shevchenko1-1/+0
Shared IRQ is only enabled for ACPI enumeration, there is no need to have a special flag for that, since we simple can test if device has been enumerated by ACPI. This unifies the checks in dwapb_get_irq() and dwapb_configure_irqs(). Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Lee Jones <[email protected]> Acked-by: Serge Semin <[email protected]> Tested-by: Serge Semin <[email protected]>
2021-08-09mfd: db8500-prcmu: Handle missing FW variantLinus Walleij1-2/+4
There was an "unknown" firmware variant turning up in the wild causing problems in the clock driver. Add this missing variant and clarify that varian 11 and 15 are Samsung variants, as this is now very well known from released products. Signed-off-by: Linus Walleij <[email protected]> Acked-by: Stephen Boyd <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-05mfd: db8500-prcmu: Rename register headerLinus Walleij2-1/+1
Drop the ambition to support dbx500, the other SoCs in this series were never deleted and the support for them has been deleted. DB8500 is what we support. Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-05mfd: axp20x: Add supplied-from property to axp288_fuel_gauge cellHans de Goede1-0/+13
The power-supply framework has the notion of one power-supply device being supplied by another. A typical example of this is a charger charging a battery. A tablet getting plugged in to charge (or plugged out) only results in events seen by the axp288_charger device / MFD cell. Which means that a change udev-event only gets send for the charger power-supply class device, not for the battery (the axp288_fuel_gauge device). The axp288_fuel_gauge does have an external_power_change'd callback which will generate a change udev-event when called. But before this commit this never got called because the power-supply core only calls this when a power-supply class device's supplier changes and the supplier link from axp288_charger to axp288_fuel_gauge was missing. Add a "supplied-from" property to axp288_fuel_gauge cell, pointing to the "axp288_charger" power-supply class device, so that the axp288_fuel_gauge's external_power_change'd callback gets called on axp288_charger state changes. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-05mfd: Don't use irq_create_mapping() to resolve a mappingMarc Zyngier4-5/+5
Although irq_create_mapping() is able to deal with duplicate mappings, it really isn't supposed to be a substitute for irq_find_mapping(), and can result in allocations that take place in atomic context if the mapping didn't exist. Fix the handful of MFD drivers that use irq_create_mapping() in interrupt context by using irq_find_mapping() instead. Cc: Linus Walleij <[email protected]> Cc: Lee Jones <[email protected]> Cc: Maxime Coquelin <[email protected]> Cc: Alexandre Torgue <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-08-02mfd: db8500-prcmu: Adjust map to realityLinus Walleij1-8/+6
These are the actual frequencies reported by the PLL, so let's report these. The roundoffs are inappropriate, we should round to the frequency that the clock will later report. Drop some whitespace at the same time. Cc: [email protected] Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-07-23mfd: hi6421-spmi-pmic: move driver from stagingMauro Carvalho Chehab3-0/+89
This driver is ready for mainstream. So, move it out of staging. Acked-by: Lee Jones <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]> Link: https://lore.kernel.org/r/dd150f3ffa19c2dda0171f7dbe1dd63cce2a7af5.1627025657.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-07-21bus: Make remove callback return voidUwe Kleine-König1-2/+1
The driver core ignores the return value of this callback because there is only little it can do when a device disappears. This is the final bit of a long lasting cleanup quest where several buses were converted to also return void from their remove callback. Additionally some resource leaks were fixed that were caused by drivers returning an error code in the expectation that the driver won't go away. With struct bus_type::remove returning void it's prevented that newly implemented buses return an ignored error code and so don't anticipate wrong expectations for driver authors. Reviewed-by: Tom Rix <[email protected]> (For fpga) Reviewed-by: Mathieu Poirier <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> (For drivers/s390 and drivers/vfio) Acked-by: Russell King (Oracle) <[email protected]> (For ARM, Amba and related parts) Acked-by: Mark Brown <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> (for sunxi-rsb) Acked-by: Pali Rohár <[email protected]> Acked-by: Mauro Carvalho Chehab <[email protected]> (for media) Acked-by: Hans de Goede <[email protected]> (For drivers/platform) Acked-by: Alexandre Belloni <[email protected]> Acked-By: Vinod Koul <[email protected]> Acked-by: Juergen Gross <[email protected]> (For xen) Acked-by: Lee Jones <[email protected]> (For mfd) Acked-by: Johannes Thumshirn <[email protected]> (For mcb) Acked-by: Johan Hovold <[email protected]> Acked-by: Srinivas Kandagatla <[email protected]> (For slimbus) Acked-by: Kirti Wankhede <[email protected]> (For vfio) Acked-by: Maximilian Luz <[email protected]> Acked-by: Heikki Krogerus <[email protected]> (For ulpi and typec) Acked-by: Samuel Iglesias Gonsálvez <[email protected]> (For ipack) Acked-by: Geoff Levand <[email protected]> (For ps3) Acked-by: Yehezkel Bernat <[email protected]> (For thunderbolt) Acked-by: Alexander Shishkin <[email protected]> (For intel_th) Acked-by: Dominik Brodowski <[email protected]> (For pcmcia) Acked-by: Rafael J. Wysocki <[email protected]> (For ACPI) Acked-by: Bjorn Andersson <[email protected]> (rpmsg and apr) Acked-by: Srinivas Pandruvada <[email protected]> (For intel-ish-hid) Acked-by: Dan Williams <[email protected]> (For CXL, DAX, and NVDIMM) Acked-by: William Breathitt Gray <[email protected]> (For isa) Acked-by: Stefan Richter <[email protected]> (For firewire) Acked-by: Benjamin Tissoires <[email protected]> (For hid) Acked-by: Thorsten Scherer <[email protected]> (For siox) Acked-by: Sven Van Asbroeck <[email protected]> (For anybuss) Acked-by: Ulf Hansson <[email protected]> (For MMC) Acked-by: Wolfram Sang <[email protected]> # for I2C Acked-by: Sudeep Holla <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Acked-by: Dmitry Torokhov <[email protected]> Acked-by: Finn Thain <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-07-20mfd: intel-lpss: Add Intel Cannon Lake ACPI IDsAndy Shevchenko1-0/+18
Some of the machines, like Dell Precision 3630, may expose LPSS devices via ACPI. Add their IDs to the list. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-07-20mfd: lpc_ich: Enable GPIO driver for DH89xxCCChris Blake1-0/+1
Based on the Intel Datasheet for the DH89xxCC PCH, the GPIO driver is the same as ICH_v5_GPIO, minus the fact the DH89xxCC also has blink support. However, blink support isn't supported by the GPIO driver so we should use ICH_v5_GPIO. Tested and working on a Meraki MX100-HW. Signed-off-by: Chris Blake <[email protected]> Co-developed-by: Christian Lamparter <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-07-16mfd: mt6360: Sort regulator resourcesFei Shao1-4/+4
Reorder the regulator resources. Signed-off-by: Fei Shao <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-07-16mfd: intel-m10-bmc: Add N5010 variantMartin Hundebøll1-1/+11
The m10-bmc is used on the Silicom N5010 PAC too, so add it to list of m10bmc types. Signed-off-by: Martin Hundebøll <[email protected]> Acked-by: Moritz Fischer <[email protected]> Reviewed-by: Xu Yilun <[email protected]> Reviewed-by: Matthew Gerlach <[email protected]> Signed-off-by: Lee Jones <[email protected]>