Commit ceae608a authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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

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

Pull pwm updates from Thierry Reding:
 "This release cycle's updates are mostly cleanup and some minor fixes"

* tag 'pwm/for-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
  dt-bindings: pwm: renesas,pwm-rcar: Add r8a7742 support
  dt-bindings: pwm: renesas,tpu-pwm: Document r8a7742 support
  pwm: Allow store 64-bit duty cycle from sysfs interface
  pwm: img: Fix null pointer access in probe
  pwm: pca9685: Disable unused alternative addresses
  pwm: pca9685: Use BIT() macro instead of shift
  pwm: pca9685: Make comments more consistent
  pwm: sun4i: Simplify with dev_err_probe()
  pwm: sprd: Simplify with dev_err_probe()
  pwm: sifive: Simplify with dev_err_probe()
  pwm: rockchip: Simplify with dev_err_probe()
  pwm: jz4740: Simplify with dev_err_probe()
  pwm: bcm2835: Simplify with dev_err_probe()
  pwm: Convert to use DEFINE_SEQ_ATTRIBUTE macro
  pwm: rockchip: Keep enabled PWMs running while probing
  dt-bindings: pwm: renesas,pwm-rcar: Add r8a774e1 support
parents 00937f36 3b1954cd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ properties:
  compatible:
    items:
      - enum:
          - renesas,pwm-r8a7742   # RZ/G1H
          - renesas,pwm-r8a7743   # RZ/G1M
          - renesas,pwm-r8a7744   # RZ/G1N
          - renesas,pwm-r8a7745   # RZ/G1E
@@ -20,6 +21,7 @@ properties:
          - renesas,pwm-r8a774a1  # RZ/G2M
          - renesas,pwm-r8a774b1  # RZ/G2N
          - renesas,pwm-r8a774c0  # RZ/G2E
          - renesas,pwm-r8a774e1  # RZ/G2H
          - renesas,pwm-r8a7778   # R-Car M1A
          - renesas,pwm-r8a7779   # R-Car H1
          - renesas,pwm-r8a7790   # R-Car H2
+1 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@ properties:
      - enum:
          - renesas,tpu-r8a73a4   # R-Mobile APE6
          - renesas,tpu-r8a7740   # R-Mobile A1
          - renesas,tpu-r8a7742   # RZ/G1H
          - renesas,tpu-r8a7743   # RZ/G1M
          - renesas,tpu-r8a7744   # RZ/G1N
          - renesas,tpu-r8a7745   # RZ/G1E
+3 −14
Original line number Diff line number Diff line
@@ -1327,30 +1327,19 @@ static int pwm_seq_show(struct seq_file *s, void *v)
	return 0;
}

static const struct seq_operations pwm_seq_ops = {
static const struct seq_operations pwm_debugfs_sops = {
	.start = pwm_seq_start,
	.next = pwm_seq_next,
	.stop = pwm_seq_stop,
	.show = pwm_seq_show,
};

static int pwm_seq_open(struct inode *inode, struct file *file)
{
	return seq_open(file, &pwm_seq_ops);
}

static const struct file_operations pwm_debugfs_ops = {
	.owner = THIS_MODULE,
	.open = pwm_seq_open,
	.read = seq_read,
	.llseek = seq_lseek,
	.release = seq_release,
};
DEFINE_SEQ_ATTRIBUTE(pwm_debugfs);

static int __init pwm_debugfs_init(void)
{
	debugfs_create_file("pwm", S_IFREG | S_IRUGO, NULL, NULL,
			    &pwm_debugfs_ops);
			    &pwm_debugfs_fops);

	return 0;
}
+3 −7
Original line number Diff line number Diff line
@@ -152,13 +152,9 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
		return PTR_ERR(pc->base);

	pc->clk = devm_clk_get(&pdev->dev, NULL);
	if (IS_ERR(pc->clk)) {
		ret = PTR_ERR(pc->clk);
		if (ret != -EPROBE_DEFER)
			dev_err(&pdev->dev, "clock not found: %d\n", ret);

		return ret;
	}
	if (IS_ERR(pc->clk))
		return dev_err_probe(&pdev->dev, PTR_ERR(pc->clk),
				     "clock not found\n");

	ret = clk_prepare_enable(pc->clk);
	if (ret)
+2 −1
Original line number Diff line number Diff line
@@ -277,6 +277,8 @@ static int img_pwm_probe(struct platform_device *pdev)
		return PTR_ERR(pwm->pwm_clk);
	}

	platform_set_drvdata(pdev, pwm);

	pm_runtime_set_autosuspend_delay(&pdev->dev, IMG_PWM_PM_TIMEOUT);
	pm_runtime_use_autosuspend(&pdev->dev);
	pm_runtime_enable(&pdev->dev);
@@ -313,7 +315,6 @@ static int img_pwm_probe(struct platform_device *pdev)
		goto err_suspend;
	}

	platform_set_drvdata(pdev, pwm);
	return 0;

err_suspend:
Loading