Commit 3ea172c8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull MFD updates from Lee Jones:
 "New Drivers
   - Add support for USART SPI to AT91*

  New Functionality
   - Add support for Audio CODECs to motorola-cpcap

  Fix-ups
   - DT documentation fix-ups; atmel-usart
   - Staticise functions/structs; spi-at91-usart, arizona-core
   - Constify; ti-lmu
   - Fix memory leaks; menelaus
   - Change device 'wake-up' status; ti_am335x_tscadc, max8997
   - Power Management (suspend/resume) semantic changes; ti_am335x_adc, cros_ec, max8997
   - SPDX churn; sec-core (+ headers), max* (+ headers), intel* (+ headers),
   - Trivial (whitespace, email addresses, alphabetisise); Kconfig, adp5520, intel_soc_pmic_*
   - Build as module; sec-irq
   - Use new %pOFn printk format for device_node.name; max77620
   - Remove unused code; madera
   - Use generic MACROs; intel_msic, intel_soc_pmic_crc
   - Move to GPIOD; ti-lmu
   - Use managed resources; ti-lmu

  Bug Fixes
   - Add missing headers; at91-usart
   - Prevent device from entering low-power mode; arizona-core
   - Poll for BOOT_DONE to avoid still-booting NACK; madera-core
   - Prevent ADC read from shutting down device; mc13xxx-core"

* tag 'mfd-next-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits)
  mfd: cros_ec: Avoid unneeded internal declaration warning
  mfd: ti-lmu: Use of_device_get_match_data() helper
  mfd: ti-lmu: Use managed resource for everything
  mfd: ti-lmu: Switch to GPIOD
  mfd: ti-lmu: constify mfd_cell tables
  mfd: max8997: Disable interrupt handling for suspend/resume cycle
  mfd: max8997: Enale irq-wakeup unconditionally
  mfd: arizona: Make array mclk_name static, shrinks object size
  MAINTAINERS: Add myself as designated reviewer of Intel MFD PMIC
  mfd: Convert Intel PMIC drivers to use SPDX identifier 1;5201;0c Reduce size of duplicated comments by switching to use SPDX identifier.
  mfd: Sort headers alphabetically for Intel PMIC drivers
  mfd: intel_soc_pmic_bxtwc: Chain power button IRQs as well
  mfd: intel_soc_pmic_crc: Use REGMAP_IRQ_REG() macro
  mfd: intel_soc_pmic_crc: Use DEFINE_RES_IRQ_NAMED() macro
  mfd: intel_msic: Use DEFINE_RES_IRQ() macro
  mfd: motorola-cpcap: Add audio-codec support
  mfd: mc13xxx-core: Fix PMIC shutdown when reading ADC values
  mfd: madera: Remove unused forward reference
  mfd: max77620: Convert to using %pOFn instead of device_node.name
  mfd: madera: Don't use regmap_read_poll_timeout to poll for BOOT_DONE
  ...
parents 01aa9d51 6eb35784
Loading
Loading
Loading
Loading
+23 −2
Original line number Diff line number Diff line
* Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)

Required properties:
Required properties for USART:
- compatible: Should be "atmel,<chip>-usart" or "atmel,<chip>-dbgu"
  The compatible <chip> indicated will be the first SoC to support an
  additional mode or an USART new feature.
@@ -11,7 +11,13 @@ Required properties:
	Required elements: "usart"
- clocks: phandles to input clocks.

Optional properties:
Required properties for USART in SPI mode:
- #size-cells      : Must be <0>
- #address-cells   : Must be <1>
- cs-gpios: chipselects (internal cs not supported)
- atmel,usart-mode : Must be <AT91_USART_MODE_SPI> (found in dt-bindings/mfd/at91-usart.h)

Optional properties in serial mode:
- atmel,use-dma-rx: use of PDC or DMA for receiving data
- atmel,use-dma-tx: use of PDC or DMA for transmitting data
- {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD line respectively.
@@ -62,3 +68,18 @@ Example:
		dma-names = "tx", "rx";
		atmel,fifo-size = <32>;
	};

- SPI mode:
	#include <dt-bindings/mfd/at91-usart.h>

	spi0: spi@f001c000 {
		#address-cells = <1>;
		#size-cells = <0>;
		compatible = "atmel,at91rm9200-usart", "atmel,at91sam9260-usart";
		atmel,usart-mode = <AT91_USART_MODE_SPI>;
		reg = <0xf001c000 0x100>;
		interrupts = <12 IRQ_TYPE_LEVEL_HIGH 5>;
		clocks = <&usart0_clk>;
		clock-names = "usart";
		cs-gpios = <&pioB 3 0>;
	};
