Commit Graph

5010 Commits

Author SHA1 Message Date
Dan Carpenter 75db790735 mfd: fsl-imx25: Fix check for platform_get_irq() errors
The mx25_tsadc_remove() function assumes all non-zero returns are success
but the platform_get_irq() function returns negative on error and
positive non-zero values on success.  It never returns zero, but if it
did then treat that as a success.

Fixes: 18f7739379 ("mfd: fsl-imx25: Clean up irq settings during removal")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/YvTfkbVQWYKMKS/t@kili
2022-09-28 16:17:39 +01:00
ChiYuan Huang 4e4627e1ae mfd: rt5120: Add Richtek PMIC support
Add Richtek RT5120 PMIC I2C driver.

Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/1660100142-32493-3-git-send-email-u0084500@gmail.com
2022-09-28 16:09:50 +01:00
Michal Oleszczyk 8e88c61d6f mfd: core: Delete corresponding OF node entries from list on MFD removal
When we consider MFD which implements hotplug (e.g. USB hotplug
driver based on product and vendor IDs) functionality it turns out
that its sub-devices are correctly matched with corresponding device
tree nodes only at the first time. When physical device reboots
or is replugged (and MFD driver is disconnected and probed back
again) all sub-devices fails in mfd_add_device() with error
'Failed to locate of_node'.

The reason of that behavior is that when any MFD sub-device is
created for the first time (and matched with device tree node) it
is added to the mfd_of_node_list. It looks like this list is never
cleaned even if devices added there are intentionally removed from
the system. So when MFD device is replugged and all sub-devices
are matched with their device tree nodes again they fail as matched
nodes already exist in mfd_of_node_list. In other words current
implementation does not support MFD with hotplug feature.

This commit extends MFD core for hotplugging support by removing
appropriate OF node entry from mfd_of_node_list when corresponding
device is removed from the system. Thanks to that when device is
added once again it can be matched with its device tree node
successfully.

