Commit 4b4bb99b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'pwm/for-4.18-rc1' of...

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

Pull pwm updates from Thierry Reding:
 "This contains a couple of fixes and cleanups for the Meson and
  ACPI/LPSS drivers as well as capture support for STM32.

  Note that given the cross- subsystem changes, the STM32 patches were
  merged through the MFD and PWM trees, both sharing an immutable
  branch"

* tag 'pwm/for-4.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
  pwm: stm32: Fix build warning with CONFIG_DMA_ENGINE disabled
  pwm: stm32: Enforce dependency on CONFIG_MFD_STM32_TIMERS
  ACPI / LPSS: Add missing prv_offset setting for byt/cht PWM devices
  pwm: lpss: platform: Save/restore the ctrl register over a suspend/resume
  dt-bindings: mfd: stm32-timers: Add support for dmas
  pwm: simplify getting .drvdata
  pwm: meson: Fix allocation of PWM channel array
parents 9bca19a0 414c52b7
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -19,6 +19,11 @@ Required parameters:
Optional parameters:
- resets:		Phandle to the parent reset controller.
			See ../reset/st,stm32-rcc.txt
- dmas:			List of phandle to dma channels that can be used for
			this timer instance. There may be up to 7 dma channels.
- dma-names:		List of dma names. Must match 'dmas' property. Valid
			names are: "ch1", "ch2", "ch3", "ch4", "up", "trig",
			"com".

Optional subnodes:
- pwm:			See ../pwm/pwm-stm32.txt
@@ -44,3 +49,18 @@ Example:
			reg = <0>;
		};
	};

Example with all dmas:
	timer@40010000 {
		...
		dmas = <&dmamux1 11 0x400 0x0>,
		       <&dmamux1 12 0x400 0x0>,
		       <&dmamux1 13 0x400 0x0>,
		       <&dmamux1 14 0x400 0x0>,
		       <&dmamux1 15 0x400 0x0>,
		       <&dmamux1 16 0x400 0x0>,
		       <&dmamux1 17 0x400 0x0>;
		dma-names = "ch1", "ch2", "ch3", "ch4", "up", "trig", "com";
		...
		child nodes...
	};
+2 −0
Original line number Diff line number Diff line
@@ -233,11 +233,13 @@ static const struct lpss_device_desc lpt_sdio_dev_desc = {

static const struct lpss_device_desc byt_pwm_dev_desc = {
	.flags = LPSS_SAVE_CTX,
	.prv_offset = 0x800,
	.setup = byt_pwm_setup,
};

static const struct lpss_device_desc bsw_pwm_dev_desc = {
	.flags = LPSS_SAVE_CTX | LPSS_NO_D3_DELAY,
	.prv_offset = 0x800,
	.setup = bsw_pwm_setup,
};

+1 −1
Original line number Diff line number Diff line
@@ -401,7 +401,7 @@ config PWM_STI

config PWM_STM32
	tristate "STMicroelectronics STM32 PWM"
	depends on MFD_STM32_TIMERS || COMPILE_TEST
	depends on MFD_STM32_TIMERS
	help
	  Generic PWM framework driver for STM32 SoCs.

+2 −4
Original line number Diff line number Diff line
@@ -460,8 +460,7 @@ MODULE_DEVICE_TABLE(of, atmel_tcb_pwm_dt_ids);
#ifdef CONFIG_PM_SLEEP
static int atmel_tcb_pwm_suspend(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct atmel_tcb_pwm_chip *tcbpwm = platform_get_drvdata(pdev);
	struct atmel_tcb_pwm_chip *tcbpwm = dev_get_drvdata(dev);
	void __iomem *base = tcbpwm->tc->regs;
	int i;

@@ -478,8 +477,7 @@ static int atmel_tcb_pwm_suspend(struct device *dev)

static int atmel_tcb_pwm_resume(struct device *dev)
{
	struct platform_device *pdev = to_platform_device(dev);
	struct atmel_tcb_pwm_chip *tcbpwm = platform_get_drvdata(pdev);
	struct atmel_tcb_pwm_chip *tcbpwm = dev_get_drvdata(dev);
	void __iomem *base = tcbpwm->tc->regs;
	int i;

+5 −0
Original line number Diff line number Diff line
@@ -74,6 +74,10 @@ static int pwm_lpss_remove_platform(struct platform_device *pdev)
	return pwm_lpss_remove(lpwm);
}

static SIMPLE_DEV_PM_OPS(pwm_lpss_platform_pm_ops,
			 pwm_lpss_suspend,
			 pwm_lpss_resume);

static const struct acpi_device_id pwm_lpss_acpi_match[] = {
	{ "80860F09", (unsigned long)&pwm_lpss_byt_info },
	{ "80862288", (unsigned long)&pwm_lpss_bsw_info },
@@ -86,6 +90,7 @@ static struct platform_driver pwm_lpss_driver_platform = {
	.driver = {
		.name = "pwm-lpss",
		.acpi_match_table = pwm_lpss_acpi_match,
		.pm = &pwm_lpss_platform_pm_ops,
	},
	.probe = pwm_lpss_probe_platform,
	.remove = pwm_lpss_remove_platform,
Loading