+24 −0
Original line number Diff line number Diff line
@@ -7546,6 +7546,14 @@ F: drivers/platform/x86/intel_punit_ipc.c
F:	arch/x86/include/asm/intel_pmc_ipc.h
F:	arch/x86/include/asm/intel_punit_ipc.h

INTEL MULTIFUNCTION PMIC DEVICE DRIVERS
R:	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
S:	Maintained
F:	drivers/mfd/intel_msic.c
F:	drivers/mfd/intel_soc_pmic*
F:	include/linux/mfd/intel_msic.h
F:	include/linux/mfd/intel_soc_pmic*

INTEL PRO/WIRELESS 2100, 2200BG, 2915ABG NETWORK CONNECTION SUPPORT
M:	Stanislav Yakovlev <stas.yakovlev@gmail.com>
L:	linux-wireless@vger.kernel.org
@@ -9589,6 +9597,7 @@ M: Richard Genoud <richard.genoud@gmail.com>
S:	Maintained
F:	drivers/tty/serial/atmel_serial.c
F:	drivers/tty/serial/atmel_serial.h
F:	Documentation/devicetree/bindings/mfd/atmel-usart.txt

MICROCHIP / ATMEL DMA DRIVER
M:	Ludovic Desroches <ludovic.desroches@microchip.com>
@@ -9620,6 +9629,21 @@ S: Supported
F:	drivers/mtd/nand/raw/atmel/*
F:	Documentation/devicetree/bindings/mtd/atmel-nand.txt

MICROCHIP AT91 USART MFD DRIVER
M:	Radu Pirea <radu_nicolae.pirea@upb.ro>
L:	linux-kernel@vger.kernel.org
S:	Supported
F:	drivers/mfd/at91-usart.c
F:	include/dt-bindings/mfd/at91-usart.h
F:	Documentation/devicetree/bindings/mfd/atmel-usart.txt

MICROCHIP AT91 USART SPI DRIVER
M:	Radu Pirea <radu_nicolae.pirea@upb.ro>
L:	linux-spi@vger.kernel.org
S:	Supported
F:	drivers/spi/spi-at91-usart.c
F:	Documentation/devicetree/bindings/mfd/atmel-usart.txt

MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
M:	Woojung Huh <Woojung.Huh@microchip.com>
M:	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
+4 −8
Original line number Diff line number Diff line
@@ -693,16 +693,12 @@ static int __maybe_unused tiadc_suspend(struct device *dev)
{
	struct iio_dev *indio_dev = dev_get_drvdata(dev);
	struct tiadc_device *adc_dev = iio_priv(indio_dev);
	struct ti_tscadc_dev *tscadc_dev;
	unsigned int idle;

	tscadc_dev = ti_tscadc_dev_get(to_platform_device(dev));
	if (!device_may_wakeup(tscadc_dev->dev)) {
	idle = tiadc_readl(adc_dev, REG_CTRL);
	idle &= ~(CNTRLREG_TSCSSENB);
	tiadc_writel(adc_dev, REG_CTRL, (idle |
			CNTRLREG_POWERDOWN));
	}

	return 0;
}
+17 −5
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/sort.h>
#include <linux/pm_wakeirq.h>

#include <linux/mfd/ti_am335x_tscadc.h>

@@ -46,6 +47,7 @@ static const int config_pins[] = {
struct titsc {
	struct input_dev	*input;
	struct ti_tscadc_dev	*mfd_tscadc;
	struct device		*dev;
	unsigned int		irq;
	unsigned int		wires;
	unsigned int		x_plate_resistance;
@@ -276,7 +278,7 @@ static irqreturn_t titsc_irq(int irq, void *dev)
	if (status & IRQENB_HW_PEN) {
		ts_dev->pen_down = true;
		irqclr |= IRQENB_HW_PEN;
		pm_stay_awake(ts_dev->mfd_tscadc->dev);
		pm_stay_awake(ts_dev->dev);
	}

	if (status & IRQENB_PENUP) {
@@ -286,7 +288,7 @@ static irqreturn_t titsc_irq(int irq, void *dev)
			input_report_key(input_dev, BTN_TOUCH, 0);
			input_report_abs(input_dev, ABS_PRESSURE, 0);
			input_sync(input_dev);
			pm_relax(ts_dev->mfd_tscadc->dev);
			pm_relax(ts_dev->dev);
		} else {
			ts_dev->pen_down = true;
		}
@@ -422,6 +424,7 @@ static int titsc_probe(struct platform_device *pdev)
	ts_dev->mfd_tscadc = tscadc_dev;
	ts_dev->input = input_dev;
	ts_dev->irq = tscadc_dev->irq;
	ts_dev->dev = &pdev->dev;

	err = titsc_parse_dt(pdev, ts_dev);
	if (err) {
@@ -436,6 +439,11 @@ static int titsc_probe(struct platform_device *pdev)
		goto err_free_mem;
	}

	device_init_wakeup(&pdev->dev, true);
	err = dev_pm_set_wake_irq(&pdev->dev, ts_dev->irq);
	if (err)
		dev_err(&pdev->dev, "irq wake enable failed.\n");

	titsc_writel(ts_dev, REG_IRQSTATUS, TSC_IRQENB_MASK);
	titsc_writel(ts_dev, REG_IRQENABLE, IRQENB_FIFO0THRES);
	titsc_writel(ts_dev, REG_IRQENABLE, IRQENB_EOS);
@@ -467,6 +475,8 @@ static int titsc_probe(struct platform_device *pdev)
	return 0;

err_free_irq:
	dev_pm_clear_wake_irq(&pdev->dev);
	device_init_wakeup(&pdev->dev, false);
	free_irq(ts_dev->irq, ts_dev);
err_free_mem:
	input_free_device(input_dev);
@@ -479,6 +489,8 @@ static int titsc_remove(struct platform_device *pdev)
	struct titsc *ts_dev = platform_get_drvdata(pdev);
	u32 steps;

	dev_pm_clear_wake_irq(&pdev->dev);
	device_init_wakeup(&pdev->dev, false);
	free_irq(ts_dev->irq, ts_dev);

	/* total steps followed by the enable mask */
