Commit Graph

2301 Commits

Author SHA1 Message Date
Linus Torvalds 89b7fd5d7f pwm: Changes for v6.4-rc1
The bulk of this is trivial conversions to the new .remove_new()
 callback for drivers as part of Uwe's effort to clean that up.
 
 Other than that a driver is added for Apple devices and various small
 fixes are included for existing drivers.
 
 Last but not least, this finally gets rid of the old pwm_request() and
 pwm_free() APIs are removed since the last user was dropped in v6.3.
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmRSgJcZHHRoaWVycnku
 cmVkaW5nQGdtYWlsLmNvbQAKCRDdI6zXfz6zoUZzEACcLaLRRvAsgsrrnunQ1sNT
 y5Haep7FjYF8W0cn3MJbH4efdtW6mKJxMV7ZCvbPYXi79Q//4J3oeXV/miRcYTLf
 OqALvWKlaXJ3bbwddOdsxjqBBRDPfo3hMTZjSkfiTTbH1vIx3lD/nAdogrVHPBh+
 Ap6RMFqb5xnJtefxWNaQ6puWY6XjA9jznitQtMMEkjZqjQtqNd+QX149tFU3avwo
 0S4cjUB3FKiSctUXW5EZh3jNSDgB/TYmeslkpmnozkde9DK3ooYMRDMkV0jTaGSb
 EKPLWmLSoIDH+ghG7r5KGkE7x5mBELtBbW/KxXBFpro/x528VxYdTgAGOn54XWmn
 NcsWiMdReWmPbPDQzZcUBDn8boxyw4jtqsdwzu96G1KHdKcVH6EH00XcH+Pi9KG9
 HqPBMvqAjxAn3GK6SdfjGU1KmGB3MYCi4u+twAyycDOEMkxA+FzHSs+OD1a2iaK/
 AIYXMjZ4KdVIvIIjJzJttdkTOzt/R6xfn4okvlBzQpD34c7eyi6U+S24+I4yX4y5
 wGmZ52h5VvWaBXPaDPYaziyhfRn0nzBSVRXqV62jAusON/xcU6tc1L5YYX0GRNfv
 NG264HBAdlUVERs6XDqC+meKwFSzLEmt47pWCBCnOfck/KXLqdsM2tQtMTmI0p4l
 9vncNSofIexg/HcrdOFbug==
 =slCK
 -----END PGP SIGNATURE-----

Merge tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm

Pull pwm updates from Thierry Reding:
 "The bulk of this is trivial conversions to the new .remove_new()
  callback for drivers as part of Uwe's effort to clean that up.

  Other than that a driver is added for Apple devices and various small
  fixes are included for existing drivers.

  Last but not least, this finally gets rid of the old pwm_request() and
  pwm_free() APIs are removed since the last user was dropped in v6.3"

* tag 'pwm/for-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (44 commits)
  pwm: Remove unused radix tree
  pwm: Delete deprecated functions pwm_request() and pwm_free()
  pwm: meson: Fix g12a ao clk81 name
  pwm: meson: Fix axg ao mux parents
  pwm: stm32: Enforce settings for PWM capture
  MAINTAINERS: Add entries for Apple PWM driver
  pwm: Add Apple PWM controller
  dt-bindings: pwm: Add Apple PWM controller
  pwm: mtk-disp: Configure double buffering before reading in .get_state()
  pwm: mtk-disp: Disable shadow registers before setting backlight values
  pwm: stm32-lp: Drop of_match_ptr for ID table
  pwm: rcar: Drop of_match_ptr for ID table
  dt-bindings: pwm: Convert Amlogic Meson PWM binding
  dt-bindings: pwm: mediatek: Add mediatek,mt7986 compatible
  pwm: xilinx: Convert to platform remove callback returning void
  pwm: vt8500: Convert to platform remove callback returning void
  pwm: tiehrpwm: Convert to platform remove callback returning void
  pwm: tiecap: Convert to platform remove callback returning void
  pwm: tegra: Convert to platform remove callback returning void
  pwm: sun4i: Convert to platform remove callback returning void
  ...
2023-05-03 11:25:01 -07:00
Linus Torvalds 3af49062b0 - New Drivers
- Add support for  Renesas RZ/G2L MTU3
 
  - New Device Support
    - Add support for Lenovo Yoga Book X90F to Intel CHT WC
    - Add support for MAX5970 and MAX5978 to Simple MFD (I2C)
    - Add support for Meteor Lake PCH-S LPSS PCI to Intel LPSS PCI
    - Add support for AXP15060 PMIC to X-Powers PMIC collection
 
  - Remove Device Support
    - Remove support for Samsung 5M8751 and S5M8763 PMIC devices
 
  - New Functionality
    - Convert deprecated QCOM IRQ Chip to config registers
    - Add support for 32-bit address spaces to Renesas SMUs
 
  - Fix-ups
    - Make use of APIs / MACROs designed to simplify and demystify
    - Add / improve Device Tree bindings
    - Memory saving struct layout optimisations
    - Remove old / deprecated functionality
    - Factor out unassigned register addresses from ranges
    - Trivial: Spelling fixes, renames and coding style fixes
    - Rid 'defined but not used' warnings
    - Remove ineffective casts and pointer stubs
 
  - Bug Fixes
    - Fix incorrectly non-inverted mask/unmask IRQs on QCOM platforms
    - Remove MODULE_*() helpers from non-tristate drivers
    - Do not attempt to use out-of-range memory addresses associated with io_base
    - Provide missing export helpers
    - Fix remap bulk read optimisation fallout
    - Fix memory leak issues in error paths
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmRROFAACgkQUa+KL4f8
 d2E9OxAAtG4Ac/I8Cp/VsTGGn5/pxxMnY/AWmdfkexp8bDQSvavKKQZ2wEwgFaTW
 GVaOIuWpG82fdoIAm1SkLs/gjPbXLnDJlxv8UcYa3kMQik/iiwrWl4zN2KBZqIIX
 qdg7fZNVAhi/qjue1YCHxKjMB80kK2LBTfwly+mbOXWMOBmoDh957oFuNBAa9W/A
 QxN9ckU/yVMjpeZQ1M97g/nUu+lKMypcCNHm1hklzqbchqgUiefdYS6t+g7zBgff
 zvwrlo+Tt0oIef95+TVmiVQBWJ+Cf8ssZphyL9I5dUH1Ft16BsNZYVvD1Eur1WGf
 N7szGDBZoqK5I6uUJ2t4+xiE4Mh1r+TIoCZuSwpDWS5IRKiWxTTZ9aDTXTKbnVKK
 Ov5SA3cdC2McXa0NCXB/47HzDTXhffH0SQ9x3JKlba2crSKt7LicVhjeflMOcHw+
 HuTzg3imeMQriLVrVcvgce+YOcF3G/bFX9jvxnp8WFY+MLKuTYCGqoUfY6EF6r4i
 F0Y6DmYDBGX3rND+zvXDVMjS+RymYTSMtY9PKOXEdY1WU9E8GAHSKhrOCyCO3aIm
 PZRC2GAzGQ5fRCkyXusk0kxJqBBxu1My/wUQ9xRjdMKszFxEgVVFIY7KLwanY5vW
 2akDnwOtu+37G9Qm4h2TpQdNLGTldZbbFcWrYGKzbNrVOjYw824=
 =EBtX
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Drivers:
   - Add support for  Renesas RZ/G2L MTU3

  New Device Support:
   - Add support for Lenovo Yoga Book X90F to Intel CHT WC
   - Add support for MAX5970 and MAX5978 to Simple MFD (I2C)
   - Add support for Meteor Lake PCH-S LPSS PCI to Intel LPSS PCI
   - Add support for AXP15060 PMIC to X-Powers PMIC collection

  Remove Device Support:
   - Remove support for Samsung 5M8751 and S5M8763 PMIC devices

  New Functionality:
   - Convert deprecated QCOM IRQ Chip to config registers
   - Add support for 32-bit address spaces to Renesas SMUs

  Fix-ups:
   - Make use of APIs / MACROs designed to simplify and demystify
   - Add / improve Device Tree bindings
   - Memory saving struct layout optimisations
   - Remove old / deprecated functionality
   - Factor out unassigned register addresses from ranges
   - Trivial: Spelling fixes, renames and coding style fixes
   - Rid 'defined but not used' warnings
   - Remove ineffective casts and pointer stubs

  Bug Fixes:
   - Fix incorrectly non-inverted mask/unmask IRQs on QCOM platforms
   - Remove MODULE_*() helpers from non-tristate drivers
   - Do not attempt to use out-of-range memory addresses associated with io_base
   - Provide missing export helpers
   - Fix remap bulk read optimisation fallout
   - Fix memory leak issues in error paths"

* tag 'mfd-next-6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (88 commits)
  dt-bindings: mfd: ti,j721e-system-controller: Add SoC chip ID
  leds: bd2606mvv: Driver for the Rohm 6 Channel i2c LED driver
  dt-bindings: mfd: qcom,spmi-pmic: Document flash LED controller
  dt-bindings: mfd: x-powers,axp152: Document the AXP15060 variant
  mfd: axp20x: Add support for AXP15060 PMIC
  dt-bindings: mfd: x-powers,axp152: Document the AXP313a variant
  counter: rz-mtu3-cnt: Unlock on error in rz_mtu3_count_ceiling_write()
  dt-bindings: mfd: dlg,da9063: Document voltage monitoring
  dt-bindings: mfd: stm32: Remove unnecessary blank lines
  dt-bindings: mfd: qcom,spmi-pmic: Use generic ADC node name in examples
  dt-bindings: mfd: syscon: Add nuvoton,ma35d1-sys compatible
  MAINTAINERS: Add entries for Renesas RZ/G2L MTU3a counter driver
  counter: Add Renesas RZ/G2L MTU3a counter driver
  Documentation: ABI: sysfs-bus-counter: add cascade_counts_enable and external_input_phase_clock_select
  mfd: Add Renesas RZ/G2L MTU3a core driver
  dt-bindings: timer: Document RZ/G2L MTU3a bindings
  mfd: rsmu_i2c: Convert to i2c's .probe_new() again
  mfd: intel-lpss: Add Intel Meteor Lake PCH-S LPSS PCI IDs
  mfd: dln2: Fix memory leak in dln2_probe()
  mfd: axp20x: Fix axp288 writable-ranges
  ...