Signed-off-by: Michal Oleszczyk <oleszczyk.m@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220809060336.31892-1-m.oleszczyk@grinn-global.com
2022-09-28 16:09:50 +01:00
Jason Wang 31961dc598 mfd: twl-core: Fix double "to to" in comment.
The double `to' is duplicated in the comment, remove one.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220802201757.8142-1-wangborong@cdjrlc.com
2022-09-28 16:09:50 +01:00
Christophe JAILLET 557244f628 mfd: lp8788: Fix an error handling path in lp8788_irq_init() and lp8788_irq_init()
In lp8788_irq_init(), if an error occurs after a successful
irq_domain_add_linear() call, it must be undone by a corresponding
irq_domain_remove() call.

irq_domain_remove() should also be called in lp8788_irq_exit() for the same
reason.

Fixes: eea6b7cc53 ("mfd: Add lp8788 mfd driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/bcd5a72c9c1c383dd6324680116426e32737655a.1659261275.git.christophe.jaillet@wanadoo.fr
2022-09-28 16:09:50 +01:00
Christophe JAILLET becfdcd751 mfd: lp8788: Fix an error handling path in lp8788_probe()
Should an error occurs in mfd_add_devices(), some resources need to be
released, as already done in the .remove() function.

Add an error handling path and a lp8788_irq_exit() call to undo a previous
lp8788_irq_init().

Fixes: eea6b7cc53 ("mfd: Add lp8788 mfd driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/18398722da9df9490722d853e4797350189ae79b.1659261275.git.christophe.jaillet@wanadoo.fr
2022-09-28 16:09:50 +01:00
Christophe JAILLET 3fa9e4cfb5 mfd: fsl-imx25: Fix an error handling path in mx25_tsadc_setup_irq()
If devm_of_platform_populate() fails, some resources need to be
released.

Introduce a mx25_tsadc_unset_irq() function that undoes
mx25_tsadc_setup_irq() and call it both from the new error handling path
of the probe and in the remove function.

Fixes: a55196eff6 ("mfd: fsl-imx25: Use devm_of_platform_populate()")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/d404e04828fc06bcfddf81f9f3e9b4babbe35415.1659269156.git.christophe.jaillet@wanadoo.fr
2022-09-28 16:09:50 +01:00
Alistair Francis 5e88619b30 mfd: silergy,sy7636a: Add config option MFD_SY7636A
Add a specific MFD_SY7636A config option.

As part of this change we can use MFD_SY7636A as a dependency for all
SY7636a components and also remove the name from MFD_SIMPLE_MFD_I2C as
it no longer needs to be selectable.

Signed-off-by: Alistair Francis <alistair@alistair23.me>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220525115554.430971-2-alistair@alistair23.me
2022-09-28 16:09:50 +01:00
ChiYuan Huang b2adf788e6 mfd: mt6370: Add MediaTek MT6370 support
This adds support for the MediaTek MT6370 SubPMIC. MediaTek MT6370 is a
SubPMIC consisting of a single cell battery charger with ADC monitoring,
RGB LEDs, dual channel flashlight, WLED backlight driver, display bias
voltage supply, one general purpose LDO, and the USB Type-C & PD controller
complies with the latest USB Type-C and PD standards.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: ChiYuan Huang <cy_huang@richtek.com>
Signed-off-by: ChiaEn Wu <chiaen_wu@richtek.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220805070610.3516-8-peterwu.pub@gmail.com
2022-09-28 16:09:50 +01:00
Chris Morgan 2d48bfca42 mfd: rk808: Add Rockchip rk817 battery charger support
Add rk817 charger support cell to rk808 mfd driver.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Maya Matuszczyk <maccraft123mc@gmail.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220808173809.11320-3-macroalpha82@gmail.com
2022-09-28 16:09:49 +01:00
Andy Shevchenko 03f271b0b1 mfd: intel_soc_pmic_crc: Update the copyright year
Update the copyright year to be 2012-2014, 2022.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-10-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:49 +01:00
Andy Shevchenko 39c8980cb2 mfd: intel_soc_pmic_crc: Replace intel_soc_pmic with crystal_cove
To reflect the point that this driver is only for one type of the PMICs,
replace intel_soc_pmic with crystal_cove (avoid using crc for possible
namespace collisions with CRC library APIs).

Note, also rename the driver name since we don't expect any user
that enumerates by it, only ACPI known so far.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-9-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:49 +01:00
Andy Shevchenko 0c602c7f6d mfd: intel_soc_pmic_crc: Convert driver to use ->probe_new()
Use the ->probe_new() callback.

The driver does not use const struct i2c_device_id * argument,
so convert it to utilise the simplified I²C driver registration.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-8-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:49 +01:00
Andy Shevchenko 09c4e702bc mfd: intel_soc_pmic_crc: Drop redundant ACPI_PTR() and ifdeffery
The driver depends on ACPI, ACPI_PTR() resolution is always the same.
Otherwise a compiler may produce a warning.

That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or
none should be used in a driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-7-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:49 +01:00
Andy Shevchenko e1efbc8e46 mfd: intel_soc_pmic_crc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
Letting the compiler remove these functions when the kernel is built
without CONFIG_PM_SLEEP support is simpler and less error prone than the
use of #ifdef based kernel configuration guards.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-6-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:49 +01:00
Andy Shevchenko 4b74ec581a mfd: intel_soc_pmic_crc: Convert to use i2c_get/set_clientdata()
We have the specific helpers for I2C device to set and get its driver data.
Convert driver to use them instead of open coded variants.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-5-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:49 +01:00
Andy Shevchenko cae02b7a5d mfd: intel_soc_pmic_crc: Use devm_regmap_add_irq_chip()
Use devm_regmap_add_irq_chip() to simplify the code.

While at it, replace -1 magic parameter by PLATFORM_DEVID_NONE when
calling mfd_add_devices().

Note, the mfd_add_devices() left in non-devm variant here due to
potentially increased churn while wrapping pwm_remove_table().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-4-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:49 +01:00
Andy Shevchenko 81f22f284c mfd: intel_soc_pmic: Move non-Intel Makefile entries to their own group
It looks like a random position for couple of Makefile entries that are
disrupting Intel PMIC group. Move them to their own group.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-3-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:49 +01:00
Andy Shevchenko 5a30b210bf mfd: intel_soc_pmic_crc: Merge Intel PMIC core to crc
The core part is misleading since its only purpose to serve Crystal Cove PMIC,
although for couple of different platforms. Merge core part into crc one.

Advantages among others are:
- speed up a compilation and build
- decreasing the code base
- reducing noise in the namespace by making some data static and const

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-2-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:48 +01:00
Christophe JAILLET 48749cabba mfd: intel_soc_pmic: Fix an error handling path in intel_soc_pmic_i2c_probe()
The commit in Fixes: has added a pwm_add_table() call in the probe() and
a pwm_remove_table() call in the remove(), but forget to update the error
handling path of the probe.

Add the missing pwm_remove_table() call.

Fixes: a3aa9a93df ("mfd: intel_soc_pmic_core: ADD PWM lookup table for CRC PMIC based PWM")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220801114211.36267-1-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:48 +01:00
Francesco Dolcini d7667f1903 mfd: stmpe: Probe sub-function by compatible
Use sub-function of_compatible during probe, instead of using the node
name. The code should not rely on the node names during probe, in
addition to that the previously hard-coded node names are not compliant
to the latest naming convention (they are not generic and they use
underscores), and it was broken by mistake already once [1].

[1] commit 56086b5e80 ("ARM: dts: imx6qdl-apalis: Avoid underscore in node name")

Suggested-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220712163345.445811-3-francesco.dolcini@toradex.com
2022-09-28 16:09:48 +01:00
Francesco Dolcini 8c4352976f mfd: stmpe: Remove rotator block from probe
Remove rotator block from probe, it is not used in any device tree file,
there is no related cell defined, it's just dead non-working code with no
of_compatible for it.

This is a preliminary change to allow probing by of_compatible and not
by a fixed name.

Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220712163345.445811-2-francesco.dolcini@toradex.com
2022-09-28 16:09:48 +01:00
Andy Shevchenko fe55d73238 mfd: intel-lpss: Provide an SSP type to the SPI driver
The SPI driver wants to know the exact type of the controller.
Provide this information to it. This is a complementary part to
the previously updated intel-lpss-acpi.c.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220702211903.9093-1-andriy.shevchenko@linux.intel.com
2022-09-28 16:09:48 +01:00
Colin Foster f3e893626a mfd: ocelot: Add support for the vsc7512 chip via spi
The VSC7512 is a networking chip that contains several peripherals. Many of
these peripherals are currently supported by the VSC7513 and VSC7514 chips,
but those run on an internal CPU. The VSC7512 lacks this CPU, and must be
controlled externally.

Utilize the existing drivers by referencing the chip as an MFD. Add support
for the two MDIO buses, the internal phys, pinctrl, and serial GPIO.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20220905162132.2943088-9-colin.foster@in-advantage.com
2022-09-09 07:54:47 +01:00
Uwe Kleine-König ed5c2f5fd1 i2c: Make remove callback return void
The value returned by an i2c driver's remove function is mostly ignored.
(Only an error message is printed if the value is non-zero that the
error is ignored.)

So change the prototype of the remove function to return no value. This
way driver authors are not tempted to assume that passing an error to
the upper layer is a good idea. All drivers are adapted accordingly.
There is no intended change of behaviour, all callbacks were prepared to
return 0 before.

Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com>
Reviewed-by: Jeremy Kerr <jk@codeconstruct.com.au>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Crt Mori <cmo@melexis.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Marek Behún <kabel@kernel.org> # for leds-turris-omnia
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com> # for surface3_power
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> # for bmc150-accel-i2c + kxcjk-1013
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> # for media/* + staging/media/*
Acked-by: Miguel Ojeda <ojeda@kernel.org> # for auxdisplay/ht16k33 + auxdisplay/lcd2s
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for versaclock5
Reviewed-by: Ajay Gupta <ajayg@nvidia.com> # for ucsi_ccg
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> # for iio
Acked-by: Peter Rosin <peda@axentia.se> # for i2c-mux-*, max9860
Acked-by: Adrien Grassein <adrien.grassein@gmail.com> # for lontium-lt8912b
Reviewed-by: Jean Delvare <jdelvare@suse.de> # for hwmon, i2c-core and i2c/muxes
Acked-by: Corey Minyard <cminyard@mvista.com> # for IPMI
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for drivers/power
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
2022-08-16 12:46:26 +02:00
Linus Torvalds 613b2a82f2 - Core Frameworks
- Change maintainer email address
    - Use acpi_dev_for_each_child() helper to walk the ACPI list
 
  - New Device Support
    - Add support for BCM2711 RPiVid ASB to Broadcom BCM2835
    - Add support for MT8195 dual-core RISC-V MCU to Chrome OS Embedded Controller
    - Add support for Regulator, RTC and Keys to MediaTek MT6357 PMIC
    - Add support for GPIO to X-Powers AXP20x PMIC
    - Add support for MT6331 and MT6332 to MediaTek MT6357 PMIC
    - Add support for Intel Meteor Lake-P PCI to Intel LPSS PCI
 
  - New Functionality
    - Add support for non-ACPI platforms; lpc_ich
 
  - Fix-ups
    - Use platform data instead of hard-coded values; bcm2835-pm
    - Make use of BIT/GENMASK macros; intel_soc_pmic_bxtwc
    - Use dev_err_probe() helper; intel_soc_pmic_chtwc, intel_soc_pmic_bxtwc
    - Use provided generic APIs / helpers; lpc_ich
    - Clean-up .remove() return values; asic3, t7l66xb, tc6387xb, tc6393xb
    - Use correct formatting specifiers; syscon
    - Replace sprintf() with sysfs_emit(); intel_soc_pmic_bxtwc
    - Automatically detect and fill USB endpoint pointers; dln2
    - Use more appropriate dev/platform/spi resources APIs; intel_soc_pmic_bxtwc
    - Make use of pm_sleep_ptr(); intel_soc_pmic_chtwc, intel_soc_pmic_bxtwc
    - Improve error handling; intel_soc_pmic_bxtwc
    - Use core driver API to create groups; intel_soc_pmic_bxtwc
    - Kconfig fix-ups; MFD_SUN6I_PRCM
    - Admin: whitespace/email addresses/etc; max77714, db8500-prcmu, ipaq-micro,
 			intel_soc_pmic_bxtwc
    - Remove duplicate/unused code/functionality; lpc_ich, twl-core, qcom-pm8008,
 			intel_soc_pmic_bxtwc
    - DT fix-ups / conversions; da9063, ti,j721e-system-controller, st,stm32-timers,
 			mt6397, qcom,tcsr, mps,mp2629, qcom-pm8xxx, fsl,imx8qxp-csr
 
  - Bug Fixes
    - Fix of_node reference leak; max77620
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmLs4QIACgkQUa+KL4f8
 d2ECNg/5ARW0sMXUV3lkSGZUSo3NnypXGwxvhpuAKV/Lyt0A05Oe5DBTkM7VsMha
 NNVuAPRKLrLFORd4t5D1C+jOjoekjxFhJyXhnTjcnEtyxouh+SxcFOBDbf6+aIwB
 1oPgQNiryRzrBnQWAscQJ1I/ADlMQnRCsWKTBN4JohqwLpQqiwjLDUpkwKOKqgbP
 Z53WOeB1lBctaoplyK07J3poJ1weURip+FT5KXDbeIsARtoNPFRLPzgkhLCdCEcd
 5lLxA9r7Flcooet0BduWwH85g85TakRKymhfSwMWzefruZLsNTIX9/I8zUwg27Mj
 PjDcZP91Q1DssETWBmfoYNqn8wl9+2RjCj1tCZVOzAIreRQpUCoQsXMO9NzaJfVr
 leg6NcuzsPRrjDIzJ/IyYgVpq2O5KfOhIO02+d7eU/JlAblE8kTZRSuX/BkCuc6L
 gcZ1D1hO325umJgeB63ZkwNzjTPQDgXm+cHH9uNX52shJCe+4l94pJEVM6L636EN
 B2ZOsx7+AJKn/aNdGfVoQ5qbOW4d5QTZudqFfkDvJzhGGjQugn3TxmcCueejYBMW
 9qCsV0eXmwe/uvSns+TAWRbSLaWxvMnx2GDyp9z1EH7vJMAFKnhapXhuv5KLLZmK
 lAEYizDMgZpAEZ5AaBgq8zEnFJGwXGPP6ubii6xCPH8XOcRkkwQ=
 =zP1M
 -----END PGP SIGNATURE-----

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

Pull MFD updates from Lee Jones:
 "Core Framework:
   - Change maintainer email address
   - Use acpi_dev_for_each_child() helper to walk the ACPI list

  New Device Support:
   - BCM2711 RPiVid ASB in Broadcom BCM2835
   - MT8195 dual-core RISC-V MCU in Chrome OS Embedded Controller
   - Regulator, RTC and Keys in MediaTek MT6357 PMIC
   - GPIO in X-Powers AXP20x PMIC
   - MT6331 and MT6332 in MediaTek MT6357 PMIC
   - Intel Meteor Lake-P PCI in Intel LPSS PCI

  New Functionality:
   - Add support for non-ACPI platforms; lpc_ich

  Fix-ups:
   - Use platform data instead of hard-coded values; bcm2835-pm
   - Make use of BIT/GENMASK macros; intel_soc_pmic_bxtwc
   - Use dev_err_probe() helper; intel_soc_pmic_chtwc,
     intel_soc_pmic_bxtwc
   - Use provided generic APIs / helpers; lpc_ich
   - Clean-up .remove() return values; asic3, t7l66xb, tc6387xb,
     tc6393xb
   - Use correct formatting specifiers; syscon
   - Replace sprintf() with sysfs_emit(); intel_soc_pmic_bxtwc
   - Automatically detect and fill USB endpoint pointers; dln2
   - Use more appropriate dev/platform/spi resources APIs;
     intel_soc_pmic_bxtwc
   - Make use of pm_sleep_ptr(); intel_soc_pmic_chtwc,
     intel_soc_pmic_bxtwc
   - Improve error handling; intel_soc_pmic_bxtwc
   - Use core driver API to create groups; intel_soc_pmic_bxtwc
   - Kconfig fix-ups; MFD_SUN6I_PRCM
   - Admin: whitespace/email addresses/etc; max77714, db8500-prcmu,
     ipaq-micro, intel_soc_pmic_bxtwc
   - Remove duplicate/unused code/functionality; lpc_ich, twl-core,
     qcom-pm8008, intel_soc_pmic_bxtwc
   - DT fix-ups / conversions; da9063, ti,j721e-system-controller,
     st,stm32-timers, mt6397, qcom,tcsr, mps,mp2629, qcom-pm8xxx,
     fsl,imx8qxp-csr

  Bug Fixes:
   - Fix of_node reference leak; max77620"

* tag 'mfd-next-5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (49 commits)
  dt-bindings: mfd: stm32-timers: Move fixed string node names under 'properties'
  dt-bindings: mfd: st,stm32-timers: Correct 'resets' property name
  dt-bindings: mfd: syscon: Update Lee Jones' email address
  MAINTAINERS: Use Lee Jones' kernel.org address for Syscon submissions
  MAINTAINERS: Use Lee Jones' kernel.org address for MFD submissions
  mfd: sun6i-prcm: Update Kconfig description
  mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment
  mfd: intel_soc_pmic_bxtwc: Drop unneeded casting
  mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf()
  mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks
  mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR()
  mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
  mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device
  mfd: intel_soc_pmic_bxtwc: Use dev_err_probe()
  mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata()
  mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility
  mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
  mfd: intel-lpss: Add Intel Meteor Lake-P PCI IDs
  mfd: mt6397: Add basic support for MT6331+MT6332 PMIC
  mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
  ...
2022-08-06 10:25:16 -07:00
Linus Torvalds 37644cac6e gpio: updates for v6.0-rc1
- remove gpio-vr41xx driver as the only platform using it got dropped too
 - add support for suspend/resume to gpio-davinci
 - improvements to the GPIO character device code
 - add support for disabling bias for in-kernel users (up until now
   only user-space could set it)
 - drop unused devm_gpio_free()
 - fix a refcount issue in gpiolib OF
 - use device match helpers where applicable
 - add support for a new model to gpio-rockchip
 - non-functional improvements in gpio-adp5588
 - improve and simplify teardown in gpio-twl4030 and gpio-ucb1400
 - modernize the gpio-74xx-mmio and gpio-adnp drivers
 - coding style improvements in gpio-xilinx, gpio-104-idi-48
 - support new model (pca9571) in gpio-pca9570
 - convert the DT bindings to YAML for gpio-mvebu and update the document
 - don't return error codes from remove() in gpio-brcmstb
 - add a library for the intel 8255 PPI interface and use it in drivers
 - reduce using magic numbers and improve code readability in several drivers
 - convert DT bindings to YAML for gpio-tpic2810
 - add new models to DT bindings for gpio-frl-imx
 - Kconfig improvements
 - other minor tweaks and improvements
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmLruBoACgkQEacuoBRx
 13LSqA//QMdrdsYOvSp3m6Dy1swj8a2VpeInDclx/JQ51hIsv03lW6sysrRBBKfy
 gslkj0KO+kelEQbcHZdXF6f434Y2QqSU/JRCPQlQ55Uo3vSbUulvVkUtSoegdNKG
 airr5KebZtLzjBgc23n38HiTJxa1J238+3UScxYHqL9jQ6AA6sPx7Kpy2zlTwojn
 iygJ1CKuyMyHOjU1uhAWYVzCAoguVvOb58emUt5HUsOjjW42d8T+iCHxrJnjC3ST
 YWwHnkSd3GO5CLI+5w7MmLk4kaOA8KU7PGRljglwpbsNGknUQ3PFFSlqFUziBzMU
 nOG1gZ9bvzOy5xjFcLkT3p/NHZiTnyq+ugDl2RAVQB2UF31KHk2sVGrzIsRpbBgt
 kDst5Wn21oymfEO6FM269h5ln+haXouJv2eQvnayBr3rfMxaZCm8veFxjQBDRADf
 D3muvi6u/EJPsPg08owcaVrINPVYVGQIzQp5hi+UCBkzXghn+MovNuI/i07Qf1kr
 fBELOXTy+MGK22p+rO+rXsp0Cp1zUIbwSz0m8ImbhLqcYLa+Vm5bJHk31/Igvbv3
 9FMR75RmfE98EvMhd6ECarZHF9rvCVN7R1U9P1aK8+85m7X5eIVehoQ125uAZf+N
 +W49bceSCI/mGqIg8MiQCM5NIW0AXvyjd7gTNN5kr7qsMGTJI3c=
 =rGNU
 -----END PGP SIGNATURE-----

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

Pull gpio updates from Bartosz Golaszewski:
 "Here are the updates for this merge window from the GPIO subsystem.

  We have more lines removed than added thanks to dropping of a driver
  for a platform that's no longer supported. Otherwise the changes are
  pretty straightforward: support for some new models, various
  improvements to existing drivers, some tweaks to the core library code
  and DT bindings updates.

  Summary:

   - remove gpio-vr41xx driver as the only platform using it got dropped
     too

   - add support for suspend/resume to gpio-davinci

   - improvements to the GPIO character device code

   - add support for disabling bias for in-kernel users (up until now
     only user-space could set it)

   - drop unused devm_gpio_free()

   - fix a refcount issue in gpiolib OF

   - use device match helpers where applicable

   - add support for a new model to gpio-rockchip

   - non-functional improvements in gpio-adp5588

   - improve and simplify teardown in gpio-twl4030 and gpio-ucb1400

   - modernize the gpio-74xx-mmio and gpio-adnp drivers

   - coding style improvements in gpio-xilinx, gpio-104-idi-48

   - support new model (pca9571) in gpio-pca9570

   - convert the DT bindings to YAML for gpio-mvebu and update the
     document

   - don't return error codes from remove() in gpio-brcmstb

   - add a library for the intel 8255 PPI interface and use it in
     drivers

   - reduce using magic numbers and improve code readability in several
     drivers

   - convert DT bindings to YAML for gpio-tpic2810

   - add new models to DT bindings for gpio-frl-imx

   - Kconfig improvements

   - other minor tweaks and improvements"

* tag 'gpio-updates-for-v6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (52 commits)
  dt-bindings: gpio: fsl-imx-gpio: Add i.MXRT compatibles
  gpio: 74xx-mmio: Use bits instead of plain numbers for flags
  gpio: xilinx: add missing blank line after declarations
  MAINTAINERS: Update Intel 8255 GPIO driver file list
  gpio: gpio-mm: Implement and utilize register structures
  gpio: 104-idi-48: Implement and utilize register structures
  gpio: 104-dio-48e: Implement and utilize register structures
  gpio: i8255: Introduce the Intel 8255 interface library module
  gpio: 104-idio-16: Implement and utilize register structures
  gpio: ws16c48: Implement and utilize register structures
  gpio: remove VR41XX related gpio driver
  dt-bindings: gpio: add pull-disable flag
  gpiolib: acpi: support bias pull disable
  gpiolib: of: support bias pull disable
  gpiolib: add support for bias pull disable
  gpio: 74xx-mmio: use bits.h macros for all masks
  gpio: 74xx-mmio: Check MMIO_74XX_DIR_IN flag in mmio_74xx_dir_in()
  gpio: 74xx-mmio: Make use of device properties
  gpiolib: cdev: compile out HTE unless CONFIG_HTE selected
  gpiolib: cdev: consolidate edge detector configuration flags
  ...
2022-08-04 18:34:05 -07:00
Linus Torvalds 5f0848190c platform-drivers-x86 for v6.0-1
Highlights:
  -  Microsoft Surface:
     - SSAM hot unplug support
     - Surface Pro 8 keyboard cover support
     - Tablet mode switch support for Surface Pro 8 and Surface Laptop Studio
  -  thinkpad_acpi: AMD Automatice Mode Transitions (AMT) support
  -  Mellanox:
     - Vulcan chassis COMe NVSwitch management support
     - XH3000 support
  - New generic/shared Intel P2SB (Primary to Sideband) support
  - Lots of small cleanups
  - Various small bugfixes
  - Various new hardware ids / quirks additions
 
 The following is an automated git shortlog grouped by driver:
 
 ACPI:
  -  video: Fix acpi_video_handles_brightness_key_presses()
  -  video: Change how we determine if brightness key-presses are handled
 
 Documentation/ABI:
  -  Add new attributes for mlxreg-io sysfs interfaces
  -  mlxreg-io: Fix contact info
 
 Drop the PMC_ATOM Kconfig option:
  - Drop the PMC_ATOM Kconfig option
 
 EDAC, pnd2:
  -  convert to use common P2SB accessor
  -  Use proper I/O accessors and address space annotation
 
 HID:
  -  surface-hid: Add support for hot-removal
 
 ISST:
  -  PUNIT device mapping with Sub-NUMA clustering
 
 Kconfig:
  -  Remove unnecessary "if X86"
 
 MAINTAINERS:
  -  repair file entry in MICROSOFT SURFACE AGGREGATOR TABLET-MODE SWITCH
 
 Merge tag 'ib-mfd-edac-i2c-leds-pinctrl-platform-watchdog-v5.20' into review-hans:
  - Merge tag 'ib-mfd-edac-i2c-leds-pinctrl-platform-watchdog-v5.20' into review-hans
 
 Move AMD platform drivers to separate directory:
  - Move AMD platform drivers to separate directory
 
 acer-wmi:
  -  Use backlight helper
 
 acer_wmi:
  -  Cleanup Kconfig selects
 
 apple-gmux:
  -  Use backlight helper
 
 asus-wmi:
  -  Add mic-mute LED classdev support
  -  Add key mappings
 
 compal-laptop:
  -  Use backlight helper
 
 efi:
  -  Fix efi_power_off() not being run before acpi_power_off() when necessary
 
 gigabyte-wmi:
  -  add support for B660I AORUS PRO DDR4
 
 hp-wmi:
  -  Ignore Sanitization Mode event
 
 i2c:
  -  i801: convert to use common P2SB accessor
 
 ideapad-laptop:
  -  Add Ideapad 5 15ITL05 to ideapad_dytc_v4_allow_table[]
  -  Add allow_v4_dytc module parameter
 
 intel/pmc:
  -  Add Alder Lake N support to PMC core driver
 
 intel_atomisp2_led:
  -  Also turn off the always-on camera LED on the Asus T100TAF
 
 leds:
  -  simatic-ipc-leds-gpio: Add GPIO version of Siemens driver
  -  simatic-ipc-leds: Convert to use P2SB accessor
 
 mfd:
  -  lpc_ich: Add support for pinctrl in non-ACPI system
  -  lpc_ich: Switch to generic p2sb_bar()
  -  lpc_ich: Factor out lpc_ich_enable_spi_write()
 
 mlx-platform:
  -  Add COME board revision register
  -  Add support for new system XH3000
  -  Introduce support for COMe NVSwitch management module for Vulcan chassis
  -  Add support for systems equipped with two ASICs
  -  Add cosmetic changes for alignment
  -  Make activation of some drivers conditional
 
 p2sb:
  -  Move out of X86_PLATFORM_DEVICES dependency
 
 panasonic-laptop:
  -  Use acpi_video_get_backlight_type()
  -  filter out duplicate volume up/down/mute keypresses
  -  don't report duplicate brightness key-presses
  -  revert "Resolve hotkey double trigger bug"
  -  sort includes alphabetically
  -  de-obfuscate button codes
 
 pinctrl:
  -  intel: Check against matching data instead of ACPI companion
 
 platform/mellanox:
  -  mlxreg-lc: Fix error flow and extend verbosity
  -  mlxreg-io: Add locking for io operations
  -  nvsw-sn2201: fix error code in nvsw_sn2201_create_static_devices()
 
 platform/olpc:
  -  Fix uninitialized data in debugfs write
 
 platform/surface:
  -  gpe: Add support for 13" Intel version of Surface Laptop 4
  -  tabletsw: Fix __le32 integer access
  -  Update copyright year of various drivers
  -  aggregator: Move subsystem hub drivers to their own module
  -  aggregator: Move device registry helper functions to core module
  -  aggregator_registry: Add support for tablet mode switch on Surface Laptop Studio
  -  aggregator_registry: Add support for tablet mode switch on Surface Pro 8
  -  Add KIP/POS tablet-mode switch driver
  -  aggregator: Add helper macros for requests with argument and return value
  -  aggregator: Reserve more event- and target-categories
  -  avoid flush_scheduled_work() usage
  -  aggregator_registry: Add support for keyboard cover on Surface Pro 8
  -  aggregator_registry: Add KIP device hub
  -  aggregator_registry: Change device ID for base hub
  -  aggregator_registry: Generify subsystem hub functionality
  -  aggregator: Add comment for KIP subsystem category
  -  aggregator_registry: Use client device wrappers for notifier registration
  -  aggregator: Allow notifiers to avoid communication on unregistering
  -  aggregator: Allow devices to be marked as hot-removed
  -  aggregator: Allow is_ssam_device() to be used when CONFIG_SURFACE_AGGREGATOR_BUS is disabled
 
 platform/x86/amd/pmc:
  -  Add new platform support
  -  Add new acpi id for PMC controller
 
 platform/x86/dell:
  -  Kconfig: Remove unnecessary "depends on X86_PLATFORM_DEVICES"
 
 platform/x86/intel:
  -  Add Primary to Sideband (P2SB) bridge support
 
 platform/x86/intel/ifs:
  -  Mark as BROKEN
 
 platform/x86/intel/pmt:
  -  telemetry: Fix fixed region handling
 
 platform/x86/intel/vsec:
  -  Fix wrong type for local status variables
  -  Add PCI error recovery support to Intel PMT
  -  Add support for Raptor Lake
  -  Rework early hardware code
 
 pmc_atom:
  -  Fix comment typo
  -  Match all Lex BayTrail boards with critclk_systems DMI table
 
 power/supply:
  -  surface_battery: Use client device wrappers for notifier registration
  -  surface_charger: Use client device wrappers for notifier registration
 
 serial-multi-instantiate:
  -  Sort ACPI IDs by HID
  -  Get rid of redundant 'else'
  -  Use while (i--) pattern to clean up
  -  Improve dev_err_probe() messaging
  -  Drop duplicate check
  -  Improve autodetection
 
 simatic-ipc:
  -  drop custom P2SB bar code
 
 sony-laptop:
  -  Remove useless comparisons in sony_pic_read_possible_resource()
 
 system76_acpi:
  -  Use dev_get_drvdata
 
 thinkpad_acpi:
  -  Enable AMT by default on supported systems
  -  Add support for hotkey 0x131a
  -  Add support for automatic mode transitions
  -  profile capabilities as integer
  -  do not use PSC mode on Intel platforms
  -  Fix a memory leak of EFCH MMIO resource
  -  Replace custom str_on_off() etc
  -  Sort headers for better maintenance
  -  Use backlight helper
 
 tools/power/x86/intel-speed-select:
  -  Remove unneeded semicolon
  -  Fix off by one check
 
 watchdog:
  -  simatic-ipc-wdt: convert to use P2SB accessor
 
 x86-android-tablets:
  -  Fix Lenovo Yoga Tablet 2 830/1050 poweroff again
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmLrndEUHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9zeMgf7BjSCz6ZA8SSY1i8QHDTvdjySihHJ
 j07Gn3j1T/5G00R/r6viMDE4PxcYvMAPXjq3azepKQd8H5kGfE323SA6fgWFPAvi
 P2OvEfvWfI5S8FYGYPBkNP2MjQ5MFe7qzLEh3+wQH0ocJ7WRCi457B4Xvtd2gWI3
 dHj5gMSWC3O5xNa2S4Mg3dnD9uJlwhX+FNjWIuRy8eh5+DikgByyC4B+uW6WtO5e
 t0rmIm6q5wUzB7dIetJLoAQwrcpYAOkK7L33G9h/7knWAfiJfklaKTbftnoxbDSv
 iGWODkLDyob4C48DmVusS6WMEhPUzl/R33+tk6LjVt/YOYOP030EMtCECQ==
 =Krhc
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver updates from Hans de Goede:

 - Microsoft Surface:
     - SSAM hot unplug support
     - Surface Pro 8 keyboard cover support
     - Tablet mode switch support for Surface Pro 8 and Surface Laptop
       Studio

 - thinkpad_acpi:
     - AMD Automatice Mode Transitions (AMT) support

 - Mellanox:
     - Vulcan chassis COMe NVSwitch management support
     - XH3000 support

 - New generic/shared Intel P2SB (Primary to Sideband) support

 - Lots of small cleanups

 - Various small bugfixes

 - Various new hardware ids / quirks additions

* tag 'platform-drivers-x86-v6.0-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (105 commits)
  platform/x86/intel/vsec: Fix wrong type for local status variables
  platform/x86: p2sb: Move out of X86_PLATFORM_DEVICES dependency
  platform/x86: pmc_atom: Fix comment typo
  platform/surface: gpe: Add support for 13" Intel version of Surface Laptop 4
  platform/olpc: Fix uninitialized data in debugfs write
  platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity
  platform/x86: pmc_atom: Match all Lex BayTrail boards with critclk_systems DMI table
  platform/x86: sony-laptop: Remove useless comparisons in sony_pic_read_possible_resource()
  tools/power/x86/intel-speed-select: Remove unneeded semicolon
  tools/power/x86/intel-speed-select: Fix off by one check
  platform/surface: tabletsw: Fix __le32 integer access
  Documentation/ABI: Add new attributes for mlxreg-io sysfs interfaces
  Documentation/ABI: mlxreg-io: Fix contact info
  platform/mellanox: mlxreg-io: Add locking for io operations
  platform/x86: mlx-platform: Add COME board revision register
  platform/x86: mlx-platform: Add support for new system XH3000
  platform/x86: mlx-platform: Introduce support for COMe NVSwitch management module for Vulcan chassis
  platform/x86: mlx-platform: Add support for systems equipped with two ASICs
  platform/x86: mlx-platform: Add cosmetic changes for alignment
  platform/x86: mlx-platform: Make activation of some drivers conditional
  ...
2022-08-04 18:19:14 -07:00
Linus Torvalds 5bb3bf24b0 chrome platform changes for 5.20
cros_ec_proto:
 * Leverage Kunit and add Kunit test cases.
 * Clean-ups.
 * Fix typo.
 
 cros_ec_commands:
 * Fix typo.
 * Fix compile errors.
 
 cros_kbd_led_backlight:
 * Support OF match.
 * Support EC PWM backend.
 
 cros_ec:
 * Always expose the last resume result to fix sleep hang detection on
   ARM-based chromebooks.
 
 wilco_ec:
 * Fix typo.
 
 cros_ec_typec:
 * Clean-ups.
 * Use Type-C framework utilities to manage altmode structs.
 -----BEGIN PGP SIGNATURE-----
 
 iIkEABYIADEWIQS0yQeDP3cjLyifNRUrxTEGBto89AUCYunptRMcdHp1bmdiaUBr
 ZXJuZWwub3JnAAoJECvFMQYG2jz0Ty4A/RzxnPvDnnHMwuhgAVcGMNSf5NwIza1I
 Um5ABCUZ60VuAPoCSFLTNtnfLjZRLniLchDRXS+IsqYZ2IgZ8XgPoZ4lCg==
 =sehJ
 -----END PGP SIGNATURE-----

Merge tag 'tag-chrome-platform-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux

Pull chrome platform updates from Tzung-Bi Shih:
 "cros_ec_proto:
   - Leverage Kunit and add Kunit test cases
   - Clean-ups
   - Fix typo

  cros_ec_commands:
   - Fix typo
   - Fix compile errors

  cros_kbd_led_backlight:
   - Support OF match
   - Support EC PWM backend

  cros_ec:
   - Always expose the last resume result to fix sleep hang detection on
     ARM-based chromebooks

  wilco_ec:
   - Fix typo

  cros_ec_typec:
   - Clean-ups
   - Use Type-C framework utilities to manage altmode structs"

* tag 'tag-chrome-platform-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (59 commits)
  platform/chrome: cros_kunit_util: add default value for `msg->result`
  platform/chrome: merge Kunit utils and test cases
  platform/chrome: cros_kbd_led_backlight: fix build warning
  platform/chrome: cros_ec_proto: add Kunit test for cros_ec_cmd()
  platform/chrome: cros_ec_proto: add Kunit tests for get_sensor_count
  platform/chrome: cros_ec_proto: add Kunit tests for check_features
  platform/chrome: cros_ec_proto: add Kunit tests for get_host_event
  platform/chrome: cros_ec_proto: add Kunit tests for get_next_event
  platform/chrome: cros_ec_proto: add Kunit test for cros_ec_map_error()
  platform/chrome: cros_ec_proto: add Kunit tests for cmd_xfer_status
  platform/chrome: cros_ec_proto: return -EPROTO if empty payload
  platform/chrome: cros_ec_proto: add Kunit test for empty payload
  platform/chrome: cros_ec_proto: return -EAGAIN when retries timed out
  platform/chrome: cros_ec_proto: change Kunit expectation when timed out
  platform/chrome: cros_ec_proto: separate cros_ec_wait_until_complete()
  platform/chrome: cros_ec_proto: separate cros_ec_xfer_command()
  platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_send_command()
  platform/chrome: cros_ec_proto: add Kunit tests for cros_ec_cmd_xfer()
  platform/chrome: cros_ec_proto: add "cros_ec_" prefix to send_command()
  platform/chrome: cros_ec_typec: Register port altmodes
  ...
2022-08-04 18:13:19 -07:00
Linus Torvalds 25e6bed5a6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32
Pull AVR32 updates from Hans-Christian Noren Egtvedt:
 "Mostly changes to documentation and comments"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/egtvedt/linux-avr32:
  video:backlight: remove reference to AVR32 architecture in ltv350qv
  video: remove support for non-existing atmel,at32ap-lcdc in atmel_lcdfb
  usb:udc: remove reference to AVR32 architecture in Atmel USBA Kconfig
  sound:spi: remove reference to AVR32 in Atmel AT73C213 DAC driver
  net: remove cdns,at32ap7000-macb device tree entry
  misc: update maintainer email address and description for atmel-ssc
  mfd: remove reference to AVR32 architecture in atmel-smc.c
  dma:dw: remove reference to AVR32 architecture in core.c
2022-08-04 15:20:39 -07:00
Linus Torvalds c1c76700a0 SPDX changes for 6.0-rc1
Here is the set of SPDX comment updates for 6.0-rc1.
 
 Nothing huge here, just a number of updated SPDX license tags and
 cleanups based on the review of a number of common patterns in GPLv2
 boilerplate text.  Also included in here are a few other minor updates,
 2 USB files, and one Documentation file update to get the SPDX lines
 correct.
 
 All of these have been in the linux-next tree for a very long time.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYupz3g8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynPUgCgslaf2ssCgW5IeuXbhla+ZBRAzisAnjVgOvLN
 4AKdqbiBNlFbCroQwmeQ
 =v1sg
 -----END PGP SIGNATURE-----

Merge tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx

Pull SPDX updates from Greg KH:
 "Here is the set of SPDX comment updates for 6.0-rc1.

  Nothing huge here, just a number of updated SPDX license tags and
  cleanups based on the review of a number of common patterns in GPLv2
  boilerplate text.

  Also included in here are a few other minor updates, two USB files,
  and one Documentation file update to get the SPDX lines correct.

  All of these have been in the linux-next tree for a very long time"

* tag 'spdx-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: (28 commits)
  Documentation: samsung-s3c24xx: Add blank line after SPDX directive
  x86/crypto: Remove stray comment terminator
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_406.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_398.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_391.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_390.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_385.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_320.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_319.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_318.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_298.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_292.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_179.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 2)
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_168.RULE (part 1)
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_160.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_152.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_149.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_147.RULE
  treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_133.RULE
  ...
2022-08-04 12:12:54 -07:00
Linus Torvalds 228dfe98a3 Char / Misc driver changes for 6.0-rc1
Here is the large set of char and misc and other driver subsystem
 changes for 6.0-rc1.
 
 Highlights include:
 	- large set of IIO driver updates, additions, and cleanups
 	- new habanalabs device support added (loads of register maps
 	  much like GPUs have)
 	- soundwire driver updates
 	- phy driver updates
 	- slimbus driver updates
 	- tiny virt driver fixes and updates
 	- misc driver fixes and updates
 	- interconnect driver updates
 	- hwtracing driver updates
 	- fpga driver updates
 	- extcon driver updates
 	- firmware driver updates
 	- counter driver update
 	- mhi driver fixes and updates
 	- binder driver fixes and updates
 	- speakup driver fixes
 
 Full details are in the long shortlog contents.
 
 All of these have been in linux-next for a while without any reported
 problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCYup9QQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ylBKQCfaSuzl9ZP9dTvAw2FPp14oRqXnpoAnicvWAoq
 1vU9Vtq2c73uBVLdZm4m
 =AwP3
 -----END PGP SIGNATURE-----

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

Pull char / misc driver updates from Greg KH:
 "Here is the large set of char and misc and other driver subsystem
  changes for 6.0-rc1.

  Highlights include:

   - large set of IIO driver updates, additions, and cleanups

   - new habanalabs device support added (loads of register maps much
     like GPUs have)

   - soundwire driver updates

   - phy driver updates

   - slimbus driver updates

   - tiny virt driver fixes and updates

   - misc driver fixes and updates

   - interconnect driver updates

   - hwtracing driver updates

   - fpga driver updates

   - extcon driver updates

   - firmware driver updates

   - counter driver update

   - mhi driver fixes and updates

   - binder driver fixes and updates

   - speakup driver fixes

  All of these have been in linux-next for a while without any reported
  problems"

* tag 'char-misc-6.0-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (634 commits)
  drivers: lkdtm: fix clang -Wformat warning
  char: remove VR41XX related char driver
  misc: Mark MICROCODE_MINOR unused
  spmi: trace: fix stack-out-of-bound access in SPMI tracing functions
  dt-bindings: iio: adc: Add compatible for MT8188
  iio: light: isl29028: Fix the warning in isl29028_remove()
  iio: accel: sca3300: Extend the trigger buffer from 16 to 32 bytes
  iio: fix iio_format_avail_range() printing for none IIO_VAL_INT
  iio: adc: max1027: unlock on error path in max1027_read_single_value()
  iio: proximity: sx9324: add empty line in front of bullet list
  iio: magnetometer: hmc5843: Remove duplicate 'the'
  iio: magn: yas530: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros
  iio: magnetometer: ak8974: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros
  iio: light: veml6030: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros
  iio: light: vcnl4035: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros
  iio: light: vcnl4000: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr() macros
  iio: light: tsl2591: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr()
  iio: light: tsl2583: Use DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr()
  iio: light: isl29028: Use DEFINE_RUNTIME_DEV_PM_OPS() and pm_ptr()
  iio: light: gp2ap002: Switch to DEFINE_RUNTIME_DEV_PM_OPS and pm_ptr()
  ...
2022-08-04 11:05:48 -07:00
Hans-Christian Noren Egtvedt 53291cb23c mfd: remove reference to AVR32 architecture in atmel-smc.c
The AVR32 architecture does no longer exist in the Linux kernel, hence
remove a reference to it in comments to avoid confusion.

Signed-off-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
2022-08-03 11:03:03 +02:00
Linus Torvalds 8fa0db3a9b ACPI updates for 5.20-rc1
- Use facilities provided by the driver core and some additional
    helpers to handle the children of a given ACPI device object in
    multiple places instead of using the children and node list heads in
    struct acpi_device which is error prone (Rafael Wysocki).
 
  - Fix ACPI-related device reference counting issue in the hisi_lpc bus
    driver (Yang Yingliang).
 
  - Drop the children and node list heads that are not needed any more
    from struct acpi_device (Rafael Wysocki).
 
  - Drop driver member from struct acpi_device (Uwe Kleine-König).
 
  - Drop redundant check from acpi_device_remove() (Uwe Kleine-König).
 
  - Prepare the CPPC library for handling backwards-compatible future
    _CPC return package formats gracefully (Rafael Wysocki).
 
  - Clean up the ACPI EC driver after previous changes in it (Hans
    de Goede).
 
  - Drop leftover acpi_processor_get_limit_info() declaration (Riwen
    Lu).
 
  - Split out thermal initialization from ACPI PSS (Riwen Lu).
 
  - Annotate more functions in the ACPI CPU idle driver to live in the
    cpuidle section (Guilherme G. Piccoli).
 
  - Fix _EINJ vs "special purpose" EFI memory regions (Dan Williams).
 
  - Implement a better fix to avoid spamming the console with old error
    logs (Tony Luck).
 
  - Fix typo in a comment in the APEI code (Xiang wangx).
 
  - Save NVS memory during transitions into S3 on Lenovo G40-45 (Manyi
    Li).
 
  - Add support for upcoming AMD uPEP device ID AMDI008 to the ACPI
    suspend-to-idle driver for x86 platforms (Shyam Sundar S K).
 
  - Clean up checks related to the ACPI_FADT_LOW_POWER_S0 platform flag
    in the LPIT table driver and the suspend-to-idle driver for x86
    platforms (Rafael Wysocki).
 
  - Print information messages regarding declared LPS0 idle support in
    the platform firmware (Rafael Wysocki).
 
  - Fix missing check in register_device_clock() in the ACPI driver for
    Intel SoCs (huhai).
 
  - Fix ACS setup in the VIOT table parser (Eric Auger).
 
  - Skip IRQ override on AMD Zen platforms where it's harmful (Chuanhong
    Guo).
 
  - Use native backlight on Dell Inspiron N4010 (Hans de Goede).
 
  - Use native backlight on some TongFang devices (Werner Sembach).
 
  - Drop X86 dependency from the ACPI backlight driver Kconfig (Riwen
    Lu).
 
  - Shorten the quirk list in the ACPI backlight driver by identifying
    Clevo by board_name only (Werner Sembach).
 
  - Remove useless NULL pointer checks from 2 ACPI PCI link management
    functions (Andrey Strachuk).
 
  - Fix obsolete example in the ACPI EINJ documentation (Qifu Zhang).
 
  - Update links and references to _DSD-related documents (Sudeep
    Holla).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmLoKr8SHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxOIoP/3mM3FKIXzHE0P3L9sY6vV470yeW8pA7
 /9SeZsswN872MuCO9J/EAINmgAk+HKOzJK4QUgYREwObagS5vPMAdYBRpGaNgBYg
 RPqoZIAaop6KZzhnzS3kE4luAEuIvTECSELLB5sRgcnLK16gf00RhOd/4jLW3Vdc
 LFUeh0Dubz+ZX9sD8jUh6+Z70nl0mJWQitT5JddqfiUxnMYAYmEqXA77NfVFSCLa
 UTQVBBAspdfT5tp0h4yUGYE3+cNXWRcZ/yx2UDIAcy4qjzzOZwYIOjzPJhkT8dE+
 7XTG2NpAqmsnEW9UCC9eJAG1X3c7X0yGJGj8XE2iqLBRqVvJcL7d/VNybFyj9odz
 zI3NLEBYsZP2d4wDGi1p2OwcmpftxQqfY62fe8yUEjsFA5HL0qu9iM+Xh9VgmiFA
 vPkT/7Fjx0chpMLwMXiSn/Olm79vVBu/tnjt64/BSsWDUlxQ5Hwx871Uq0nSJVoY
 gZazgbG/SFoPvDqe6n4UfOKtodgpvkVU1J6VFHGuLUEXquH7WdsypJMEvq3VQ8C0
 hgc3nDENx7on8iK+jyJOTbc5rNd8MZDDuAapst5BxPWFXZ/G9Td0jDzh0oea489I
 UTq0epp7oUhHpZMH0h+szIPMLxo+AnMKv8j7qWoy0qPpjer4B98h4szceFzHBbVZ
 uc8vA3EcO9UM
 =2/wJ
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
 "These rework the handling of ACPI device objects to use the driver
  core facilities for managing child ones instead of some questionable
  home-grown ways without the requisite locking and reference counting,
  clean up the EC driver, improve suspend-to-idle handling on x86, add
  some systems to the ACPI backlight quirk list, fix some assorted
  issues, clean up code and improve documentation.

  Specifics:

   - Use facilities provided by the driver core and some additional
     helpers to handle the children of a given ACPI device object in
     multiple places instead of using the children and node list heads
     in struct acpi_device which is error prone (Rafael Wysocki).

   - Fix ACPI-related device reference counting issue in the hisi_lpc
     bus driver (Yang Yingliang).

   - Drop the children and node list heads that are not needed any more
     from struct acpi_device (Rafael Wysocki).

   - Drop driver member from struct acpi_device (Uwe Kleine-König).

   - Drop redundant check from acpi_device_remove() (Uwe Kleine-König).

   - Prepare the CPPC library for handling backwards-compatible future
     _CPC return package formats gracefully (Rafael Wysocki).

   - Clean up the ACPI EC driver after previous changes in it (Hans de
     Goede).

   - Drop leftover acpi_processor_get_limit_info() declaration (Riwen
     Lu).

   - Split out thermal initialization from ACPI PSS (Riwen Lu).

   - Annotate more functions in the ACPI CPU idle driver to live in the
     cpuidle section (Guilherme G. Piccoli).

   - Fix _EINJ vs "special purpose" EFI memory regions (Dan Williams).

   - Implement a better fix to avoid spamming the console with old error
     logs (Tony Luck).

   - Fix typo in a comment in the APEI code (Xiang wangx).

   - Save NVS memory during transitions into S3 on Lenovo G40-45 (Manyi
     Li).

   - Add support for upcoming AMD uPEP device ID AMDI008 to the ACPI
     suspend-to-idle driver for x86 platforms (Shyam Sundar S K).

   - Clean up checks related to the ACPI_FADT_LOW_POWER_S0 platform flag
     in the LPIT table driver and the suspend-to-idle driver for x86
     platforms (Rafael Wysocki).

   - Print information messages regarding declared LPS0 idle support in
     the platform firmware (Rafael Wysocki).

   - Fix missing check in register_device_clock() in the ACPI driver for
     Intel SoCs (huhai).

   - Fix ACS setup in the VIOT table parser (Eric Auger).

   - Skip IRQ override on AMD Zen platforms where it's harmful
     (Chuanhong Guo).

   - Use native backlight on Dell Inspiron N4010 (Hans de Goede).

   - Use native backlight on some TongFang devices (Werner Sembach).

   - Drop X86 dependency from the ACPI backlight driver Kconfig (Riwen
     Lu).

   - Shorten the quirk list in the ACPI backlight driver by identifying
     Clevo by board_name only (Werner Sembach).

   - Remove useless NULL pointer checks from 2 ACPI PCI link management
     functions (Andrey Strachuk).

   - Fix obsolete example in the ACPI EINJ documentation (Qifu Zhang).

   - Update links and references to _DSD-related documents (Sudeep
     Holla)"

* tag 'acpi-5.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (46 commits)
  ACPI/PCI: Remove useless NULL pointer checks
  ACPI: CPPC: Do not prevent CPPC from working in the future
  ACPI: PM: x86: Print messages regarding LPS0 idle support
  ACPI: resource: skip IRQ override on AMD Zen platforms
  Documentation: ACPI: EINJ: Fix obsolete example
  ACPI: video: Use native backlight on Dell Inspiron N4010
  ACPI: PM: s2idle: Use LPS0 idle if ACPI_FADT_LOW_POWER_S0 is unset
  Revert "ACPI / PM: LPIT: Register sysfs attributes based on FADT"
  ACPI: video: Shortening quirk list by identifying Clevo by board_name only
  ACPI: video: Force backlight native for some TongFang devices
  ACPI: PM: s2idle: Add support for upcoming AMD uPEP HID AMDI008
  ACPI: VIOT: Fix ACS setup
  ACPI: bus: Drop unused list heads from struct acpi_device
  hisi_lpc: Use acpi_dev_for_each_child()
  bus: hisi_lpc: fix missing platform_device_put() in hisi_lpc_acpi_probe()
  ACPI: bus: Drop driver member of struct acpi_device
  ACPI: bus: Drop redundant check in acpi_device_remove()
  ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP
  ACPI: LPSS: Fix missing check in register_device_clock()
  ACPI: APEI: Better fix to avoid spamming the console with old error logs
  ...
2022-08-02 11:12:25 -07:00
Samuel Holland f33bae37c9 mfd: sun6i-prcm: Update Kconfig description
This driver is used by a specific range of SoCs between when the PRCM
hardware was introduced (A31) and when the PRCM CCU driver was added
(A83T). It is unlikely to be extended to additional hardware. Update
the description to include the full list of applicable SoCs.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220702184044.51144-1-samuel@sholland.org
2022-07-19 10:54:42 +01:00
Andy Shevchenko 0ff590a336 mfd: intel_soc_pmic_bxtwc: Fix spelling in the comment
There are a few of spelling issues in the comment, fix them.
While at it, fix indentation in the MODULE_AUTHOR() parameter
and update copyright years.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-11-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:42 +01:00
Andy Shevchenko 7c06d47850 mfd: intel_soc_pmic_bxtwc: Drop unneeded casting
The casting from size_t to ssize_t is not needed in addr_store(),
drop it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-10-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:42 +01:00
Andy Shevchenko 86da8be35c mfd: intel_soc_pmic_bxtwc: Use sysfs_emit() instead of sprintf()
sysfs_emit() is preferred over sprintf() when formatting the value to be
returned to user space in show() functions, because it knows about sysfs
buffer specifics and has sanity checks.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-9-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:42 +01:00
Andy Shevchenko f801556a84 mfd: intel_soc_pmic_bxtwc: Use bits.h macros for all masks
Currently we are using BIT(), but GENMASK(). Make use of the latter one
as well (far less error-prone, far more concise).

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-8-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:42 +01:00
Andy Shevchenko cd58c84034 mfd: intel_soc_pmic_bxtwc: Drop redundant ACPI_PTR()
The driver depends on ACPI (via MFD_INTEL_PMC_BXT), ACPI_PTR() resolution
is always the same. Otherwise a compiler may produce a warning.

That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or
none should be used in a driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-7-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:42 +01:00
Andy Shevchenko 05879b125a mfd: intel_soc_pmic_bxtwc: Switch from CONFIG_PM_SLEEP guards to pm_sleep_ptr() etc
Letting the compiler remove these functions when the kernel is built
without CONFIG_PM_SLEEP support is simpler and less error prone than the
use of #ifdef based kernel configuration guards.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-6-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:42 +01:00
Andy Shevchenko ba3ea04a25 mfd: intel_soc_pmic_bxtwc: Extend use of temporary variable for struct device
Extend use of temporary variable for struct device to make code neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-5-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:42 +01:00
Andy Shevchenko d30e2c30a4 mfd: intel_soc_pmic_bxtwc: Use dev_err_probe()
Simplify the mux error path a bit by using dev_err_probe().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-4-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:42 +01:00
Andy Shevchenko 2790a70c88 mfd: intel_soc_pmic_bxtwc: Convert to use platform_get/set_drvdata()
We have the specific helpers for platform device to set and get
its driver data. Convert driver to use them instead of open coded
variants.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-3-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:41 +01:00
Andy Shevchenko 929a4d289d mfd: intel_soc_pmic_bxtwc: Create sysfs attributes using core driver's facility
Driver core takes care of sysfs attributes. Use this facility instead of
doing it explicitly in ->probe() and ->remove().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-2-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:41 +01:00
Andy Shevchenko 5189952238 mfd: intel_soc_pmic_bxtwc: Don't shadow error codes in show()/store()
kstrtox() along with regmap API can return different error codes based on
circumstances.

Don't shadow them when returning to the caller.

While at it, remove rather confusing message from addr_store().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628221747.33956-1-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:41 +01:00
Andy Shevchenko 37e8ba74d1 mfd: intel-lpss: Add Intel Meteor Lake-P PCI IDs
Add Intel Meteor Lake-P LPSS PCI IDs.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220628223047.34301-1-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:41 +01:00
AngeloGioacchino Del Regno d9cd0bc604 mfd: mt6397: Add basic support for MT6331+MT6332 PMIC
Add support for the MT6331 PMIC with MT6332 Companion PMIC, found
in MT6795 Helio X10 smartphone platforms.

This combo has support for multiple devices but, for a start,
only the following have been implemented:
- Regulators (two instances, one in MT6331, one in MT6332)
- RTC (MT6331)
- Keys (MT6331)
- Interrupts (MT6331 also dispatches MT6332's interrupts)

There's more to be implemented, especially for MT6332, which
will come at a later stage.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220627123954.64299-1-angelogioacchino.delregno@collabora.com
2022-07-19 10:54:41 +01:00
Samuel Holland 371a9fcac4 mfd: axp20x: Add AXP221/AXP223/AXP809 GPIO cells
These PMICs all contain a compatible GPIO controller.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220616060915.48325-3-samuel@sholland.org
2022-07-19 10:54:41 +01:00
Jiang Jian 15ff0bbc3d mfd: db8500-prcmu: Drop duplicated word "the" in the comments
There is an unexpected word "the" in the comments that needs to be dropped.

Line 801: * This function sets the the operating point of the ARM.
                               -------

Signed-off-by: Jiang Jian <jiangjian@cdjrlc.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220621103839.96847-1-jiangjian@cdjrlc.com
2022-07-19 10:54:41 +01:00
Andy Shevchenko 1074c4252f mfd: intel_soc_pmic_chtwc: Switch from __maybe_unused to pm_sleep_ptr() etc
Letting the compiler remove these functions when the kernel is built
without CONFIG_PM_SLEEP support is simpler and less heavier for builds
than the use of __maybe_unused attributes.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220616171009.43524-2-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:40 +01:00
Andy Shevchenko 352de78076 mfd: intel_soc_pmic_chtwc: Use dev_err_probe()
Simplify the mux error path a bit by using dev_err_probe().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220616171009.43524-1-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:40 +01:00
Uwe Kleine-König c55333064d mfd: tc6393xb: Make disable callback return void
All implementations return 0, so simplify accordingly.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220619082655.53728-1-u.kleine-koenig@pengutronix.de
2022-07-19 10:54:40 +01:00
Andy Shevchenko 99a7ec2f36 mfd: dln2: Automatically detect and fill endpoint pointers
The usb_find_common_endpoints() finds and fills the endpoints
in accordance with their types. Use it to automatically detect
and fill endpoint pointers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220617182338.32402-1-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:40 +01:00
Lee Jones 915696927c mfd: pm8008: Remove driver data structure pm8008_data
Maintaining a local driver data structure that is never shared
outside of the core device is an unnecessary complexity.  Half of the
attributes were not used outside of a single function, one of which
was not used at all.  The remaining 2 are generic and can be passed
around as required.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
2022-07-19 10:54:40 +01:00
Uwe Kleine-König 4a346a03a6 mfd: twl: Remove platform data support
There is no in-tree machine that provides a struct twl4030_platform_data
since commit e92fc4f04a ("ARM: OMAP2+: Drop legacy board file for
LDP"). So assume dev_get_platdata() returns NULL in twl_probe() and
simplify accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220614152148.252820-1-u.kleine-koenig@pengutronix.de
2022-07-19 10:54:40 +01:00
Tinghan Shen 66ee379d74 mfd: cros_ec: Add SCP Core-1 as a new CrOS EC MCU
MT8195 System Companion Processors(SCP) is a dual-core RISC-V MCU.
Add a new CrOS feature ID to represent the SCP's 2nd core.

The 1st core is referred to as 'core 0', and the 2nd core is referred
to as 'core 1'.

Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220601112201.15510-16-tinghan.shen@mediatek.com
2022-07-19 10:54:39 +01:00
Fabien Parent 738654be3c mfd: mt6358-irq: Add MT6357 PMIC support
Add MT6357 PMIC IRQ support.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220531124959.202787-6-fparent@baylibre.com
2022-07-19 10:54:39 +01:00
Fabien Parent de58cee8c6 mfd: mt6397-core: Add MT6357 PMIC support
Adds support for PMIC keys, Regulator, and RTC for the MT6357 PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220531124959.202787-5-fparent@baylibre.com
2022-07-19 10:54:39 +01:00
Miaoqian Lin 1520669c82 mfd: max77620: Fix refcount leak in max77620_initialise_fps
of_get_child_by_name() returns a node pointer with refcount
incremented, we should use of_node_put() on it when not need anymore.
Add missing of_node_put() to avoid refcount leak.

Fixes: 327156c593 ("mfd: max77620: Add core driver for MAX77620/MAX20024")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220601043222.64441-1-linmq006@gmail.com
2022-07-19 10:54:39 +01:00
Andy Shevchenko 7ff7d5ffb7 syscon: Use %pa to format the variable of resource_size_t type
Instead of explicit casting, use %pa specifier to format
the variable of resource_size_t type.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220531202404.70282-1-andriy.shevchenko@linux.intel.com
2022-07-19 10:54:39 +01:00
Uwe Kleine-König 128ac294e1 mfd: t7l66xb: Drop platform disable callback
None of the in-tree instantiations of struct t7l66xb_platform_data
provides a disable callback. So better don't dereference this function
pointer unconditionally. As there is no user, drop it completely instead
of calling it conditional.

This is a preparation for making platform remove callbacks return void.

Fixes: 1f192015ca ("mfd: driver for the T7L66XB TMIO SoC")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220530192430.2108217-3-u.kleine-koenig@pengutronix.de
2022-07-19 10:54:38 +01:00
Uwe Kleine-König 2598f6ec54 mfd: asic3: Make asic3_gpio_remove() return void
Up to now asic3_gpio_remove() returns zero unconditionally. This makes it
easier to see in the caller that there is no error to handle.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220530192430.2108217-2-u.kleine-koenig@pengutronix.de
2022-07-19 10:54:38 +01:00
Luca Ceresoli 62fa5c9800 mfd: max77714: Update Luca Ceresoli's e-mail address
My Bootlin address is preferred from now on.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220603155727.1232061-4-luca@lucaceresoli.net
2022-07-19 10:54:38 +01:00
Lee Jones c1cd6c305e Merge branches 'ib-mfd-acpi-for-rafael-5.20', 'ib-mfd-edac-i2c-leds-pinctrl-platform-watchdog-5.20' and 'ib-mfd-soc-bcm-5.20' into ibs-for-mfd-merged 2022-07-19 10:53:48 +01:00
Uwe Kleine-König 7e55b33d3f gpio: ucb1400: Remove platform setup and teardown support
There is no user of these callbacks. The motivation for this change is
to stop returning an error code from the remove callback.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2022-07-19 09:56:51 +02:00
Greg Kroah-Hartman 2a3c8f8a44 IIO new device support, features and minor fixes for 5.20
Several on-running cleanup efforts dominate this time, plus the DMA
 safety alignment issue identified due to improved understanding of
 the restrictions as a result of Catalin Marinas' efforts in that area.
 
 One immutable branch in here due to MFD and SPMI elements needed for
 the qcom-rradc driver.
 
 Device support
 * bmi088
   - Add support for bmi085 (accelerometer part of IMU)
   - Add support for bmi090l (accelerometer part of IMU)
 * mcp4922
   - Add support for single channel device MCP4921
 * rzg2l-adc
   - Add compatible and minor tweaks to support RZ/G2UL ADC
 * sca3300
   - Add support for scl3300 including refactoring driver to support
     multiple device types and cleanup noticed whilst working on driver.
 * spmi-rradc
   - New driver for Qualcomm SPMI Round Robin ADC including necessary
     additional utility functions in SPMI core and related MFD driver.
 * ti-dac55781
   - Add compatible for DAC121C081 which is very similar to existing parts.
 
 Features
 * core
   - Warn on iio_trigger_get() on an unregistered IIO trigger.
 * bma400
   - Triggered buffer support
   - Activity and step counting
   - Misc driver improvements such as devm and header ordering
 * cm32181
   - Add PM support.
 * cros_ec
   - Sensor location support
 * sx9324
   - Add precharge resistor setting
   - Add internal compensation resistor setting
   - Add CS idle/sleep mode.
 * sx9360
   - Add precharge resistor setting
 * vl53l0x
   - Handle reset GPIO, regulator and relax handling of irq type.
 
 Cleanup and minor fixes:
 
 Treewide changes
 - Cleanup of error handling in remove functions in many drivers.
 - Update dt-binding maintainers for a number of ADI bindings.
 - Several sets of conversion of drivers from device tree specific to
   generic device properties. Includes fixing up various related
   header and Kconfig issues.
 - Drop include of of.h from iio.h and fix up drivers that need to include
   it directly.
 - More moves of clusters of drivers into appropriate IIO_XXX namespaces.
 - Tree wide fix of a long running bug around DMA safety requirements.
   IIO was using __cacheline_aligned to pad iio_priv() structures. This
   worked for a long time by coincidence, but correct alignment is
   ARCH_KMALLOC_MINALIGN.  As there is activity around this area, introduce
   an IIO local IIO_DMA_MINALIGN to allow for changing it in one place rather
   than every driver in future. Note, there have been no reports of this
   bug in the wild, and it may not happen on any platforms supported by
   upstream, so no rush to backport these fixes.
 
 Other cleanup
 * core
   - Switch to ida_alloc()/free()
   - Drop unused iio_get_time_res()
   - Octal permissions and DEVICE_ATTR_* macros.
   - Cleanup bared unsigned usage.
 * MAINTAINERS
   - Add include/dt-bindings/iio/ to the main IIO entry.
 * ad5380
   - Comment syntax fix.
 * ad74413r
   - Call to for_each_set_bit_from(), with from value as 0 replaced.
 * ad7768-1
   - Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core.
 * adxl345
   - Fix wrong address in dt-binding example.
 * adxl367
   - Drop extra update of FIFO watermark.
 * at91-sama5d2
   - Limit requested watermark to the hwfifo size.
 * bmg160, bme680
   - Typos
 * cio-dac
   - Switch to iomap rather than direct use of ioports
 * kxsd9
   - Replace CONFIG_PM guards with new PM macros that let the compiler
     cleanly remove the unused code and structures when !CONFIG_PM
 * lsm6dsx
   - Use new pm_sleep_ptr() and EXPORT_SIMPLE_DEV_PM_OPS(). Then move
     to Namespace.
 * meson_saradc - general cleanup.
   - Avoid attaching resources to iio_dev->dev
   - Use same struct device for all error messages
   - Convert to dev_err_probe() and use local struct device *dev to
     reduce code complexity.
   - Use devm_clk_get_optional() instead of hand rolling.
   - Use regmap_read_poll_timeout() instead of hand rolling.
 * mma7660
   - Drop ACPI_PTR() use that is unhelpful.
 * mpu3050
   - Stop exporting symbols not used outside of module
   - Switch to new DEFINE_RUNTIME_DEV_PM_OPS() macro and move to Namespace.
 * ping
   - Typo fix
 * qcom-spmi-rradc
   - Typo fix
 * sc27xx
   - Convert to generic struct u32_fract
 * srf08
   - Drop a redundant check on !val
 * st_lsm6dsx
   - Limit the requested watermark to the hwfifo size.
 * stm32-adc
   - Use generic_handle_domain_irq() instead of opencoding.
   - Fix handling of ADC disable.
 * stm32-dac
   - Use str_enabled_disable() instead of open coding.
 * stx104
   - Switch to iomap rather than direct use of ioports
 * tsc2046
   - Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core.
 * tsl2563
   - Replace flush_scheduled_work() with cancel_delayed_work_sync()
   - Replace cancel_delayed_work() with cancel_delayed_work_sync()
 * vl53l0x
   - Make the VDD regulator optional by allowing a dummy regulator.
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEbilms4eEBlKRJoGxVIU0mcT0FogFAmLQBwARHGppYzIzQGtl
 cm5lbC5vcmcACgkQVIU0mcT0FohMHRAAi3nPM3IchXe886olumRgX5ke75vU+FNT
 sqQjqlpl6X7j5yNLU+HF6lC7zg3QzDnfWJ3Uo4C7s2sW7zO0997lkFx4jvF3yW9y
 0nLDgYm1Y1te/qR84BE355pMEsYEJVZyPI/Z8UfuBh6IfnSDeTE5ZwCvlRMAchtp
 AX+j1114FQvZ8yfdIlFjlN4vYSxCGgEZzfWYhpch/Jv1y2Q0L17bpv/KWGt1AYaF
 VugmKoNTM3WzIABBNGWQ4l4ZVVuVpuiVUL90AKv6Qf+yDSqw94tuIM0NZpJ1rqLr
 7tH568m7Eewh7zBp88PRB9XDiZVERvzdVQaT22+wlX+Vhn/SKeoK8PPpdLWD1YyG
 hXB0p+FGKncoKKgK1w9L7qRRNmsQDHowNHYMSjnzeBuyGQyEqwAXzNvvbiCqHh8y
 7b8GW+CYo7//wIarg74Xl+/4LwdCGcMUJNuTm1efEgC7yGToY7JD63DNo3sylaII
 bfoT06/yogaay/rVLZs5n+MvDONaDt4AbTTErG48s0TzqD/O8Ys85AF0IvKwQ80N
 WMxe4y+gdJ6VuU+ww9+6WdUzxnx+5gt+ZA2iLxZFekOIUi3Tj+q47F+17Jvwyt7U
 2wQzdtvNhHPwD5CqYpxD4iH/z5YFCtIHKjmUsVyAWGVbeuSS/QvFzpf39YWxBWO+
 W1w6RStUbXo=
 =IcsE
 -----END PGP SIGNATURE-----

Merge tag 'iio-for-5.20a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into char-misc-next

Jonathan writes:

IIO new device support, features and minor fixes for 5.20

Several on-running cleanup efforts dominate this time, plus the DMA
safety alignment issue identified due to improved understanding of
the restrictions as a result of Catalin Marinas' efforts in that area.

One immutable branch in here due to MFD and SPMI elements needed for
the qcom-rradc driver.

Device support
* bmi088
  - Add support for bmi085 (accelerometer part of IMU)
  - Add support for bmi090l (accelerometer part of IMU)
* mcp4922
  - Add support for single channel device MCP4921
* rzg2l-adc
  - Add compatible and minor tweaks to support RZ/G2UL ADC
* sca3300
  - Add support for scl3300 including refactoring driver to support
    multiple device types and cleanup noticed whilst working on driver.
* spmi-rradc
  - New driver for Qualcomm SPMI Round Robin ADC including necessary
    additional utility functions in SPMI core and related MFD driver.
* ti-dac55781
  - Add compatible for DAC121C081 which is very similar to existing parts.

Features
* core
  - Warn on iio_trigger_get() on an unregistered IIO trigger.
* bma400
  - Triggered buffer support
  - Activity and step counting
  - Misc driver improvements such as devm and header ordering
* cm32181
  - Add PM support.
* cros_ec
  - Sensor location support
* sx9324
  - Add precharge resistor setting
  - Add internal compensation resistor setting
  - Add CS idle/sleep mode.
* sx9360
  - Add precharge resistor setting
* vl53l0x
  - Handle reset GPIO, regulator and relax handling of irq type.

Cleanup and minor fixes:

Treewide changes
- Cleanup of error handling in remove functions in many drivers.
- Update dt-binding maintainers for a number of ADI bindings.
- Several sets of conversion of drivers from device tree specific to
  generic device properties. Includes fixing up various related
  header and Kconfig issues.
- Drop include of of.h from iio.h and fix up drivers that need to include
  it directly.
- More moves of clusters of drivers into appropriate IIO_XXX namespaces.
- Tree wide fix of a long running bug around DMA safety requirements.
  IIO was using __cacheline_aligned to pad iio_priv() structures. This
  worked for a long time by coincidence, but correct alignment is
  ARCH_KMALLOC_MINALIGN.  As there is activity around this area, introduce
  an IIO local IIO_DMA_MINALIGN to allow for changing it in one place rather
  than every driver in future. Note, there have been no reports of this
  bug in the wild, and it may not happen on any platforms supported by
  upstream, so no rush to backport these fixes.

Other cleanup
* core
  - Switch to ida_alloc()/free()
  - Drop unused iio_get_time_res()
  - Octal permissions and DEVICE_ATTR_* macros.
  - Cleanup bared unsigned usage.
* MAINTAINERS
  - Add include/dt-bindings/iio/ to the main IIO entry.
* ad5380
  - Comment syntax fix.
* ad74413r
  - Call to for_each_set_bit_from(), with from value as 0 replaced.
* ad7768-1
  - Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core.
* adxl345
  - Fix wrong address in dt-binding example.
* adxl367
  - Drop extra update of FIFO watermark.
* at91-sama5d2
  - Limit requested watermark to the hwfifo size.
* bmg160, bme680
  - Typos
* cio-dac
  - Switch to iomap rather than direct use of ioports
* kxsd9
  - Replace CONFIG_PM guards with new PM macros that let the compiler
    cleanly remove the unused code and structures when !CONFIG_PM
* lsm6dsx
  - Use new pm_sleep_ptr() and EXPORT_SIMPLE_DEV_PM_OPS(). Then move
    to Namespace.
* meson_saradc - general cleanup.
  - Avoid attaching resources to iio_dev->dev
  - Use same struct device for all error messages
  - Convert to dev_err_probe() and use local struct device *dev to
    reduce code complexity.
  - Use devm_clk_get_optional() instead of hand rolling.
  - Use regmap_read_poll_timeout() instead of hand rolling.
* mma7660
  - Drop ACPI_PTR() use that is unhelpful.
* mpu3050
  - Stop exporting symbols not used outside of module
  - Switch to new DEFINE_RUNTIME_DEV_PM_OPS() macro and move to Namespace.
* ping
  - Typo fix
* qcom-spmi-rradc
  - Typo fix
* sc27xx
  - Convert to generic struct u32_fract
* srf08
  - Drop a redundant check on !val
* st_lsm6dsx
  - Limit the requested watermark to the hwfifo size.
* stm32-adc
  - Use generic_handle_domain_irq() instead of opencoding.
  - Fix handling of ADC disable.
* stm32-dac
  - Use str_enabled_disable() instead of open coding.
* stx104
  - Switch to iomap rather than direct use of ioports
* tsc2046
  - Drop explicit setting of INDIO_BUFFER_TRIGGERED as now done by the core.
* tsl2563
  - Replace flush_scheduled_work() with cancel_delayed_work_sync()
  - Replace cancel_delayed_work() with cancel_delayed_work_sync()
* vl53l0x
  - Make the VDD regulator optional by allowing a dummy regulator.

* tag 'iio-for-5.20a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (244 commits)
  iio: adc: xilinx-xadc: Drop duplicate NULL check in xadc_parse_dt()
  iio: adc: xilinx-xadc: Make use of device properties
  iio: light: cm32181: Add PM support
  iio: adc: ad778-1: do not explicity set INDIO_BUFFER_TRIGGERED mode
  iio: adc: ti-tsc2046: do not explicity set INDIO_BUFFER_TRIGGERED mode
  iio: adc: stm32-adc: disable adc before calibration
  iio: adc: stm32-adc: make safe adc disable
  iio: dac: ad5380: align '*' each line and drop unneeded blank line
  iio: adc: qcom-spmi-rradc: Fix spelling mistake "coherrency" -> "coherency"
  iio: Don't use bare "unsigned"
  dt-bindings: iio: dac: mcp4922: expand for mcp4921 support
  iio: dac: mcp4922: add support to mcp4921
  iio: chemical: sps30: Move symbol exports into IIO_SPS30 namespace
  iio: pressure: bmp280: Move symbol exports to IIO_BMP280 namespace
  iio: imu: bmi160: Move exported symbols to IIO_BMI160 namespace
  iio: adc: stm32-adc: Use generic_handle_domain_irq()
  proximity: vl53l0x: Make VDD regulator actually optional
  MAINTAINERS: add include/dt-bindings/iio to IIO SUBSYSTEM AND DRIVERS
  dt-bindings: iio/accel: Fix adi,adxl345/6 example I2C address
  iio: gyro: bmg160: Fix typo in comment
  ...
2022-07-14 15:04:49 +02:00
Tan Jui Nee 7064d7d88b mfd: lpc_ich: Add support for pinctrl in non-ACPI system
Add support for non-ACPI systems, such as system that uses
Advanced Boot Loader (ABL) whereby a platform device has to be created
in order to bind with pin control and GPIO.

At the moment, Intel Apollo Lake In-Vehicle Infotainment (IVI) system
requires a driver to hide and unhide P2SB to lookup P2SB BAR and pass
the PCI BAR address to GPIO.

Signed-off-by: Tan Jui Nee <jui.nee.tan@intel.com>
Co-developed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Henning Schild <henning.schild@siemens.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
2022-07-14 10:50:31 +01:00
Andy Shevchenko 559793198f mfd: lpc_ich: Switch to generic p2sb_bar()
Instead of open coding p2sb_bar() functionality we are going to
use generic library. There is one more user en route.

This is more than just a clean-up. It also fixes a potential issue
seen when SPI BAR is 64-bit. The current code works if and only if
the PCI BAR of the hidden device is inside 4G address space. In case
when firmware decides to go above 4G, we will get a wrong address.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Henning Schild <henning.schild@siemens.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
2022-07-14 10:50:25 +01:00
Andy Shevchenko 6e3b29dbc1 mfd: lpc_ich: Factor out lpc_ich_enable_spi_write()
Factor out duplicate code to lpc_ich_enable_spi_write() helper function.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Henning Schild <henning.schild@siemens.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee@kernel.org>
2022-07-14 10:50:14 +01:00
Stefan Wahren df76234276 mfd: bcm2835-pm: Add support for BCM2711
In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present
with the ISP and H264 bits, and V3D is in the same place in the new ASB
as the old one.

As per the devicetree bindings, BCM2711 will provide both the old and
new ASB resources, so get both of them and pass them into
'bcm2835-power,' which will take care of selecting which one to use
accordingly.

Since the RPiVid ASB's resources were being provided prior to formalizing
the bindings[1], also support the old DT files that didn't use
'reg-names.'

[1] See: 7dbe8c62ce ("ARM: dts: Add minimal Raspberry Pi 4 support")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220625113619.15944-8-stefan.wahren@i2se.com
2022-07-04 11:42:20 +01:00
Nicolas Saenz Julienne 01e7865d18 mfd: bcm2835-pm: Use 'reg-names' to get resources
If available in firmware, find resources by their 'reg-names' position
instead of relying on hardcoded offsets. Care is taken to support old
firmware nonetheless.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220625113619.15944-7-stefan.wahren@i2se.com
2022-07-04 11:41:27 +01:00
Rafael J. Wysocki 0c9b9c2ac0 mfd: core: Use acpi_dev_for_each_child()
Instead of walking the list of children of an ACPI device directly,
use acpi_dev_for_each_child() to carry out an action for all of
the given ACPI device's children.

This will help to eliminate the children list head from struct
acpi_device as it is redundant and it is used in questionable ways
in some places (in particular, locking is needed for walking the
list pointed to it safely, but it is often missing).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/2726954.BEx9A2HvPv@kreacher
2022-06-27 12:22:06 +01:00
Caleb Connolly d23c3c085a mfd: qcom-spmi-pmic: read fab id on supported PMICs
The PMI8998 and PM660 expose the fab_id, this is needed by drivers like
the RRADC to calibrate ADC values.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220429220904.137297-4-caleb.connolly@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-06-18 14:01:16 +01:00
Caleb Connolly e9c11c6e3a mfd: qcom-spmi-pmic: expose the PMIC revid information to clients
Some PMIC functions such as the RRADC need to be aware of the PMIC
chip revision information to implement errata or otherwise adjust
behaviour, export the PMIC information to enable this.

This is specifically required to enable the RRADC to adjust
coefficients based on which chip fab the PMIC was produced in,
this can vary per unique device and therefore has to be read at
runtime.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220429220904.137297-3-caleb.connolly@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-06-18 14:01:16 +01:00
Thomas Gleixner abd4627475 treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_319.RULE
Based on the normalized pattern:

    this program is free software you can redistribute it and/or modify it
    under the terms of the gnu general public license version 2 as
    published by the free software foundation  this program is distributed
    as is without any warranty of any kind whether expressed or implied
    without even the implied warranty of merchantability or fitness for a
    particular purpose see the gnu general public license version 2 for
    more details

extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

has been chosen to replace the boilerplate/reference.

Reviewed-by: Allison Randal <allison@lohutok.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10 14:51:36 +02:00
Thomas Gleixner 2aec85b26f treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2)
Based on the normalized pattern:

    this program is free software you can redistribute it and/or modify it
    under the terms of the gnu general public license as published by the
    free software foundation version 2  this program is distributed as is
    without any warranty of any kind whether express or implied without
    even the implied warranty of merchantability or fitness for a
    particular purpose see the gnu general public license for more details

extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

has been chosen to replace the boilerplate/reference.

Reviewed-by: Allison Randal <allison@lohutok.net>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-10 14:51:35 +02:00
Russ Weight 3f83b62a7b
mfd: intel-m10-bmc: Rename n3000bmc-secure driver
The n3000bmc-secure driver has changed to n3000bmc-sec-update. Update
the name in the list of the intel-m10-bmc sub-drivers.

Tested-by: Tianfei Zhang <tianfei.zhang@intel.com>
Signed-off-by: Russ Weight <russell.h.weight@intel.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220606160038.846236-2-russell.h.weight@intel.com
Signed-off-by: Xu Yilun <yilun.xu@intel.com>
2022-06-08 17:04:19 +08:00
Prashant Malani b1d288d9c3 platform/chrome: cros_ec_proto: Rename cros_ec_command function
cros_ec_command() is the name of a function as well as a struct, as such
it can confuse indexing tools (like ctags). Avoid this by renaming it to
cros_ec_cmd(). Update all the callsites to use the new name.

This patch is a find-and-replace, so should not introduce any functional
changes.

Suggested-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://lore.kernel.org/r/20220606201825.763788-3-pmalani@chromium.org
2022-06-08 08:14:53 +00:00
Linus Torvalds 96479c0980 ARM: multiplatform changes, part 2
The second part of the multiplatform changes now converts the
 Intel/Marvell PXA platform along with the rest. The patches went through
 several rebases before the merge window as bugs were found, so they
 remained separate.
 
 This has to touch a lot of drivers, in particular the touchscreen,
 pcmcia, sound and clk bits, to detach the driver files from the
 platform and board specific header files.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmKZKqsACgkQmmx57+YA
 GNnO/w//dgJBlkmoIIKlG2eJsvoUKwDt7MuLEMCqSqYYUSvMENFwKK66INMDIJ3l
 PmKf94JadlpBm2OB2vzW+D1EtaLGX9eXZkKD+vyB1I1yFkKdzEPcAfitfrRwe58E
 pR4nQd/jVL4UCY+pp442O1q9VvMpMV9P4ILJGPS/PpsD5CT9Gn8m9svIIuNuDRFd
 nwpyZC3l32jVLo9iuLmwZUvxtOWI3hTqZrnxhByBhlvtnGexRsq/VhfubK2uzBi1
 CyWHjqzOSmseGmsUDwv9LFqVV9YRCeisS3IElA5L0VgM0XvHKA+f9qyF7V6zI20g
 y9LtqhdAtiTpE/aUrOW2LDYaM/bc7RilYZrWchoZbCEsHhV4C+ld3QoTyxvGscvG
 tbznhvZKdUNX8LHS0J9NqIj1q1YGN5ei5r/C5R8DBj1q8VcTVnq3dms8xzVTd35o
 xS5BbLFliiI96jc7S6LaQizXheYjAfdPhmXUAxNXvWIVQ6SXnf8/U/RB9Zzjb8hm
 FH2Gu8m/Dh2MHKBBRWSVw8VahV0V7WiEaWeYuwwTbW1wUrsWiizVaPnqrt6Cq9DW
 oJZgBvktWEXUQz73qrnvwo9GjcKqAxaWKWq05hHKHKuLGezsPAyIhIKr51V2xqqw
 cp2OIMCsN5GYENOhHvt6BMRAI5iA4VyFDtWAqw9B6EIwno6N7Z4=
 =cnSb
 -----END PGP SIGNATURE-----

Merge tag 'arm-multiplatform-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull more ARM multiplatform updates from Arnd Bergmann:
 "The second part of the multiplatform changes now converts the
  Intel/Marvell PXA platform along with the rest. The patches went
  through several rebases before the merge window as bugs were found, so
  they remained separate.

  This has to touch a lot of drivers, in particular the touchscreen,
  pcmcia, sound and clk bits, to detach the driver files from the
  platform and board specific header files"

* tag 'arm-multiplatform-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (48 commits)
  ARM: pxa/mmp: remove traces of plat-pxa
  ARM: pxa: convert to multiplatform
  ARM: pxa/sa1100: move I/O space to PCI_IOBASE
  ARM: pxa: remove support for MTD_XIP
  ARM: pxa: move mach/*.h to mach-pxa/
  ARM: PXA: fix multi-cpu build of xsc3
  ARM: pxa: move plat-pxa to drivers/soc/
  ARM: mmp: rename pxa_register_device
  ARM: mmp: remove tavorevb board support
  ARM: pxa: remove unused mach/bitfield.h
  ARM: pxa: move clk register definitions to driver
  ARM: pxa: move smemc register access from clk to platform
  cpufreq: pxa3: move clk register access to clk driver
  ARM: pxa: remove get_clk_frequency_khz()
  ARM: pxa: pcmcia: move smemc configuration back to arch
  ASoC: pxa: i2s: use normal MMIO accessors
  ASoC: pxa: ac97: use normal MMIO accessors
  ASoC: pxa: use pdev resource for FIFO regs
  Input: wm97xx - get rid of irq_enable method in wm97xx_mach_ops
  Input: wm97xx - switch to using threaded IRQ
  ...
2022-06-02 15:23:54 -07:00
Uwe Kleine-König ade0642d7d mfd: rt4831: Improve error reporting for problems during .remove()
Returning an error value in an i2c remove callback results in a generic
error message being emitted by the i2c core, but otherwise it doesn't make
a difference. The device goes away anyhow and the devm cleanups are
called.

So instead of triggering the generic i2c error message, emit a more helpful
message if a problem occurs and return 0 to suppress the generic message.

This patch is a preparation for making i2c remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220502191012.53259-1-u.kleine-koenig@pengutronix.de
2022-05-23 15:08:04 +01:00
Yang Yingliang 311242c770 mfd: davinci_voicecodec: Fix possible null-ptr-deref davinci_vc_probe()
It will cause null-ptr-deref when using 'res', if platform_get_resource()
returns NULL, so move using 'res' after devm_ioremap_resource() that
will check it to avoid null-ptr-deref.
And use devm_platform_get_and_ioremap_resource() to simplify code.

Fixes: b5e29aa880 ("mfd: davinci_voicecodec: Remove pointless #include")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220426030857.3539336-1-yangyingliang@huawei.com
2022-05-23 14:52:45 +01:00
Gaggery Tsai eeb0a442da mfd: intel-lpss: Add support for ADL-P i2c6 and i2c7
Added 8086:51d8 and 8086:51d9 to the intel_lpss_pci driver. They are
Intel Alder Lake-P i2c controllers.

Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220520193537.26090-1-gaggery.tsai@intel.com
2022-05-23 14:08:45 +01:00
Linus Walleij 813c2aee51 ARM/pxa/mfd/power/sound: Switch Tosa to GPIO descriptors
The Tosa device (Sharp SL-6000) has a mishmash driver set-up
for the Toshiba TC6393xb MFD that includes a battery charger
and touchscreen and has some kind of relationship to the SoC
sound driver for the AC97 codec. Other devices define a chip
like this but seem only half-implemented, not really handling
battery charging etc.

This patch switches the Toshiba MFD device to provide GPIO
descriptors to the battery charger and SoC codec. As a result
some descriptors need to be moved out of the Tosa boardfile
and new one added: all SoC GPIO resources to these drivers
now comes from the main boardfile, while the MFD provide
GPIOs for its portions.

As a result we can request one GPIO from our own GPIO chip
and drop two hairy callbacks into the board file.

This platform badly needs to have its drivers split up and
converted to device tree probing to handle this quite complex
relationship in an orderly manner. I just do my best in solving
the GPIO descriptor part of the puzzle. Please don't ask me
to fix everything that is wrong with these driver to todays
standards, I am just trying to fix one aspect. I do try to
use modern devres resource management and handle deferred
probe using new functions where appropriate.

Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Dirk Opfer <dirk@opfer-online.de>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Reviewed-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:55:33 +02:00
Uwe Kleine-König 724c3be3db mfd: twl4030: Make twl4030_exit_irq() return void
If twl4030_exit_irq() returns an error, the effect is that the caller
(twl_remove()) forwards the error to the i2c core without unregistering
its dummy slave devices. This only makes the i2c core emit another
error message and then it still removes the device.

In this situation it doesn't make sense to abort the remove cleanup and not
unregister the slave devices. So do that. Then return value is actually
unused and twl4030_exit_irq() can better be changed to return no value at
all.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220113101430.12869-3-u.kleine-koenig@pengutronix.de
2022-04-28 17:24:40 +01:00
Uwe Kleine-König b6f2943182 mfd: twl6030: Make twl6030_exit_irq() return void
This function returns 0 unconditionally, so there is no benefit in
returning a value at all and make the caller do error checking.

Also the caller (twl_remove()) cannot do anything sensible with an error
code. Passing it up the call stack isn't a good option because the i2c core
ignores error codes (apart from emitting an error message).

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220113101430.12869-2-u.kleine-koenig@pengutronix.de
2022-04-28 17:24:10 +01:00
Cixi Geng d95ab6d2af mfd: sprd: Jugle {of,spi}_device_id tables into numerical order
Ordered with the smallest number at the top.

Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220427075212.3409407-1-gengcixi@gmail.com
2022-04-27 10:33:11 +01:00
Cixi Geng 875709f978 mfd: sprd: Add SC2730 PMIC to SPI device ID table
Add the SC2730 PMIC support for module autoloading
through SPI modalises.

Signed-off-by: Cixi Geng <cixi.geng1@unisoc.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220425132410.2708304-1-gengcixi@gmail.com
2022-04-27 08:36:48 +01:00
Stephen Boyd ff23a46e46 mfd: cros_ec_dev: Only register PCHG device if present
Don't create a device for the peripheral charger (PCHG) if there aren't
any peripheral charger ports. This removes a device on most ChromeOS
systems, because the peripheral charger functionality isn't always
present.

Cc: Prashant Malani <pmalani@chromium.org>
Cc: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: Daisuke Nojiri <dnojiri@chromium.org>
Cc: Benson Leung <bleung@chromium.org>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: <chrome-platform@lists.linux.dev>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Prashant Malani <pmalani@chromium.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220419000408.3202635-1-swboyd@chromium.org
2022-04-26 19:23:24 +01:00
Fabien Parent 4a901e3050 mfd: mt6397-core: Add resources for PMIC keys for MT6359
Add the MFD resources in order to be able to probe and use the keyboard
driver for the MT6359 PMIC.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220415153629.1817202-4-fparent@baylibre.com
2022-04-26 19:23:19 +01:00
Lv Ruyi 3b49ae380c mfd: ipaq-micro: Fix error check return value of platform_get_irq()
platform_get_irq() return negative value on failure, so null check of
irq is incorrect. Fix it by comparing whether it is less than zero.

Fixes: dcc21cc09e ("mfd: Add driver for Atmel Microcontroller on iPaq h3xxx")
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220412085305.2533030-1-lv.ruyi@zte.com.cn
2022-04-26 15:12:22 +01:00
Maíra Canal 7f5aaa4a0a mfd: hi655x-pmic: Replace legacy gpio interface for gpiod interface
Considering the current transition of the GPIO subsystem, remove all
dependencies of the legacy GPIO interface (linux/gpio.h and linux
/of_gpio.h) and replace it with the descriptor-based GPIO approach.

Signed-off-by: Maíra Canal <maira.canal@usp.br>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/Yk2maZuf+5FGL+eg@fedora
2022-04-26 15:10:29 +01:00
Linus Torvalds 8350e8331b - New Drivers
- Add support for Maxim MAX77714 PMIC
 
  - Remove Drivers
    - Remove support for ST-Ericsson AB8500 DebugFS
 
  - New Device Support
    - Add support for Silergy SY7636A to Simple MFD I2C
    - Add support for MediaTek MT6366 PMIC to MT6358 IRQ
    - Add support for Charger to Intel PMIC CRC
    - Add support for Raptor Lake to Intel LPSS PCI
 
  - New Functionality
    - Add support for Reboot to Rockchip RK808
 
  - Fix-ups
    - Device Tree changes (inc. YAML conversion); silergy,sy7636a, maxim,max77843,
                                   google,cros-ec, maxim,max14577, maxim,max77802,
 				  maxim,max77714, qcom,tcsr, qcom,spmi-pmic,
 				  stericsson,ab8500, stericsson,db8500-prcmu,
 				  samsung,exynos5433-lpass, mt6397, syscon, brcm,cru
    - Visible to menuconfig; simple-mfd-i2c
    - Clean-up or clarify code; max77686, intel_soc_pmic_crc
    - Improve error handling; mc13xxx-core, stmfx, asic3
    - Pass device information to child devices; iqs62x, intel-lpss-acpi
    - Individually identify IRQ domains; intel_soc_pmic_core
    - Remove superfluous code; dbx500-prcmu, exynos-lpass
    - Staticify and constify; arizona-i2c
    - Mark sometimes used data as __maybe_unused; atmel-flexcom
    - Account for different ACPI tables on AOSP/Windows platforms; arizona-spi
    - Use provided (platform) APIs; ab8500-core
    - Trivial (whitespace, spelling); rohm-bd9576
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmI9n1YACgkQUa+KL4f8
 d2F59RAAi3zTun+i7NEvaPs4awcXgUv9ZFJmP/AcCTvKwmAnom4JHc56c86yE/Fz
 IwQ/yug60AQPMe05jw4+KxD87URLGKb/IDTzmRvnC29gwg1FR5A2bFNJ+wveK6od
 cN0r40lvHCzVASwOeF2E63RzXcWHFg+tuNq6qm+HQ6LX31MpMe/dfMOCvVm+1A50
 aOn2cnEiUw7mhEiEy0CPtd01hjBEu4QS8xzZwGu/4lHEbInDxpAakQP8ixYE0THF
 KEvR2gFS6G6wYHO3ZQOJHQJnnzL1nmLtsUX3q+5+DIKnLcY/1xofdxloHAH18i+9
 8e9nDB4TVPAHCpiSVFmPtzS7TR5ofkaYIvpxKlolBVgXGkAivYrtcQUMPEG6ZbNL
 wpe6j2IB7EeQeh0z8k9mzr6zZ3Dw5EGcytvAMP3SZAsHpy+uiZ0TOqPdFs1NXLJ7
 7rlpUhlgn2Ar5TI+z5DLeZsKSO8Lb9+X6BlXfblT0dNBclmh52suWwp1yx7hCehD
 mFm7JfkU7+/9XlzkxYqyyl/3qmmuiXfrxf5Uc96kwcczFkXli8z2Q5Jli6dmCq5+
 LE9hkLk6JC5m5QpRv8cg06sHraDbPbTnrrhf5w6txukU+HsldxcQNaJMqLhHCPQ4
 CUYWRImr0no8PJZQkslIgWaqkpQejS5UzPQbFnkQblvP2XMvOFU=
 =1xnI
 -----END PGP SIGNATURE-----

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

Pull MFD updates from Lee Jones:
 "New Drivers:
   - Add support for Maxim MAX77714 PMIC

  Removed Drivers:
   - Remove support for ST-Ericsson AB8500 DebugFS

  New Device Support:
   - Add support for Silergy SY7636A to Simple MFD I2C
   - Add support for MediaTek MT6366 PMIC to MT6358 IRQ
   - Add support for Charger to Intel PMIC CRC
   - Add support for Raptor Lake to Intel LPSS PCI

  New Functionality:
   - Add support for Reboot to Rockchip RK808

  Fix-ups:
   - Device Tree changes (includcing YAML conversion) for
     silergy,sy7636a, maxim,max77843, google,cros-ec, maxim,max14577,
     maxim,max77802, maxim,max77714, qcom,tcsr, qcom,spmi-pmic,
     stericsson,ab8500, stericsson,db8500-prcmu,
     samsung,exynos5433-lpass, mt6397, syscon, brcm,cru
   - Visible to menuconfig; simple-mfd-i2c
   - Clean-up or clarify code; max77686, intel_soc_pmic_crc
   - Improve error handling; mc13xxx-core, stmfx, asic3
   - Pass device information to child devices; iqs62x, intel-lpss-acpi
   - Individually identify IRQ domains; intel_soc_pmic_core
   - Remove superfluous code; dbx500-prcmu, exynos-lpass
   - Staticify and constify; arizona-i2c
   - Mark sometimes used data as __maybe_unused; atmel-flexcom
   - Account for different ACPI tables on AOSP/Windows platforms; arizona-spi
   - Use provided (platform) APIs; ab8500-core
   - Trivial (whitespace, spelling); rohm-bd9576"

* tag 'mfd-next-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (50 commits)
  dt-bindings: mfd: syscon: Add microchip,lan966x-cpu-syscon compatible
  mfd: bd9576: fix typos in comments
  mfd: Use platform_get_irq() to get the interrupt
  mfd: db8500-prcmu: Remove unused inline function
  mfd: arizona-spi: Add Android board ACPI table handling
  mfd: arizona-spi: Split Windows ACPI init code into its own function
  mfd: asic3: Add missing iounmap() on error asic3_mfd_probe
  MAINTAINERS: Rectify entry for ROHM MULTIFUNCTION BD9571MWV-M PMIC DEVICE DRIVERS
  mfd: intel-lpss: Provide an SSP type to the driver
  dt-bindings: mfd: brcm,cru: Rename pinctrl node
  dt-bindings: Add compatibles for undocumented trivial syscons
  mfd: atmel-flexcom: Fix compilation warning
  dt-bindings: mfd: Add compatible for the MediaTek MT6366 PMIC
  dt-bindings: mfd: samsung,exynos5433-lpass: Convert to dtschema
  mfd: exynos-lpass: Drop unneeded syscon.h include
  mfd: intel-lpss: Add Intel Raptor Lake PCH-S PCI IDs
  mfd: ab8500: Drop debugfs module
  mfd: sta2x11: Use GFP_KERNEL instead of GFP_ATOMIC
  mfd: ab8500: Rewrite bindings in YAML
  mfd: qcom-spmi-pmic: Add pm8953 compatible
  ...
2022-03-25 13:56:18 -07:00
Linus Torvalds 8eb48fc7c5 power supply and reset changes for the v5.18 series
power-supply core:
  - Introduce "Bypass" charging type used by USB PPS standard
  - Refactor power_supply_set_input_current_limit_from_supplier()
  - Add fwnode support to power_supply_get_battery_info()
 
 Drivers:
  - ab8500: continue migrating towards using standard core APIs
  - axp288 fuel-gauge: refactor driver to be fully resource managed
  - battery-samsung-sdi: new in-kernel provider for (constant) Samsung battery info
  - bq24190: disable boost regulator on shutdown
  - bq24190: add support for battery-info on ACPI based systems
  - bq25890: prepare driver for usage on ACPI based systems
  - bq25890: add boost regulator support
  - cpcap-battery: add NVMEM based battery detection support
  - injoinic ip5xxx: new driver for power bank IC
  - upi ug3105: new battery driver
  - misc. small improvements and fixes
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmI4ub0ACgkQ2O7X88g7
 +poBBg/+OTb2O+dJsigwT9q2HKz98oPSwd+Zd0L/s1hCtc4AhlsNPHimEOYslvOl
 WN3auTQO1rjB4gi73p9A5NKTiAMTnXuCXoY0pLRgkcKybHGzliDqPY99Em1VqLHT
 OdJ+xG1qdk34T5hLW6ZfHV1VlB1J6u/JZbXyGbBzZ2r1mP3sLpWCW87cRTuBpaXD
 vmdWBRhYdz47pJS0PQs4TI7nFWoCvLB6Hmqe79zTI4hgRkKS05XeU3HXu+npdtdS
 2OmPKwVcHIeuI3blTvtn7pHiX1j4Le319mmlOtwtdeEr70ONng9p2L6GPhW88ewH
 1AZG58V6hFInMKKVHBbftEHybZ7wEc9CmjQ+l6VVdwHAgWwQEijsY3aG+fQ41Yw/
 x1IRMMv5SO0A2amZ+mMxmIs7aQ0OXe78n8DiDPnhSWdh7q7+KgzXlBawmWDEZ9LZ
 HUcfDOQ+EISfg9F81Q7KKVDsSClUk2zIVbs944Y/4emT78XQjPq/NPlLpfwy0kMC
 46lIO5prhWqe8WXtqkyR7x04nkrzo9Q/yWuj959l+bYACAtns8zQNZ+f8O2TvJ7V
 Is2DoaT5fELUD2D8NOla5RYZAtPzkfDf3iaNOLG7mkzGuz1RPcn3mgl0+a760AiZ
 poNmjfaKlY0d1WHc8AoxZgoKZxDZ3ckjAt8YzI/QT0RXEvoBEtY=
 =OiYc
 -----END PGP SIGNATURE-----

Merge tag 'for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply

Pull power supply and reset updates from Sebastian Reichel:
 "Power-supply core:

   - Introduce "Bypass" charging type used by USB PPS standard

   - Refactor power_supply_set_input_current_limit_from_supplier()

   - Add fwnode support to power_supply_get_battery_info()

  Drivers:

   - ab8500: continue migrating towards using standard core APIs

   - axp288 fuel-gauge: refactor driver to be fully resource managed

   - battery-samsung-sdi: new in-kernel provider for (constant) Samsung
     battery info

   - bq24190: disable boost regulator on shutdown

   - bq24190: add support for battery-info on ACPI based systems

   - bq25890: prepare driver for usage on ACPI based systems

   - bq25890: add boost regulator support

   - cpcap-battery: add NVMEM based battery detection support

   - injoinic ip5xxx: new driver for power bank IC

   - upi ug3105: new battery driver

   - misc small improvements and fixes"

* tag 'for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (94 commits)
  power: ab8500_chargalg: Use CLOCK_MONOTONIC
  power: supply: Add a driver for Injoinic power bank ICs
  dt-bindings: trivial-devices: Add Injoinic power bank ICs
  dt-bindings: vendor-prefixes: Add Injoinic
  power: supply: ab8500: Remove unused variable
  power: supply: da9150-fg: Remove unnecessary print function dev_err()
  power: supply: ab8500: fix a handful of spelling mistakes
  power: supply: ab8500_fg: Account for line impedance
  dt-bindings: power: supply: ab8500_fg: Add line impedance
  power: supply: axp20x_usb_power: fix platform_get_irq.cocci warnings
  power: supply: axp20x_ac_power: fix platform_get_irq.cocci warning
  power: supply: wm8350-power: Add missing free in free_charger_irq
  power: supply: wm8350-power: Handle error for wm8350_register_irq
  power: supply: Static data for Samsung batteries
  power: supply: ab8500_fg: Use VBAT-to-Ri if possible
  power: supply: Support VBAT-to-Ri lookup tables
  power: supply: ab8500: Standardize BTI resistance
  power: supply: ab8500: Standardize alert mode charging
  power: supply: ab8500: Standardize maintenance charging
  power: supply: bq24190_charger: Delay applying charge_type changes when OTG 5V Vbus boost is on
  ...
2022-03-25 13:31:02 -07:00
Julia Lawall def387a239 mfd: bd9576: fix typos in comments
Various spelling mistakes in comments.
Detected with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220314115354.144023-29-Julia.Lawall@inria.fr
2022-03-23 14:51:51 +00:00
Minghao Chi (CGEL ZTE) fc832ac987 mfd: Use platform_get_irq() to get the interrupt
It is not recommened to use platform_get_resource(pdev, IORESOURCE_IRQ)
for requesting IRQ's resources any more, as they can be not ready yet in
case of DT-booting.

platform_get_irq() instead is a recommended way for getting IRQ even if
it was not retrieved earlier.

It also makes code simpler because we're getting "int" value right away
and no conversion from resource to int is required.

The print function dev_err() is redundant because platform_get_irq()
already prints an error.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220309035607.2080884-1-chi.minghao@zte.com.cn
2022-03-23 14:51:51 +00:00
Hans de Goede 9ed55e9ac5 mfd: arizona-spi: Add Android board ACPI table handling
x86/ACPI boards with an arizona WM5102 codec ship with either Windows or
Android as factory installed OS.

The ACPI fwnode for the codec on Android boards misses 2 things compared
to the Windows boards (this is hardcoded in the Android board kernels):

1. There is no CLKE ACPI method to enabe the 32 KHz clock the codec needs
   for jack-detection.

2. The GPIOs used by the codec are not listed in the fwnode for the codec.

The ACPI tables on x86/ACPI boards shipped with Android being incomplete
happens a lot. The special drivers/platform/x86/x86-android-tablets.c
module contains DMI based per model handling to compensate for this.

This module will enable the 32KHz clock through the pinctrl framework
to fix 1. and it will also register a gpio-lookup table for all GPIOs
needed by the codec + machine driver, including the GPIOs coming from
the codec itself.

Add an arizona_spi_acpi_android_probe() function which waits for the
x86-android-tablets to have set things up before continue with probing
the arizona WM5102 codec.

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220307173844.199135-2-hdegoede@redhat.com
2022-03-23 14:51:51 +00:00
Hans de Goede 3cf2b4344b mfd: arizona-spi: Split Windows ACPI init code into its own function
x86/ACPI boards with an arizona WM5102 codec ship with either Windows or
Android as factory installed OS.

The ACPI fwnode describing the codec differs depending on the factory OS,
and the current arizona_spi_acpi_probe() function is tailored for use
with the Windows board ACPI tables.

Split out the Windows board ACPI tables specific bits into a new
arizona_spi_acpi_windows_probe() function in preparation for also
adding support for the Android board ACPI tables.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220307173844.199135-1-hdegoede@redhat.com
2022-03-23 14:51:50 +00:00
Miaoqian Lin e84ee1a75f mfd: asic3: Add missing iounmap() on error asic3_mfd_probe
Add the missing iounmap() before return from asic3_mfd_probe
in the error handling case.

Fixes: 64e8867ba8 ("mfd: tmio_mmc hardware abstraction for CNF area")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220307072947.5369-1-linmq006@gmail.com
2022-03-23 14:51:50 +00:00
Andy Shevchenko 5a2d27c283 mfd: intel-lpss: Provide an SSP type to the driver
The SPI driver wants to know the exact type of the controller.
Provide this information to it, hence it allows to fix the
Intel Cannon Lake and others in the future.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20220301205056.79810-1-andriy.shevchenko@linux.intel.com
2022-03-23 14:51:44 +00:00