@@ -499,7 +511,7 @@ static int __maybe_unused titsc_suspend(struct device *dev)
	unsigned int idle;

	tscadc_dev = ti_tscadc_dev_get(to_platform_device(dev));
	if (device_may_wakeup(tscadc_dev->dev)) {
	if (device_may_wakeup(dev)) {
		titsc_writel(ts_dev, REG_IRQSTATUS, TSC_IRQENB_MASK);
		idle = titsc_readl(ts_dev, REG_IRQENABLE);
		titsc_writel(ts_dev, REG_IRQENABLE,
@@ -515,11 +527,11 @@ static int __maybe_unused titsc_resume(struct device *dev)
	struct ti_tscadc_dev *tscadc_dev;

	tscadc_dev = ti_tscadc_dev_get(to_platform_device(dev));
	if (device_may_wakeup(tscadc_dev->dev)) {
	if (device_may_wakeup(dev)) {
		titsc_writel(ts_dev, REG_IRQWAKEUP,
				0x00);
		titsc_writel(ts_dev, REG_IRQCLR, IRQENB_HW_PEN);
		pm_relax(ts_dev->mfd_tscadc->dev);
		pm_relax(dev);
	}
	titsc_step_config(ts_dev);
	titsc_writel(ts_dev, REG_FIFO0THR,
+21 −5
Original line number Diff line number Diff line
@@ -99,6 +99,15 @@ config MFD_AAT2870_CORE
	  additional drivers must be enabled in order to use the
	  functionality of the device.

config MFD_AT91_USART
	tristate "AT91 USART Driver"
	select MFD_CORE
	help
	  Select this to get support for AT91 USART IP. This is a wrapper
	  over at91-usart-serial driver and usart-spi-driver. Only one function
	  can be used at a time. The choice is done at boot time by the probe
	  function of this MFD driver according to a device tree property.

config MFD_ATMEL_FLEXCOM
	tristate "Atmel Flexcom (Flexible Serial Communication Unit)"
	select MFD_CORE
@@ -1023,17 +1032,24 @@ config MFD_RN5T618
	  functionality of the device.

config MFD_SEC_CORE
	bool "SAMSUNG Electronics PMIC Series Support"
	tristate "SAMSUNG Electronics PMIC Series Support"
	depends on I2C=y
	select MFD_CORE
	select REGMAP_I2C
	select REGMAP_IRQ
	help
	 Support for the Samsung Electronics MFD series.
	  Support for the Samsung Electronics PMIC devices coming
	  usually along with Samsung Exynos SoC chipset.
	  This driver provides common support for accessing the device,
	  additional drivers must be enabled in order to use the functionality
	  of the device

	  To compile this driver as a module, choose M here: the
	  module will be called sec-core.
	  Have in mind that important core drivers (like regulators) depend
	  on this driver so building this as a module might require proper
	  initial ramdisk or might not boot up as well in certain scenarios.

config MFD_SI476X_CORE
	tristate "Silicon Laboratories 4761/64/68 AM/FM radio."
	depends on I2C
Loading