2023-05-02 10:41:31 -07:00
Linus Torvalds cec24b8b6b Char/Misc drivers for 6.4-rc1
Here is the "big" set of char/misc and other driver subsystems for
 6.4-rc1.
 
 It's pretty big, but due to the removal of pcmcia drivers, almost breaks
 even for number of lines added vs. removed, a nice change.
 
 Included in here are:
   - removal of unused PCMCIA drivers (finally!)
   - Interconnect driver updates and additions
   - Lots of IIO driver updates and additions
   - MHI driver updates
   - Coresight driver updates
   - NVMEM driver updates, which required some OF updates
   - W1 driver updates and a new maintainer to manage the subsystem
   - FPGA driver updates
   - New driver subsystem, CDX, for AMD systems
   - lots of other small driver updates and additions
 
 All of these have been in linux-next for a while with no reported
 issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZEp5Eg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynSXgCg0kSw3vUYwpsnhAsQkoPw1QVA23sAn2edRCMa
 GEkPWjrROueCom7xbLMu
 =eR+P
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc drivers updates from Greg KH:
 "Here is the "big" set of char/misc and other driver subsystems for
  6.4-rc1.

  It's pretty big, but due to the removal of pcmcia drivers, almost
  breaks even for number of lines added vs. removed, a nice change.

  Included in here are:

   - removal of unused PCMCIA drivers (finally!)

   - Interconnect driver updates and additions

   - Lots of IIO driver updates and additions

   - MHI driver updates

   - Coresight driver updates

   - NVMEM driver updates, which required some OF updates

   - W1 driver updates and a new maintainer to manage the subsystem

   - FPGA driver updates

   - New driver subsystem, CDX, for AMD systems

   - lots of other small driver updates and additions

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'char-misc-6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (196 commits)
  mcb-lpc: Reallocate memory region to avoid memory overlapping
  mcb-pci: Reallocate memory region to avoid memory overlapping
  mcb: Return actual parsed size when reading chameleon table
  kernel/configs: Drop Android config fragments
  virt: acrn: Replace obsolete memalign() with posix_memalign()
  spmi: Add a check for remove callback when removing a SPMI driver
  spmi: fix W=1 kernel-doc warnings
  spmi: mtk-pmif: Drop of_match_ptr for ID table
  spmi: pmic-arb: Convert to platform remove callback returning void
  spmi: mtk-pmif: Convert to platform remove callback returning void
  spmi: hisi-spmi-controller: Convert to platform remove callback returning void
  w1: gpio: remove unnecessary ENOMEM messages
  w1: omap-hdq: remove unnecessary ENOMEM messages
  w1: omap-hdq: add SPDX tag
  w1: omap-hdq: allow compile testing
  w1: matrox: remove unnecessary ENOMEM messages
  w1: matrox: use inline over __inline__
  w1: matrox: switch from asm to linux header
  w1: ds2482: do not use assignment in if condition
  w1: ds2482: drop unnecessary header
  ...
2023-04-27 12:07:50 -07:00
Shengyu Qu e0f8ad2a70 mfd: axp20x: Add support for AXP15060 PMIC
The AXP15060 is a PMIC chip produced by X-Powers, and could be connected
via an I2C bus.

Describe the regmap and the MFD bits, along with the registers exposed
via I2C. Eventually advertise the device using a new compatible string
and add support for power off the system.

The driver would disable PEK function if IRQ is not configured in device
tree, since some boards (For example, Starfive Visionfive 2) didn't
connect IRQ line of PMIC to SOC.

GPIO function isn't enabled in this commit, since its configuration
operation is different from any existing AXP PMICs and needs
logic modification on existing driver. GPIO support might come in later
patches.

Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/TY3P286MB261162D57695AC8164ED50E298609@TY3P286MB2611.JPNP286.PROD.OUTLOOK.COM
2023-04-26 15:25:25 +01:00
Biju Das 654c293e16 mfd: Add Renesas RZ/G2L MTU3a core driver
The RZ/G2L multi-function timer pulse unit 3 (MTU3a) is embedded in
the Renesas RZ/G2L family SoCs. It consists of eight 16-bit timer
channels and one 32-bit timer channel. It supports the following
functions
 - Counter
 - Timer
 - PWM

The 8/16/32 bit registers are mixed in each channel.

Add MTU3a core driver for RZ/G2L SoC. The core driver shares the
clk and channel register access for the other child devices like
Counter, PWM and Clock event.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230330111632.169434-3-biju.das.jz@bp.renesas.com
2023-04-26 11:40:34 +01:00
Min Li 67d6c76fc8 mfd: rsmu: Support 32-bit address space
We used to assume 0x2010xxxx address. Now that we need to access
0x2011xxxx address, we need to support read/write the whole 32-bit
address space.

Also defined RSMU_MAX_WRITE_COUNT and RSMU_MAX_READ_COUNT for readability

Signed-off-by: Min Li <min.li.xe@renesas.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/MW5PR03MB693295AF31ABCAF6AE52EE74A08B9@MW5PR03MB6932.namprd03.prod.outlook.com
2023-04-26 11:40:34 +01:00
Uwe Kleine-König a0b9becad8 mfd: core: Remove .enable() and .disable() callbacks
With commit dd77f5fa97d3 ("mfd: Remove toshiba tmio drivers") the last
mfd driver that implements these callbacks is gone and since commit
652719b100 ("w1: remove ds1wm driver") the last user is gone. The
corresponding functions mfd_cell_enable() and mfd_cell_disable() are
also unused (since commit 0ca222c819 ("leds: Remove asic3 driver")).

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230308091257.2404932-1-u.kleine-koenig@pengutronix.de
2023-04-26 11:40:29 +01:00
Patrick Rudolph 0742c2a633 mfd: max597x: Add support for MAX5970 and MAX5978
Implement a regulator driver with IRQ support for fault management.
Written against documentation [1] and [2] and tested on real hardware.

Every channel has it's own regulator supply nammed 'vss1-supply' and
'vss2-supply'. The regulator supply is used to determine the output
voltage, as the smart switch provides no output regulation.
The driver requires the 'shunt-resistor-micro-ohms' to be present in
the devicetree to properly calculate current related values.

You must specify compatible devictree layout:

regulator@3a {
        reg = <0x3a>;
        vss1-supply = <&p3v3>;
        compatible = "maxim,max5978";

        ...

        regulators {
                sw0_ref: SW0 {
                        regulator-compatible = "SW0";
                        shunt-resistor-micro-ohms = <12000>;
                        ...
                }
        }
}

1: https://datasheets.maximintegrated.com/en/ds/MAX5970.pdf
2: https://datasheets.maximintegrated.com/en/ds/MAX5978.pdf

...
Changes in V12:
- Use simple_mfd_i2c driver and remove previous implementation.
- Remove newline
- Use _MFD_MAX597X_H in header file
- Successfull build need following patch from regulator:
https://lore.kernel.org/r/20230216075302.68935-1-Naresh.Solanki@9elements.com
https://lore.kernel.org/r/20230210163225.1208035-1-Naresh.Solanki@9elements.com

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Marcello Sylvester Bauer <sylv@sylv.io>
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230307121246.127425-2-Naresh.Solanki@9elements.com
2023-04-26 11:40:29 +01:00
Jakob Hauser b8fd17d950 mfd: rt5033: Fix comments and style in includes
Fix comments and remove some empty lines in rt5033-private.h. Align struct
rt5033_charger in rt5033.h.

Signed-off-by: Jakob Hauser <jahau@rocketmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/606950da6f4b36f5a124ff13756c78644fc89804.1677620677.git.jahau@rocketmail.com
2023-04-26 11:40:29 +01:00
Christophe JAILLET 86c6bb0edf mfd: core: Reorder fields in 'struct mfd_cell' to save some memory
Group some variables based on their sizes to reduce hole and avoid padding.
On x86_64, this shrinks the size from 144 to 128 bytes.

As an example:

$ size drivers/mfd/as3722.o (Before)
   text	   data	    bss	    dec	    hex	filename
   9441	    680	     16	  10137	   2799	drivers/mfd/as3722.o

$ size drivers/mfd/as3722.o (After)
   text	   data	    bss	    dec	    hex	filename
   9345	    680	     16	  10041	   2739	drivers/mfd/as3722.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/bb631974888dfe1af593b6280cf30fb913d2d1a4.1676365116.git.christophe.jaillet@wanadoo.fr
2023-04-26 11:40:27 +01:00
David Virag a3165abaa9 rtc: s5m: Drop S5M8763 support
The S5M8763 MFD has no device tree compatible, and since board file
support for it was removed, there's no way to use this MFD. After
removing the remaining code for it from the MFD driver, also remove
support for it in the s5m RTC driver, and all remaining references to
it.

Signed-off-by: David Virag <virag.david003@gmail.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230131183008.4451-3-virag.david003@gmail.com
2023-04-26 11:40:26 +01:00
David Virag f736d2c0ca mfd: sec: Remove PMICs without compatibles
The S5M8751 and S5M8763 PMIC chips have no corresponding compatible
values, so since board file support was removed for this driver, there
is no way to specify these PMICs as present in boards anymore.
Remove leftovers of these chips since it's dead code.

Signed-off-by: David Virag <virag.david003@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230131183008.4451-2-virag.david003@gmail.com
2023-04-26 11:40:26 +01:00
Linus Torvalds 2c96606a0f gpio updates for v6.4-rc1
New drivers:
 - add a driver for the Loongson GPIO controller
 - add a driver for the fxl6408 I2C GPIO expander
 - add a GPIO module containing code common for Intel Elkhart Lake and
   Merrifield platforms
 - add a driver for the Intel Elkhart Lake platform reusing the code from
   the intel tangier library
 
 GPIOLIB core:
 - GPIO ACPI improvements
 - simplify gpiochip_add_data_with_keys() fwnode handling
 - cleanup header inclusions (remove unneeded ones, order the rest
   alphabetically)
 - remove duplicate code (reuse krealloc() instead of open-coding it, drop
   a duplicated check in gpiod_find_and_request())
 - reshuffle the code to remove unnecessary forward declarations
 - coding style cleanups and improvements
 - add a helper for accessing device fwnodes
 - small updates in docs
 
 Driver improvements:
 - convert all remaining GPIO irqchip drivers to using immutable irqchips
 - drop unnecessary of_match_ptr() macro expansions
 - shrink the code in gpio-merrifield significantly by reusing the code from
   gpio-tangier + minor tweaks to the driver code
 - remove MODULE_LICENSE() from drivers that can only be built-in
 - add device-tree support to gpio-loongson1
 - use new regmap features in gpio-104-dio-48e and gpio-pcie-idio-24
 - minor tweaks and fixes to gpio-xra1403, gpio-sim, gpio-tegra194, gpio-omap,
   gpio-aspeed, gpio-raspberrypi-exp
 - shrink code in gpio-ich and gpio-pxa
 - Kconfig tweak for gpio-pmic-eic-sprd
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmRGjBIACgkQEacuoBRx
 13IBMA/+PTEowr87BTJW+Z0Y3EoXPGZSKFzUpnzpbGo7CT5mEO3KBbyikZi3asZ4
 5mVPbHOC7OU8t76KSGYWXwPh0bvskt+jR2wz19f6F65g1W2SnTym52wAPUJDrKvm
 YQofEGcz9ykTIo5KQjAyqADYrrfIOKCOZbN59k8GscXBHkYmGFO3ZhEa5HhzcF+S
 qJBxnJ13Tbg9bszyl062pLqsNYGDeqqSuELrhALQCzSCM3WlJQOaHUEG//mS1Syu
 OHX2pwjw8u3HxBo6pKMK5fa4/aFM+EUAvSdDX59WmVrPnpLCHezyh4K3WQFUSnwG
 OJsW+b/eUDjICQBRvsHIJLuiAr19UouWWY6IZE9dTOjoPO1KWHtbaYX8rHWRZWCM
 +/QVfLavmXbOHW/pS2+NNxCARwu8o8ozcopY3PT6TjC5aN8/IkVT4eSaT3mJYXmh
 8uS/5aY1Th0eyK5GHv7IcNME5Jb+sAHEnqG0Ebns7a9kOGQdEMJwZrnc5IjKWSMd
 PAKNjWYZ49XALtl8vVSar2DYt6d6z+UvGDX67s686FVpCDk15cyUE6VjdtKdGdsd
 mH+OnCaWDt+l89DEqZ4298ZA6kNk2CkHHjIO/TBDkU3jP7/wp/NtU0RTuCXydwjW
 aNjnfHd2JMJ//wQ4l2fQgpzWfVEN34mKZ2pysDotY47bwjpPD7o=
 =X+sP
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski:
 "We have some new drivers, significant refactoring of existing intel
  platforms, lots of improvements all around, mass conversion to using
  immutable irqchips by drivers that had not been converted individually
  yet and some changes in the core library code.

  Summary:

  New drivers:
   - add a driver for the Loongson GPIO controller
   - add a driver for the fxl6408 I2C GPIO expander
   - add a GPIO module containing code common for Intel Elkhart Lake and
     Merrifield platforms
   - add a driver for the Intel Elkhart Lake platform reusing the code
     from the intel tangier library

  GPIOLIB core:
   - GPIO ACPI improvements
   - simplify gpiochip_add_data_with_keys() fwnode handling
   - cleanup header inclusions (remove unneeded ones, order the rest
     alphabetically)
   - remove duplicate code (reuse krealloc() instead of open-coding it,
     drop a duplicated check in gpiod_find_and_request())
   - reshuffle the code to remove unnecessary forward declarations
   - coding style cleanups and improvements
   - add a helper for accessing device fwnodes
   - small updates in docs

  Driver improvements:
   - convert all remaining GPIO irqchip drivers to using immutable
     irqchips
   - drop unnecessary of_match_ptr() macro expansions
   - shrink the code in gpio-merrifield significantly by reusing the
     code from gpio-tangier + minor tweaks to the driver code
   - remove MODULE_LICENSE() from drivers that can only be built-in
   - add device-tree support to gpio-loongson1
   - use new regmap features in gpio-104-dio-48e and gpio-pcie-idio-24
   - minor tweaks and fixes to gpio-xra1403, gpio-sim, gpio-tegra194,
     gpio-omap, gpio-aspeed, gpio-raspberrypi-exp
   - shrink code in gpio-ich and gpio-pxa
   - Kconfig tweak for gpio-pmic-eic-sprd"

* tag 'gpio-updates-for-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (99 commits)
  gpio: gpiolib: Simplify gpiochip_add_data_with_key() fwnode
  gpiolib: Add gpiochip_set_data() helper
  gpiolib: Move gpiochip_get_data() higher in the code
  gpiolib: Check array_info for NULL only once in gpiod_get_array()
  gpiolib: Replace open coded krealloc()
  gpiolib: acpi: Add a ignore wakeup quirk for Clevo NL5xNU
  gpiolib: acpi: Move ACPI device NULL check to acpi_get_driver_gpio_data()
  gpiolib: acpi: use the fwnode in acpi_gpiochip_find()
  gpio: mm-lantiq: Fix typo in the newly added header filename
  sh: mach-x3proto: Add missing #include <linux/gpio/driver.h>
  powerpc/40x: Add missing select OF_GPIO_MM_GPIOCHIP
  gpio: xlp: Convert to immutable irq_chip
  gpio: xilinx: Convert to immutable irq_chip
  gpio: xgs-iproc: Convert to immutable irq_chip
  gpio: visconti: Convert to immutable irq_chip
  gpio: tqmx86: Convert to immutable irq_chip
  gpio: thunderx: Convert to immutable irq_chip
  gpio: stmpe: Convert to immutable irq_chip
  gpio: siox: Convert to immutable irq_chip
  gpio: rda: Convert to immutable irq_chip
  ...
2023-04-25 17:18:18 -07:00
Patrik Dahlström 79d9622d62 iio: adc: palmas: remove adc_wakeupX_data
It does not seem to be used by anyone and later patches in this series
are made simpler by first removing this. There is now a lot of dead code
that cannot be reached, until later patches revive it. Arguably, this is
preferred over removing the code only to add it again.

Signed-off-by: Patrik Dahlström <risca@dalakolonin.se>
Link: https://lore.kernel.org/r/20230408114825.824505-4-risca@dalakolonin.se
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2023-04-13 11:37:21 +01:00
Benjamin Bara 13186dae18
regulator: da9063: add voltage monitoring registers
Add the definitions for the registers responsible for voltage
monitoring. Add a voltage monitor enable bitfield per regulator.

Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>
Link: https://lore.kernel.org/r/20230403-da9063-disable-unused-v3-1-cc4dc698864c@skidata.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-04-12 12:52:09 +01:00
Olivier Moysan d0a4564bd0 pwm: stm32: Enforce settings for PWM capture
The PWM capture assumes that the input selector is set to default
input and that the slave mode is disabled. Force reset state for
TISEL and SMCR registers to match this requirement.

Note that slave mode disabling is not a pre-requisite by itself
for capture mode, as hardware supports it for PWM capture.
However, the current implementation of the driver does not
allow slave mode for PWM capture. Setting slave mode for PWM
capture results in wrong capture values.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Acked-by: Lee Jones <lee@kernel.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
2023-04-06 16:35:01 +02:00
Arnd Bergmann a8e59744e1 gpiolib: split linux/gpio/driver.h out of linux/gpio.h
Almost all gpio drivers include linux/gpio/driver.h, and other
files should not rely on includes from this header.

Remove the indirect include from here and include the correct
headers directly from where they are used.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Lee Jones <lee@kernel.org>
2023-03-06 12:33:01 +02:00
Linus Torvalds 1ec35eadc3 We have one small patch to the clk core this time around. It fixes a corner
case with the CLK_OPS_PARENT_ENABLE flag combined with clk_core_is_enabled()
 where it hangs the system. We'll simply assume the clk is disabled if the
 parent is disabled and the flag is set. Trying to turn on the parent to check
 the enable state of the clk runs into system hangs at boot. We let this bake in
 -next for a couple weeks to make sure there aren't any more issues because the
 last attempt to fix this ran into hangs and had to be reverted.
 
 Note: There were some more patches to the core framework around sync_state and
 disabling unused clks, but I asked for that to be reverted from the qcom PR
 because it isn't ready and we're still discussing the best solution on the
 list.
 
 Outside of the core clk framework, we have the usual collection of clk driver
 updates and support for new SoCs (which seems to never stop). The dirstat is
 dominated by Qualcomm because they added support for quite a few SoCs this time
 around and also migrated quite a few of their drivers to clk_parent_data. The
 other big diff is in the Mediatek clk drivers that saw a significant rework
 this cycle to similarly modernize the code, and we'll see that work continue in
 the next cycle as well. Nothing really jumps out as scary here, except that the
 significant churn in parent data descriptions can have typos that go unnoticed.
 More details below.
 
 Core:
  - Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled()
 
 New Drivers:
  - Add a new clk-gpr-mux clock type and use it on i.MX6Q to add ENET ref
    clocks
  - Support for Mediatek MT7891 SoC clks
  - Support for many Qualcomm clk controllers:
    - QDU1000/QRU1000 global clock controller
    - SA8775P global clock controller
    - SM8550 TCSR and display clock controller
    - SM6350 clock controller
    - MSM8996 CBF and APCS clock controllers
 
 Updates:
  - Various cleanups and improvements to Mediatek clk drivers to reduce
    code size and modernize the drivers
  - Support for Versa 5P49V60 clks
  - Disable R-Car H3 ES1.*, as it was only available to an internal
    development group and needed a lot of quirks and workarounds
  - Add PWM, Compare-Match Timer (TIM), USB, SDHI, and eMMC clocks and
    resets on Renesas RZ/V2M
  - Add display clocks on Renesas R-Car V4H
  - Add Camera Receiving Unit (CRU) clocks and resets on Renesas RZ/G2L
  - Free the imx_uart_clocks even if imx_register_uart_clocks returns early
  - Get the stdout clocks count from device tree on i.MX
  - Drop the clock count argument from imx_register_uart_clocks()
  - Keep the uart clocks on i.MX93 for when earlycon is used
  - Fix SPDX comment in i.MX6SLL clocks bindings header
  - Drop some unnecessary spaces from i.MX8ULP clocks bindings header
  - Add imx_obtain_fixed_of_clock() for allowing to add a clock that is
    not configured via devicetree
  - Fix the ENET1 gate configuration for i.MX6UL according to the
    reference manual
  - Add ENET refclock mux support for i.MX6UL
  - Add support for USB host/device configuration on Renesas RZ/N1
  - Add PLL2 programming support, and CAN-FD clocks on Renesas R-Car V4H
  - Add D1 CAN bus gates and resets for Allwinner
  - Mark D1 CPUX clock as critical on Allwinner
  - Reuse D1 driver for Allwinner R528/T113
  - Cleanup sunxi-ng Kconfig
  - Fix sunxi-ng kernel-doc issues
  - Model Allwinner H3/H5 DRAM clock as fixed clock
  - Use .determine_rate() instead of .round_rate() for the dualdiv, mpll,
    sclk-div and cpu-dyn-div amlogic clock drivers
  - DDR clocks were marked as critical in the proper clock driver for each
    AT91 SoC such that drivers/memory/atmel-sdramc.c to be deleted
    in the next releases as it only does clock enablement
  - Patch to avoid compiling dt-compat.o for all AT91 SoCs as only some of
    them may use it
  - Support synchronous power_off requests in the qcom GDSC driver for proper
    GPU power collapse
  - Drop test clocks from various Qualcomm clk drivers
  - Update parent references to use clk_parent_data/clk_hw in various Qualcomm clk drivers
  - Fixes for the Qualcomm MSM8996 CPU clock controller
  - Transition Qualcomm MSM8974 GCC off the externally defined sleep_clk
  - Add GDSCs in the global clock controller for Qualcomm QCS404
  - The SDCC core clocks on Qualcomm SM6115 are moved to floor_ops
  - Programming of clk_dis_wait for GPU CX GDSC on Qualcomm SC7180 and SDM845 are
    moved to use the recently introduced properties in the GDSC struct
  - Qualcomm's RPMh clock driver gains SM8550 and SA8775P clocks, and the IPA clock
    is added on a variety of platforms
  - De-duplicate identical clks in Qualcomm SMD RPM clk driver
  - Add a few missing clocks across msm8998, msm8992, msm8916, qcs404 to
    Qualcomm SDM RPM clk driver
  - Various Qualcomm clk drivers use devm_pm_runtime_enable() to simplify
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEE9L57QeeUxqYDyoaDrQKIl8bklSUFAmP5L68RHHNib3lkQGtl
 cm5lbC5vcmcACgkQrQKIl8bklSXLxRAAx5C2PBxGnQS5Dqy7yGFBKhoyM6MnD131
 4wsWunTzw/fx3MWTRUBu1FYq7ZN38dmeUNeKVNO7QkfIzXe/Htxa5DJp8oJjeFkA
 WBlJr/S9pnCKJ1+jGgnEJ3AL8rtssc2nasS8Gj66eu3Zs3dA1MlUz1M0wqiGeD/Y
 2crg1nowHurxhsmdUM+6sBRZsCoUz1DxAynqOK25Ip08ygBGYRdkk3aCoyx1bICF
 02RwSTQP9pGykgkO7BMkr1pA000mlcawXflzfbY0bA57GKvITBaXh3PhVWwsAnqk
 utagT3G2/mQNBF+DVX4Xr5rRqYttDeATiS2D0B31x68Ovjw6kaA28QoY19oIjc1p
 D7CabcPnrdK6JFimJL/uEnjIpVnMW2kbTAkTdgGFNKqYUC1O+Mm5ZscKo8RUaiQ7
 8XAgJXnGxG7RlZDIMCj69xiZBR0I0wgyx6E7sqMK5j4/v9ezhUMemj4u/sNe3R1n
 ih43L2vXjftAhl7jlGQb6eFQjPU/n8kf1rte5miJxX2vFBgWqiCfKHnVSe8KSNU+
 gqhar55G9ACnYBjqApmySd/7IFBzmJSyWujXg+fwIu0ZI5ir+ZPr+rQ7RkAUqMij
 QCPvJa6XlRIyl6j54E5GaSFO3ZDc3wAZEs3I2N4yhYTDUGv342G3YdwNU+b0ioHB
 bDW5Gec9u2s=
 =Fle/
 -----END PGP SIGNATURE-----

Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux

Pull clk updates from Stephen Boyd:
 "We have one small patch to the clk core this time around. It fixes a
  corner case with the CLK_OPS_PARENT_ENABLE flag combined with
  clk_core_is_enabled() where it hangs the system. We'll simply assume
  the clk is disabled if the parent is disabled and the flag is set.
  Trying to turn on the parent to check the enable state of the clk runs
  into system hangs at boot. We let this bake in -next for a couple
  weeks to make sure there aren't any more issues because the last
  attempt to fix this ran into hangs and had to be reverted.

  Note: There were some more patches to the core framework around
  sync_state and disabling unused clks, but I asked for that to be
  reverted from the qcom PR because it isn't ready and we're still
  discussing the best solution on the list.

  Outside of the core clk framework, we have the usual collection of clk
  driver updates and support for new SoCs (which seems to never stop).
  The dirstat is dominated by Qualcomm because they added support for
  quite a few SoCs this time around and also migrated quite a few of
  their drivers to clk_parent_data. The other big diff is in the
  Mediatek clk drivers that saw a significant rework this cycle to
  similarly modernize the code, and we'll see that work continue in the
  next cycle as well. Nothing really jumps out as scary here, except
  that the significant churn in parent data descriptions can have typos
  that go unnoticed. More details below.

  Core:
   - Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled()

  New Drivers:
   - Add a new clk-gpr-mux clock type and use it on i.MX6Q to add ENET
     ref clocks
   - Support for Mediatek MT7891 SoC clks
   - Support for many Qualcomm clk controllers:
      - QDU1000/QRU1000 global clock controller
      - SA8775P global clock controller
      - SM8550 TCSR and display clock controller
      - SM6350 clock controller
      - MSM8996 CBF and APCS clock controllers

  Updates:
   - Various cleanups and improvements to Mediatek clk drivers to reduce
     code size and modernize the drivers
   - Support for Versa 5P49V60 clks
   - Disable R-Car H3 ES1.*, as it was only available to an internal
     development group and needed a lot of quirks and workarounds
   - Add PWM, Compare-Match Timer (TIM), USB, SDHI, and eMMC clocks and
     resets on Renesas RZ/V2M
   - Add display clocks on Renesas R-Car V4H
   - Add Camera Receiving Unit (CRU) clocks and resets on Renesas RZ/G2L
   - Free the imx_uart_clocks even if imx_register_uart_clocks returns
     early
   - Get the stdout clocks count from device tree on i.MX
   - Drop the clock count argument from imx_register_uart_clocks()
   - Keep the uart clocks on i.MX93 for when earlycon is used
   - Fix SPDX comment in i.MX6SLL clocks bindings header
   - Drop some unnecessary spaces from i.MX8ULP clocks bindings header
   - Add imx_obtain_fixed_of_clock() for allowing to add a clock that is
     not configured via devicetree
   - Fix the ENET1 gate configuration for i.MX6UL according to the
     reference manual
   - Add ENET refclock mux support for i.MX6UL
   - Add support for USB host/device configuration on Renesas RZ/N1
   - Add PLL2 programming support, and CAN-FD clocks on Renesas R-Car
     V4H
   - Add D1 CAN bus gates and resets for Allwinner
   - Mark D1 CPUX clock as critical on Allwinner
   - Reuse D1 driver for Allwinner R528/T113
   - Cleanup sunxi-ng Kconfig
   - Fix sunxi-ng kernel-doc issues
   - Model Allwinner H3/H5 DRAM clock as fixed clock
   - Use .determine_rate() instead of .round_rate() for the dualdiv,
     mpll, sclk-div and cpu-dyn-div amlogic clock drivers
   - DDR clocks were marked as critical in the proper clock driver for
     each AT91 SoC such that drivers/memory/atmel-sdramc.c to be deleted
     in the next releases as it only does clock enablement
   - Patch to avoid compiling dt-compat.o for all AT91 SoCs as only some
     of them may use it
   - Support synchronous power_off requests in the qcom GDSC driver for
     proper GPU power collapse
   - Drop test clocks from various Qualcomm clk drivers
   - Update parent references to use clk_parent_data/clk_hw in various
     Qualcomm clk drivers
   - Fixes for the Qualcomm MSM8996 CPU clock controller
   - Transition Qualcomm MSM8974 GCC off the externally defined
     sleep_clk
   - Add GDSCs in the global clock controller for Qualcomm QCS404
   - The SDCC core clocks on Qualcomm SM6115 are moved to floor_ops
   - Programming of clk_dis_wait for GPU CX GDSC on Qualcomm SC7180 and
     SDM845 are moved to use the recently introduced properties in the
     GDSC struct
   - Qualcomm's RPMh clock driver gains SM8550 and SA8775P clocks, and
     the IPA clock is added on a variety of platforms
   - De-duplicate identical clks in Qualcomm SMD RPM clk driver
   - Add a few missing clocks across msm8998, msm8992, msm8916, qcs404
     to Qualcomm SDM RPM clk driver
   - Various Qualcomm clk drivers use devm_pm_runtime_enable() to
     simplify"

* tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (228 commits)
  clk: qcom: apcs-msm8986: Include bitfield.h for FIELD_PREP
  clk: qcom: Revert sync_state based clk_disable_unused
  clk: imx: pll14xx: fix recalc_rate for negative kdiv
  clk: rs9: Drop unused pin_xin field
  MAINTAINERS: clk: imx: Add Peng Fan as reviewer
  clk: sprd: Add dependency for SPRD_UMS512_CLK
  clk: ralink: fix 'mt7621_gate_is_enabled()' function
  clk: mediatek: clk-mtk: Remove unneeded semicolon
  dt-bindings: clock: remove stih416 bindings
  dt-bindings: clock: add loongson-2 clock
  dt-bindings: clock: add loongson-2 clock include file
  clk: imx: fix compile testing imxrt1050
  clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled()
  clk: imx: set imx_clk_gpr_mux_ops storage-class-specifier to static
  clk: renesas: rcar-gen3: Disable R-Car H3 ES1.*
  dt-bindings: clock: Merge qcom,gpucc-sm8350 into qcom,gpucc.yaml
  clk: qcom: gpucc-sdm845: fix clk_dis_wait being programmed for CX GDSC
  clk: qcom: gpucc-sc7180: fix clk_dis_wait being programmed for CX GDSC
  dt-bindings: clock: qcom,sa8775p-gcc: add the power-domains property
  clk: qcom: cpu-8996: add missing cputype include
  ...
2023-02-25 15:16:23 -08:00
Linus Torvalds c2c23dc7d5 - Core Frameworks
- Change MFD support status from Supported to Maintained
 
  - New Drivers
    - Add support for the Intel Platform Management Component Interface (PMCI)
 
  - Remove Drivers
    - HTC PASIC3 LED/DS1WM
    - Toshiba T7L66XB, TC6387XB and TC6393XB TMIO
 
  - New Device Support
    - Add support for N6000 Flash to Intel M10 BMC PMCI
    - Add support for Lenovo Yoga Tab 3 to Intel CHTWC PMIC
 
  - New Functionality
    - Provide Reset support to Syscon
 
  - Fix-ups
    - Explicitly provide missing include files
    - Pass platform type data/info via the SPI/I2C/DT registration strategy
    - Lots of DT documentation / adaptions
    - Replace scnprintf() with preferred sysfs_emit()
    - Remove unused / superfluous code
    - Fix some trivial whitesspace / spelling / grammatical issues
    - Replace pm_power_off with new and improved register_sys_off_handler() API
 
  - Bug Fixes
    - Reintroduce RK808-clkout registration - fixing Wi-Fi and Bluetooth
    - Repair the order of AXPxxx IRQ PEK RISE/FALL definitions
    - Refuse to build CS5535 on unsupported UML architectures
    - Fix memory leaks in error return paths
    - Prevent refcount leaks in error return paths
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmP3KQ8ACgkQUa+KL4f8
 d2FAFw//deQpWVTX8CBdgHtCTxkLymussYgvnlJwJhoD8RYpTyFme9drVSBX9Msi
 C3rRX3RQCu114xUVMt5JIVTZbbbx2zjDI9HGSmh3lOIW0vh9/oW6/bUO/PFw6/C3
 v4AkzMYIwE9O4g9DbM9WWR/uickYyKobS8VXMupyWYnVbF361UOCFChCMrm+3Kl1
 S+grj1/fKxiCJxF/L+Iij06PQtCGGZBxN2JNqsTHj7IyUjA2JZyvXvV3pJ/MtIQv
 w+hb+xYK13uCG4JUI6xOHkJU7/gNCwpsz1TJoR7CuXl6JBIP/oVIw9fJ4N1eZ1Zr
 ioBEBIrEmKF1Hihd8iP5prE1BV5WvE6s9hqTdqn3qJPaH9+Rp8sExuDcq6gzE7Lc
 c5eVhA0uSXQM62pz4rqwkfzPX8BFMvZ1Ii9ukyWaAb1Lyz2f5tFu5E2gd6vjXVVP
 yId3H43eQVrutlZAbP+txhN7VDSf/OunUrOEDw9VbLe2sB/rBta2De0tFfpE5lAg
 McOfyNvclqwTXuakNB0sg2Sg3DhxMTKQhnQQAj7E/DmcYVhQTFQPVj69BtERIldf
 9VHsAg3Kp93A/w5/J/3HOqMexHWpZ6eiW05Xu1zwGtWhx70c1YWMmMhMJk1zf/T+
 G8Drk+fuhsycsGu/7MkY+NuqIqIM3JVb4Hqa/HYN+L/iPJXLAxI=
 =f0fr
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "Core Framework:
   - Change MFD support status from Supported to Maintained

  New Drivers:
   - Add support for the Intel Platform Management Component Interface
     (PMCI)

  Removed Drivers:
   - HTC PASIC3 LED/DS1WM
   - Toshiba T7L66XB, TC6387XB and TC6393XB TMIO

  New Device Support:
   - Add support for N6000 Flash to Intel M10 BMC PMCI
   - Add support for Lenovo Yoga Tab 3 to Intel CHTWC PMIC

  New Functionality:
   - Provide Reset support to Syscon

  Fix-ups:
   - Explicitly provide missing include files
   - Pass platform type data/info via the SPI/I2C/DT registration
     strategy
   - Lots of DT documentation / adaptions
   - Replace scnprintf() with preferred sysfs_emit()
   - Remove unused / superfluous code
   - Fix some trivial whitesspace / spelling / grammatical issues
   - Replace pm_power_off with new and improved
     register_sys_off_handler() API

  Bug Fixes:
   - Reintroduce RK808-clkout registration - fixing Wi-Fi and Bluetooth
   - Repair the order of AXPxxx IRQ PEK RISE/FALL definitions
   - Refuse to build CS5535 on unsupported UML architectures
   - Fix memory leaks in error return paths
   - Prevent refcount leaks in error return paths"

* tag 'mfd-next-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (40 commits)
  dt-bindings: mfd: qcom,tcsr: Add compatible for IPQ5332
  dt-bindings: mfd: Add NXP BBNSM
  mfd: ntxec: Add version number for EC in Tolino Vision
  dt-bindings: mfd: syscon: Add mt8365-syscfg
  mfd: Remove toshiba tmio drivers
  mfd: arizona: Use pm_runtime_resume_and_get() to prevent refcnt leak
  mfd: syscon: Allow reset control for syscon devices
  dt-bindings: mfd/syscon: Add resets property
  dt-bindings: mfd: syscon: Add amd,pensando-elba-syscon compatible
  dt-bindings: mfd: qcom,tcsr: Add compatible for MSM8226
  mfd: simple-mfd-i2c: Fix incoherent comment regarding DT registration
  mfd: axp20x: Switch to the sys-off handler API
  mfd: core: Spelling s/compement/complement/
  mfd: max8925: Remove the unused function irq_to_max8925()
  mfd: qcom-pm8xxx: Remove set but unused variable 'rev'
  dt-bindings: mfd: syscon: Document GXP register compatible
  mfd: twl4030-power: Drop empty platform remove function
  mfd: twl: Fix TWL6032 phy vbus detection
  mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read()
  MAINTAINERS: Move MFD from a Supported to Maintaied state
  ...
2023-02-23 15:03:05 -08:00
Andreas Kemnade 8a15b4daed mfd: ntxec: Add version number for EC in Tolino Vision
The EC firmware has a different version number than anything
defined until now.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230127165828.3256170-1-andreas@kemnade.info
2023-02-22 11:42:29 +00:00
Arnd Bergmann ca78476e48 mfd: Remove toshiba tmio drivers
Four separate mfd drivers are in the "tmio" family, and all of
them were used in now-removed PXA machines (eseries, tosa, and
hx4700), so the mfd drivers and all its children can be removed
as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230105134622.254560-19-arnd@kernel.org
2023-02-22 11:42:29 +00:00
Geert Uytterhoeven 88a32c2c5e mfd: core: Spelling s/compement/complement/
Fix a misspelling of "complement".

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/aa7abd7103a0e4be954ea63de78f12e8251b2964.1673271092.git.geert+renesas@glider.be
2023-02-22 08:25:52 +00:00
Andreas Kemnade ccc91b3ed3 mfd: twl: Fix TWL6032 phy vbus detection
TWL6032 has a few charging registers prepended before the charging
registers the TWL6030 has. To be able to use common register defines
declare the additional registers as additional module.
At the moment this affects the access to CHARGERUSB_CTRL1 in
phy-twl6030-usb.  Without this patch, it is accessing the wrong register
on TWL6032.
The consequence is that presence of Vbus is not reported.

Cc: Bin Liu <b-liu@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221208215723.217557-1-andreas@kemnade.info
2023-02-22 08:25:51 +00:00
Aren Moynihan 8781ba7f45 mfd: axp20x: Fix order of pek rise and fall events
The power button can get "stuck" if the rising edge and falling edge irq
are read in the same pass. This can often be triggered when resuming
from suspend if the power button is released before the kernel handles
the interrupt.

Swapping the order of the rise and fall events makes sure that the press
event is handled first, which prevents this situation.

Signed-off-by: Aren Moynihan <aren@peacevolution.org>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Tested-by: Samuel Holland <samuel@sholland.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221208220225.635414-1-aren@peacevolution.org
2023-02-22 08:25:51 +00:00
Lee Jones 28e1958009 Immutable branch between MFD, Extcon and I2C due for the v6.3 merge window
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmPeWnwACgkQUa+KL4f8
 d2HgAxAAqqeW0yFhG7LXxcySFplGOX5LV0DTz5HrASwdk6yC1e+PUSjbVxaPgbbT
 Vzz/Efw3VbZvlDEN1EGAu+V4NTmKpscvAFk4n2bNxcTVa8MtGUpZchLaPCbU1IQG
 LBhIbL1E++L3qqavlOzrGpie8fRt9aPz1hqOXblSmLNEMq7hbeA2ebFa72Ofy7f9
 lkbGgv32/l9D7IRU/tEGPXvrw3J1V70YaU+wlmLR9YXlxIoG+VDrvi45Bvv1U7mU
 UAkw3jxxhSSFLATvw0VcBHUZQ+XKY7Ymiu5pA99psfA7jxb5PLeDcSMwyCyI6eHj
 9Uy/uhrlwtvR1zXHbWAY7MhS6ickEnplRL87xo5mNmcxl1lMY/iVLC5JVa8Os9mj
 e+NBdWzhzgM84QJsZBNSe6wuWKVrsvDqwA/D3lEoAHeaaKIBkLpSi+NS7rfzBb76
 YdhujAh5cuXgl2FNjw4tNv1XIWJ6aDFhE9CvXTTAiOngmqgy6ZRHK5Ceo4VhCaBD
 Hsa1R0glmfU3H7tEh7Y/VKDxLDaKTBtgeCF+mXFoKUU89mv6ypx/H5e2WR4kfdvn
 5zKrbecZeaKvVphzkJxE2DO5yRIEQ1yLKDEMfMPNTV5ZQOYoGs/Cqli38L2p1Zk4
 h0EDL3HIAUF4+Nb/qQtmDXeHpetRmwOhEVX4LMHvlRhLwBEYUBk=
 =Z4m+
 -----END PGP SIGNATURE-----
mergetag object acf63c458b
 type commit
 tag ib-mfd-fpga-hwmon-v6.3-1
 tagger Lee Jones <lee@kernel.org> 1675066458 +0000
 
 Immutable branch between MFD, FPGA and HWMON due for the v6.3 merge window
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmPXfGkACgkQUa+KL4f8
 d2G0VA//Vb5S4oYYQ4e24ui+U86EFUmaGZVb4Isl36y+wG8/usguA3Joryw+JlzB
 lDWaOD8XzxKA74XHM9Gj1RfLO60g5tEvbfClXJhEvxxCYKhElgCPNqpp9cUa+Uws
 lITFMjTfoUWMPyiiWIqw0F7x2Li4OQ4+EjScXDLpxjx2RzYtLu4mOo5cJqnBQVOs
 p+x5asFGv0u7dyFJr/vZOCR6bFb8SGlqNs46iEXB29H1hF3Rm5ag0nH+BTY8WG3k
 aMtEo72UtVGXGuK6pClzpUgbcVAd+KRNouFS6ZXMXDLpMWstFCetHSoh/XJ+sXMB
 Tiv6yG9t1QUcS0H/arWpFTce7Bp9aBcHDfeS++a3m9+gRYUtmpLcasaiR7udUxee
 Q7LT8CUGJ1KqzyGg9k76vaPaAKyvpPeQY8ozVrmmhi9Ms1d6+XhPmy1uM5oAwsTP
 BvO2SRwvxPvlAgCxbtYXxx+O0rgbMvniS1F9JoGJ09nEiChKSgMvw8yZZLkeh8Sy
 qCu4IRno0Ns77PJ6r0pN/AFzXVvx5BFBh2YUAOgpUHfy8Bq03vxI4/6deOkps3p0
 AMQPQGwh4qGvJu7WxXQ4Acu8W1h4piSpqkxOdhlElNwK6VLXAP/ffyVsV4tm7iqn
 EJzM7Kq8OH6rzs9nl/bueB0E5ZSn6gOHhXrojL+znno22EXhL/o=
 =JbTj
 -----END PGP SIGNATURE-----

Merge tags 'ib-mfd-extcon-i2c-v6.3' and 'ib-mfd-fpga-hwmon-v6.3-1' into ibs-for-mfd-merged

Immutable branch between MFD, Extcon and I2C due for the v6.3 merge window

Immutable branch between MFD, FPGA and HWMON due for the v6.3 merge window
2023-02-22 08:25:03 +00:00
Hans de Goede 8d9ef69487 mfd: intel_soc_pmic_chtwc: Add Lenovo Yoga Tab 3 X90F to intel_cht_wc_models
The drivers for various CHT Whiskey Cove PMIC child-devices need to know
the model, since they have model specific behavior. The DMI match table
for this is shared between the child-device-drivers inside the MFD driver.

Add the Lenovo Yoga Tab 3 X90F, which is a previously unknown tablet
model with a CHT Whiskey Cove PMIC, to the intel_cht_wc_models enum and
to the DMI match table.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230126153823.22146-2-hdegoede@redhat.com
2023-02-04 13:03:27 +00:00
Arnd Bergmann 61d9420a21 mfd: remove htc-pasic3 driver
The htc-pasic3 MFD device was only used in the PXA magician
machine that is now removed, so this can be recycled as well.

Cc: Lee Jones <lee@kernel.org>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-01 17:29:30 +01:00
Arnd Bergmann 8971bb812e mfd: remove toshiba tmio drivers
Four separate mfd drivers are in the "tmio" family, and all of
them were used in now-removed PXA machines (eseries, tosa, and
hx4700), so the mfd drivers and all its children can be removed
as well.

Cc: Lee Jones <lee@kernel.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mmc@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-02-01 17:23:38 +01:00
Oleksij Rempel 4e197ee880 clk: imx6ul: add ethernet refclock mux support
Add ethernet refclock mux support and set it to internal clock by
default. This configuration will not affect existing boards.

clock tree before this patch:
fec1 <- enet1_ref_125m (gate) <- enet1_ref (divider) <-,
                                                       |- pll6_enet
fec2 <- enet2_ref_125m (gate) <- enet2_ref (divider) <-´

after this patch:
fec1 <- enet1_ref_sel(mux) <- enet1_ref_125m (gate) <- ...
               `--<> enet1_ref_pad                      |- pll6_enet
fec2 <- enet2_ref_sel(mux) <- enet2_ref_125m (gate) <- ...
               `--<> enet2_ref_pad

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20230131084642.709385-17-o.rempel@pengutronix.de
2023-01-31 14:45:17 +02:00
Ilpo Järvinen acf63c458b fpga: m10bmc-sec: Add support for N6000
Add support for PMCI-based flash access path and N6000 sec update
support. Access to flash staging area is different for N6000 from that
of the SPI interfaced counterparts.

Introduce intel_m10bmc_flash_bulk_ops to allow interface specific
differentiations for the flash access path for sec update and make
m10bmc_sec_read/write() in sec update driver to use the new operations.
The .flash_mutex serializes read/read. Flash update (erase+write) must
use ->lock/unlock_write() to prevent reads during update (reads would
timeout on setting flash MUX as BMC will prevent it).

Create a type specific RSU status reg handler for N6000 because the
field has moved from doorbell to auth result register.

If a failure is detected while altering the flash MUX, it seems safer
to try to set it back and doesn't seem harmful. Likely there are enough
troubles in that case anyway so setting it back fails too (which is
harmless sans the small extra delay) or just confirms that the value
wasn't changed.

Co-developed-by: Tianfei zhang <tianfei.zhang@intel.com>
Signed-off-by: Tianfei zhang <tianfei.zhang@intel.com>
Co-developed-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-12-ilpo.jarvinen@linux.intel.com
2023-01-30 08:14:02 +00:00
Ilpo Järvinen 869b9eddf0 mfd: intel-m10-bmc: Add PMCI driver
Add the mfd driver for the Platform Management Component Interface
(PMCI) based interface of Intel MAX10 BMC controller.

PMCI is a software-visible interface, connected to card BMC which
provided the basic functionality of read/write BMC register. The access
to the register is done indirectly via a hardware controller/bridge
that handles read/write/clear commands and acknowledgments for the
commands.

Previously, intel-m10-bmc provided sysfs under
/sys/bus/spi/devices/... which is generalized in this change because
not all MAX10 BMC appear under SPI anymore.

Co-developed-by: Tianfei zhang <tianfei.zhang@intel.com>
Signed-off-by: Tianfei zhang <tianfei.zhang@intel.com>
Co-developed-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Co-developed-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Signed-off-by: Matthew Gerlach <matthew.gerlach@linux.intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-11-ilpo.jarvinen@linux.intel.com
2023-01-27 10:47:11 +00:00
Ilpo Järvinen 001a734a55 fpga: m10bmc-sec: Make rsu status type specific
The rsu status field moves from the doorbell register to the auth
result register in the PMCI implementation of the MAX10 BMC. In order
to prepare for that, refactor the sec update driver code to have a type
specific ops that provides ->rsu_status().

Co-developed-by: Tianfei zhang <tianfei.zhang@intel.com>
Signed-off-by: Tianfei zhang <tianfei.zhang@intel.com>
Co-developed-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Acked-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-10-ilpo.jarvinen@linux.intel.com
2023-01-27 10:42:29 +00:00
Ilpo Järvinen bcababfc60 mfd: intel-m10-bmc: Prefix register defines with M10BMC_N3000
Prefix the M10BMC defines register defines with M10BMC_N3000 to make it
more obvious these are related to some board type. All current
non-N3000 board types have the same layout so they'll be reused. The
less generic makes it more obvious they're not meant for the
generic/interface agnostic code.

Reviewed-by: Russ Weight <russell.h.weight@intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-8-ilpo.jarvinen@linux.intel.com
2023-01-27 10:37:51 +00:00
Ilpo Järvinen 6052a005ca mfd: intel-m10-bmc: Support multiple CSR register layouts
There are different addresses for the MAX10 CSR registers. Introducing
a new data structure m10bmc_csr_map for the register definition of
MAX10 CSR.

Provide the csr_map for SPI.

Co-developed-by: Tianfei zhang <tianfei.zhang@intel.com>
Signed-off-by: Tianfei zhang <tianfei.zhang@intel.com>
Reviewed-by: Russ Weight <russell.h.weight@intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-6-ilpo.jarvinen@linux.intel.com
2023-01-27 10:36:29 +00:00
Ilpo Järvinen 603aed8ffd mfd: intel-m10-bmc: Split into core and spi specific parts
Split the common code from intel-m10-bmc driver into intel-m10-bmc-core
and move the SPI bus parts into an interface specific file.

intel-m10-bmc-core becomes the core MFD functions which can support
multiple bus interface like SPI bus.

Co-developed-by: Tianfei zhang <tianfei.zhang@intel.com>
Signed-off-by: Tianfei zhang <tianfei.zhang@intel.com>
Reviewed-by: Russ Weight <russell.h.weight@intel.com>
Acked-by: Guenter Roeck <linux@roeck-us.net> # hwmon
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-5-ilpo.jarvinen@linux.intel.com
2023-01-27 10:35:00 +00:00
Ilpo Järvinen 16e5d95a5c mfd: intel-m10-bmc: Create m10bmc_platform_info for type specific info
BMC type specific info is currently set by a switch/case block. The
size of this info is expected to grow as more dev types and features
are added which would have made the switch block bloaty.

Store type specific info into struct and place them into .driver_data
instead because it makes things a bit cleaner.

The m10bmc_type enum can be dropped as the differentiation is now
fully handled by the platform info.

The info member of struct intel_m10bmc that is added here is not used
yet in this change but its addition logically still belongs to this
change. The CSR map change that comes after this change needs to have
the info member.

Reviewed-by: Russ Weight <russell.h.weight@intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-3-ilpo.jarvinen@linux.intel.com
2023-01-27 10:28:15 +00:00
Ilpo Järvinen 206351c5c2 mfd: intel-m10-bmc: Add missing includes to header
linux/mfd/intel-m10-bmc.h is using:
	- pr_err(), thus include also linux/dev_printk.h
	- FIELD_GET(), this include also linux/bitfield.h
	- GENMASK(), thus include also linux/bits.h

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Russ Weight <russell.h.weight@intel.com>
Reviewed-by: Xu Yilun <yilun.xu@intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230116100845.6153-2-ilpo.jarvinen@linux.intel.com
2023-01-27 10:27:40 +00:00
Linus Torvalds 7406fd75a9 - New Drivers
- Add support for Ampere Computing SMpro
    - Add support for TI TPS65219 PMIC
 
  - New Functionality
    - Add support for multiple devices of the same type; rk808
 
  - Fix-ups
    - Convert a bunch of I2C class drivers over to .probe_new()
    - Remove superfluous includes; mc13xxx-*, palmas, timberdale
    - Use correct includes for GPIO handling; madera-core
    - Convert to GPIOD; twl6040
    - Remove unused platform data handling; twl6040
    - Device Tree changes; many
    - Remove unused drivers; dm355evm_msp, davinci_voicecodec, htc-i2cpld
    - Add support for modules; palmas
    - Enable COMPILE_TEST support; intel_soc_pmic*
    - Trivial: spelling / whitespace fixes; mc13xxx-spi
    - Replace old PM helpers with new ones; many
    - Convert deprecated mask_invert usage to unmask_base; many
    - Use devm_*() calls; qcom_rpm
    - MAINTAINER fix-ups
    - Make use of improved / replaced APIs; palmas, fsl-imx25-tsadc,
                                            stm32-lptimer, qcom_rpm, rohm-*
 
  - Bug Fixes
    - Add bounds / error checking; mt6360-core
    - No sleeping inside critical sections; axp20x
    - Fix missing dependencies; ROHM_BD957XMUF
    - Repair error paths; qcom-pm8008
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmOhmWgACgkQUa+KL4f8
 d2GEMA/+LQ+1Iv/MS8xh9a5SNs3lUJcHmNe8j1OhdD62usl1gQa9HegyL+h60Ajm
 r+MAxO3s0iTvPJFi9+i9S/BdO0XtdF1+0eIFm3Qih4A8NUDeK4wnr1J+5fswYvPG
 5Nvut/sqIQhCoT64T7009pwdRx8S5b1Von7+hGfDoC3UN0cGqW8+/3K0lEE4I1FY
 RaDKwS4Wvs3zZdfs/EQ0ILqTJKp0Mw3qKEbS9rB2XaLwa/eteZAeZBuypJDH9XLY
 GkJDeX51jLynjA7mp10p7bf1v6/p8JXcBUaz/vvPwYIM2oV46PHw9dbtzuPzz9iD
 O12reYGhssuVRTN8fCm+T82Jo99TiWrhagJG3gTqtrFQrs19w341Vetb7wDn14+z
 rL88pCo7xHLYwPGKXfup2GaGVt5GP6zEr6REnelw9yGmuxbAWajwWK2x64TAReGV
 8rOUt1VQyaY874dQ0iulrs+bKwaaPnpDgEzUeB6b4LG6zYoupQFD1+dfIzRq8k42
 wnAg5QdzcWFWzBOH0neUkyq7iZvLL3S5pLRWTENV8rLvEiNIPzWAMPHGFeYO8xm2
 lx+6B5XVfGd3oMze8mFwbrkLlpzbRS1j8bIV6kwlbcw44mw0w/EKtNW8Qlxw8HWA
 lvR9M/+NzniaCM8yJVZcB97k5r5ukZ6rSfQWCm9htIzdvLW09iM=
 =HT19
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Drivers:
   - Add support for Ampere Computing SMpro
   - Add support for TI TPS65219 PMIC

  New Functionality:
   - Add support for multiple devices of the same type; rk808

  Fix-ups:
   - Convert a bunch of I2C class drivers over to .probe_new()
   - Remove superfluous includes; mc13xxx-*, palmas, timberdale
   - Use correct includes for GPIO handling; madera-core
   - Convert to GPIOD; twl6040
   - Remove unused platform data handling; twl6040
   - Device Tree changes; many
   - Remove unused drivers; dm355evm_msp, davinci_voicecodec, htc-i2cpld
   - Add support for modules; palmas
   - Enable COMPILE_TEST support; intel_soc_pmic*
   - Trivial: spelling / whitespace fixes; mc13xxx-spi
   - Replace old PM helpers with new ones; many
   - Convert deprecated mask_invert usage to unmask_base; many
   - Use devm_*() calls; qcom_rpm
   - MAINTAINER fix-ups
   - Make use of improved / replaced APIs; palmas, fsl-imx25-tsadc,
     stm32-lptimer, qcom_rpm, rohm-*

  Bug Fixes:
   - Add bounds / error checking; mt6360-core
   - No sleeping inside critical sections; axp20x
   - Fix missing dependencies; ROHM_BD957XMUF
   - Repair error paths; qcom-pm8008"

* tag 'mfd-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (161 commits)
  dt-bindings: mfd: da9062: Correct file name for watchdog
  mfd: pm8008: Fix return value check in pm8008_probe()
  mfd: rohm: Use dev_err_probe()
  mfd: Drop obsolete dependencies on COMPILE_TEST
  dt-bindings: mfd: da9062: Move IRQ to optional properties
  mfd: qcom_rpm: Use devm_of_platform_populate() to simplify code
  mfd: qcom_rpm: Fix an error handling path in qcom_rpm_probe()
  mfd: stm32-lptimer: Use devm_platform_get_and_ioremap_resource()
  mfd: rohm-bd9576: Convert to i2c's .probe_new()
  mfd: fsl-imx25-tsadc: Use devm_platform_get_and_ioremap_resource()
  dt-bindings: Fix maintainer email for a few ROHM ICs
  mfd: palmas: Use device_get_match_data() to simplify the code
  Input: Add tps65219 interrupt driven powerbutton
  mfd: tps65219: Add driver for TI TPS65219 PMIC
  mfd: bd957x: Fix Kconfig dependency on REGMAP_IRQ
  mfd: wcd934x: Convert irq chip to config regs
  mfd: tps65090: Replace irqchip mask_invert with unmask_base
  mfd: sun4i-gpadc: Replace irqchip mask_invert with unmask_base
  mfd: stpmic1: Fix swapped mask/unmask in irq chip
  mfd: sprd-sc27xx-spi: Replace irqchip mask_invert with unmask_base
  ...
2022-12-21 09:19:24 -08:00
Linus Torvalds b611996ef2 linux-watchdog 6.2-rc1 tag
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iEYEABECAAYFAmOcmvEACgkQ+iyteGJfRso1OwCfWAZIdbdWdeEVq33zAT4/TZKE
 foYAn0ebKrOX26HEAmGgZy4Ze2pdFxVo
 =toMy
 -----END PGP SIGNATURE-----

Merge tag 'linux-watchdog-6.2-rc1' of git://www.linux-watchdog.org/linux-watchdog

Pull watchdog updates from Wim Van Sebroeck:

 - Add Advantech EC watchdog driver

 - Add support for MT6795 Helio X10 watchdog and toprgu

 - Add support for MT8188 watchdog device

 - Remove #ifdef guards for PM related functions

 - Other fixes and improvements

* tag 'linux-watchdog-6.2-rc1' of git://www.linux-watchdog.org/linux-watchdog:
  watchdog: aspeed: Enable pre-timeout interrupt
  watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running
  watchdog: rn5t618: add support for read out bootstatus
  watchdog: kempld: Remove #ifdef guards for PM related functions
  watchdog: omap: Remove #ifdef guards for PM related functions
  watchdog: twl4030: Remove #ifdef guards for PM related functions
  watchdog: at91rm9200: Remove #ifdef guards for PM related functions
  watchdog: Add Advantech EC watchdog driver
  dt-bindings: watchdog: mediatek,mtk-wdt: Add compatible for MT8173
  dt-bindings: watchdog: mediatek,mtk-wdt: Add compatible for MT6795
  dt-bindings: watchdog: mediatek: Convert mtk-wdt to json-schema
  watchdog: mediatek: mt8188: add wdt support
  dt-bindings: reset: mt8188: add toprgu reset-controller header file
  dt-bindings: watchdog: Add compatible for MediaTek MT8188
  watchdog: mtk_wdt: Add support for MT6795 Helio X10 watchdog and toprgu
2022-12-17 08:34:01 -06:00
Linus Torvalds 71946a25f3 MMC core:
- A few minor improvements and cleanups
 
 MMC host:
  - Remove some redundant calls to local_irq_{save,restore}()
  - Replace kmap_atomic() with kmap_local_page()
  - Take return values from mmc_add_host() into account
  - dw_mmc-pltfm: Add support to configure clk-phase for socfpga
  - hsq: Minimize latency by using a fifo to dispatch requests
  - litex_mmc: Fixup corner case for polling mode
  - mtk-sd: Add inline crypto engine clock control
  - mtk-sd: Add support for the mediatek MT7986 variant
  - renesas_sdhi: Improve reset from HS400 mode
  - renesas_sdhi: Take DMA end interrupts into account
  - sdhci: Avoid unnecessary update of clock
  - sdhci: Fix an SD tuning issue
  - sdhci-brcmst: Add Kamal Dasu as maintainer for the Broadcom driver
  - sdhci-esdhc-imx: Improve tuning logic
  - sdhci-esdhc-imx: Improve support for the imxrt1050 variant
  - sdhci_f_sdh30: Add support for non-removable media
  - sdhci_f_sdh30: Add support for the Socionext F_SDH30_E51 variant
  - sdhci_f_sdh30: Add reset control support
  - sdhci-msm: Add support for the Qcom SM8550/SM8350/SM6375 variants
  - sdhci-msm: Add support for the Qcom MSM8976 variant
  - sdhci-of-arasan: Add support for dynamic configuration
  - sdhci-of-esdhc: Limit the clock frequency to confirm to spec
  - sdhci-pci: Enable asynchronous probe
  - sdhci-sprd: Improve card detection
  - sdhci-tegra: Improve reset support
  - sdhci-tegra: Add support to program MC stream ID
  - sunplus-mmc: Add new mmc driver for the Sunplus SP7021 controller
  - vub300: Fix warning splat for SDIO irq
 
 MEMSTICK core:
  - memstick: A few minor improvements and cleanups
 
 CLK/IOMMU:
  - clk: socfpga: Drop redundant support for clk-phase for the SD/MMC clk
  - iommu: Add tegra specific helper to get stream_id
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmOYUeUXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCnUmA//cdC4gF86ROp+d2lKZVHn9FVK
 jgF0NJ9DZiDOZm7qta7rqmAGo/Xq9sacHq65qGjXMeei/MNrwu7xW/U3Ihk0pK9z
 Gnphck3JgbkLJ6ijxsuBqNavsYjXJVqys3f2qThXYh+xXyLAfIvOtPj9984EfdvR
 AtZuTwpvebNxB6Qu6SFIYZ4Yt4ZaTN/AuCRyjS9HHNLugjbgditZQcw6wjqlTRb7
 fhSNwK3srWGzdthtiiXBoFSjjpd7AESGPjqaGDJNgIDYxFXOUX2vx2eb15s1beVN
 i7pN8D83StNjF+PF551trUyNCaW4Ukbl7hHTqC9sFvjgtRFVB97oSoxm7F03fsX3
 bM6USXtG1xOGkPG9Dqneuhee157UCgNIWs46H/CuZYmGgBN6I7l0Jt3+Lru5IwwQ
 NstKcLS6xaWyYOEAoAR5yFDJXBagxEXNArtHkzoLabvcsk0XPdGAMd87RUuyGgXt
 Vpd4VjH1VSDcaG7DF3+XR3uTy5mUAOrehBrVr1eKH7gYRpr4TLlYgE/a3AkSs/m+
 3ftM3o6hraHKqwY32vDG9vSsuLrGdh286rEypmc1gmejiNTz+SFSIex1YoefWtx2
 O0u+7plcauuUX+7EQ79RzZkB/FS40uL3wxAii7Ta+on4P7Cwuh6jo1Hakvy5JjtW
 5733RKV5nkKUkKMOwsU=
 =nstz
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC and MEMSTICK updates from Ulf Hansson:
 "MMC core:
   - A few minor improvements and cleanups

  MMC host:
   - Remove some redundant calls to local_irq_{save,restore}()
   - Replace kmap_atomic() with kmap_local_page()
   - Take return values from mmc_add_host() into account
   - dw_mmc-pltfm: Add support to configure clk-phase for socfpga
   - hsq: Minimize latency by using a fifo to dispatch requests
   - litex_mmc: Fixup corner case for polling mode
   - mtk-sd: Add inline crypto engine clock control
   - mtk-sd: Add support for the mediatek MT7986 variant
   - renesas_sdhi: Improve reset from HS400 mode
   - renesas_sdhi: Take DMA end interrupts into account
   - sdhci: Avoid unnecessary update of clock
   - sdhci: Fix an SD tuning issue
   - sdhci-brcmst: Add Kamal Dasu as maintainer for the Broadcom driver
   - sdhci-esdhc-imx: Improve tuning logic
   - sdhci-esdhc-imx: Improve support for the imxrt1050 variant
   - sdhci_f_sdh30: Add support for non-removable media
   - sdhci_f_sdh30: Add support for the Socionext F_SDH30_E51 variant
   - sdhci_f_sdh30: Add reset control support
   - sdhci-msm: Add support for the Qcom SM8550/SM8350/SM6375 variants
   - sdhci-msm: Add support for the Qcom MSM8976 variant
   - sdhci-of-arasan: Add support for dynamic configuration
   - sdhci-of-esdhc: Limit the clock frequency to confirm to spec
   - sdhci-pci: Enable asynchronous probe
   - sdhci-sprd: Improve card detection
   - sdhci-tegra: Improve reset support
   - sdhci-tegra: Add support to program MC stream ID
   - sunplus-mmc: Add new mmc driver for the Sunplus SP7021 controller
   - vub300: Fix warning splat for SDIO irq

  MEMSTICK core:
   - memstick: A few minor improvements and cleanups

  CLK/IOMMU:
   - clk: socfpga: Drop redundant support for clk-phase for the SD/MMC clk
   - iommu: Add tegra specific helper to get stream_id"

* tag 'mmc-v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (108 commits)
  mmc: sdhci-sprd: Disable CLK_AUTO when the clock is less than 400K
  mmc: sdhci-of-esdhc: Modify mismatched function name
  memstick/mspro_block: Convert to use sysfs_emit()/sysfs_emit_at() APIs
  mmc: sdhci-tegra: Issue CMD and DAT resets together
  mmc: sdhci-tegra: Add support to program MC stream ID
  mmc: sdhci-tegra: Separate Tegra194 and Tegra234 SoC data
  mmc: sdhci-tegra: Sort includes alphabetically
  iommu/tegra: Add tegra_dev_iommu_get_stream_id() helper
  iommu: Add note about struct iommu_fwspec usage
  mmc: sdhci-brcmstb: Resolve "unused" warnings with CONFIG_OF=n
  dt-bindings: mmc: sdhci-msm: allow dma-coherent
  dt-bindings: mmc: sdhci-msm: drop properties mentioned in common MMC
  dt-bindings: mmc: sdhci-msm: cleanup style
  dt-bindings: mmc: sdhci-am654: cleanup style
  dt-bindings: mmc: sdhci: document sdhci-caps and sdhci-caps-mask
  mmc: vub300: fix warning - do not call blocking ops when !TASK_RUNNING
  MAINTAINERS: Update maintainer for SDHCI Broadcom BRCMSTB driver
  mmc: sdhci-of-esdhc: limit the SDHC clock frequency
  mmc: sdhci: Remove unneeded semicolon
  mmc: core: Normalize the error handling branch in sd_read_ext_regs()
  ...
2022-12-13 13:41:26 -08:00
Jerome Neanne 74c17a0a49 mfd: tps65219: Add driver for TI TPS65219 PMIC
The TPS65219 is a power management IC PMIC designed to supply a wide
range of SoCs in both portable and stationary applications. Any SoC can
control TPS65219 over a standard I2C interface.

It contains the following components:
- Regulators.
- Over Temperature warning and Shut down.
- GPIOs
- Multi Function Pins (MFP)
- power-button

This patch adds support for tps65219 PMIC. At this time only
the functionalities listed below are made available:

- Regulators probe and functionalities
- warm and cold reset support
- SW shutdown support
- Regulator warnings via IRQs
- Power-button via IRQ

Signed-off-by: Jerome Neanne <jneanne@baylibre.com>
Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221104152311.1098603-5-jneanne@baylibre.com
2022-12-07 13:28:15 +00:00
Paul Cercueil 4d8a6ae23a mfd: stmfx: Remove #ifdef guards for PM related functions
Use the new DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros
to handle the .suspend/.resume callbacks.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07 13:28:13 +00:00
Paul Cercueil 245cb473e5 mfd: pcf50633: Remove #ifdef guards for PM related functions
Use the new EXPORT_GPL_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() macros
to handle the .suspend/.resume callbacks.

These macros allow the suspend and resume functions to be automatically
dropped by the compiler when CONFIG_SUSPEND is disabled, without having
to use #ifdef guards.

This has the advantage of always compiling these functions in,
independently of any Kconfig option. Thanks to that, bugs and other
regressions are subsequently easier to catch.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Lee Jones <lee@kernel.org>
2022-12-07 13:28:11 +00:00
Arnd Bergmann fc45720334 mfd: Remove dm355evm_msp driver
The DaVinci DM355EVM platform is gone after the removal of all
unused board files, so the MTD device along with its sub-devices
can be removed as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221019152947.3857217-7-arnd@kernel.org
2022-12-07 13:28:08 +00:00
Dmitry Torokhov 1f7caaa174 mfd: twl6040: Drop twl6040_platform_data and associated definitions
As of df04b6242a ("mfd: twl6040: Remove support for legacy (pdata)
mode") the driver no longer references the platform data, so we can drop
its definition, as well as definitions of related structures.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220926054421.1546436-5-dmitry.torokhov@gmail.com
2022-12-07 13:28:07 +00:00
Dmitry Torokhov 3c92699a16 mfd: twl6040: Switch to using gpiod API
This patch switches the dirver from legacy gpio API to a newer gpiod
API so that we can eventually drop the former.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220926054421.1546436-4-dmitry.torokhov@gmail.com
2022-12-07 13:28:07 +00:00
Dmitry Torokhov 7ca91a3377 mfd: palmas: Stop including of_gpio.h
It does not appear that any of palmas sub-drivers are using OF-based
gpio APIs, so let's stop including this header.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220926054421.1546436-3-dmitry.torokhov@gmail.com
2022-12-07 13:28:07 +00:00
Wolfram Sang 43c487c28f mmc: tmio: remove 'alignment_shift' from platform data
There is only one alignment shift for one type of Renesas SDHI. Encode
it directly in its DMA driver to reduce complexity and ease further
simplifications.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20221102125430.28466-3-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2022-12-07 13:22:37 +01:00
Marcus Folkesson 47c008050a watchdog: rn5t618: add support for read out bootstatus
The PMIC does store the power-off factor internally.
Read it out and report it as bootstatus.

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20221028075019.2757812-1-marcus.folkesson@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
2022-11-19 15:30:40 +01:00
Uwe Kleine-König b76f64caa4 Input: max8997 - convert to modern way to get a reference to a PWM
pwm_request() isn't recommended to be used any more because it relies on
global IDs for the PWM which comes with different difficulties.

The new way to do things is to find the right PWM using a reference from
the platform device. (This can be created either using a device-tree
or a platform lookup table, see e.g. commit 5a4412d4a8 ("ARM: pxa:
tavorevb: Use PWM lookup table") how to do this.)

There are no in-tree users, so there are no other code locations that need
adaption.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20221117073543.3790449-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2022-11-17 22:19:14 -08:00