Skip to content

Commit

Permalink
Merge tag 'pwm/for-5.18-rc1' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/thierry.reding/linux-pwm

Pull pwm updates from Thierry Reding:
 "This contains conversions of some more drivers to the atomic API as
  well as the addition of new chip support for some existing drivers.

  There are also various minor fixes and cleanups across the board, from
  drivers to device tree bindings"

* tag 'pwm/for-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (45 commits)
  pwm: rcar: Simplify multiplication/shift logic
  dt-bindings: pwm: renesas,tpu: Do not require pwm-cells twice
  dt-bindings: pwm: tiehrpwm: Do not require pwm-cells twice
  dt-bindings: pwm: tiecap: Do not require pwm-cells twice
  dt-bindings: pwm: samsung: Do not require pwm-cells twice
  dt-bindings: pwm: intel,keembay: Do not require pwm-cells twice
  dt-bindings: pwm: brcm,bcm7038: Do not require pwm-cells twice
  dt-bindings: pwm: toshiba,visconti: Include generic PWM schema
  dt-bindings: pwm: renesas,pwm: Include generic PWM schema
  dt-bindings: pwm: sifive: Include generic PWM schema
  dt-bindings: pwm: rockchip: Include generic PWM schema
  dt-bindings: pwm: mxs: Include generic PWM schema
  dt-bindings: pwm: iqs620a: Include generic PWM schema
  dt-bindings: pwm: intel,lgm: Include generic PWM schema
  dt-bindings: pwm: imx: Include generic PWM schema
  dt-bindings: pwm: allwinner,sun4i-a10: Include generic PWM schema
  pwm: pwm-mediatek: Beautify error messages text
  pwm: pwm-mediatek: Allocate clk_pwms with devm_kmalloc_array
  pwm: pwm-mediatek: Simplify error handling with dev_err_probe()
  pwm: brcmstb: Remove useless locking
  ...
  • Loading branch information
Linus Torvalds committed Mar 30, 2022
2 parents 4f37301 + ed14d36 commit 74164d2
Show file tree
Hide file tree
Showing 38 changed files with 492 additions and 401 deletions.
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/mfd/google,cros-ec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ properties:

ec-pwm:
$ref: "/schemas/pwm/google,cros-ec-pwm.yaml#"
deprecated: true

pwm:
$ref: "/schemas/pwm/google,cros-ec-pwm.yaml#"

keyboard-controller:
$ref: "/schemas/input/google,cros-ec-keyb.yaml#"
Expand Down
53 changes: 28 additions & 25 deletions Documentation/devicetree/bindings/pwm/allwinner,sun4i-a10-pwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,36 @@ properties:
resets:
maxItems: 1

if:
properties:
compatible:
contains:
const: allwinner,sun50i-h6-pwm

then:
properties:
clocks:
maxItems: 2

clock-names:
items:
- const: mod
- const: bus

required:
- clock-names
- resets

else:
properties:
clocks:
maxItems: 1

allOf:
- $ref: pwm.yaml#

- if:
properties:
compatible:
contains:
const: allwinner,sun50i-h6-pwm

then:
properties:
clocks:
maxItems: 2

clock-names:
items:
- const: mod
- const: bus

required:
- clock-names
- resets

else:
properties:
clocks:
maxItems: 1

required:
- "#pwm-cells"
- compatible
- reg
- clocks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ properties:
required:
- compatible
- reg
- "#pwm-cells"
- clocks

additionalProperties: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ description: |
An EC PWM node should be only found as a sub-node of the EC node (see
Documentation/devicetree/bindings/mfd/google,cros-ec.yaml).
allOf:
- $ref: pwm.yaml#

properties:
compatible:
const: google,cros-ec-pwm
Expand All @@ -39,7 +42,7 @@ examples:
compatible = "google,cros-ec-spi";
reg = <0>;
cros_ec_pwm: ec-pwm {
cros_ec_pwm: pwm {
compatible = "google,cros-ec-pwm";
#pwm-cells = <1>;
};
Expand Down
4 changes: 3 additions & 1 deletion Documentation/devicetree/bindings/pwm/imx-pwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ title: Freescale i.MX PWM controller
maintainers:
- Philipp Zabel <p.zabel@pengutronix.de>

allOf:
- $ref: pwm.yaml#

properties:
"#pwm-cells":
description: |
Expand Down Expand Up @@ -59,7 +62,6 @@ properties:
maxItems: 1

required:
- "#pwm-cells"
- compatible
- reg
- clocks
Expand Down
4 changes: 3 additions & 1 deletion Documentation/devicetree/bindings/pwm/imx-tpm-pwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ description: |
The TPM counter and period counter are shared between multiple
channels, so all channels should use same period setting.
allOf:
- $ref: pwm.yaml#

properties:
"#pwm-cells":
const: 3
Expand All @@ -34,7 +37,6 @@ properties:
maxItems: 1

required:
- "#pwm-cells"
- compatible
- reg
- clocks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ required:
- compatible
- reg
- clocks
- '#pwm-cells'

additionalProperties: false

Expand Down
3 changes: 3 additions & 0 deletions Documentation/devicetree/bindings/pwm/intel,lgm-pwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ title: LGM SoC PWM fan controller
maintainers:
- Rahul Tanwar <rtanwar@maxlinear.com>

allOf:
- $ref: pwm.yaml#

properties:
compatible:
const: intel,lgm-pwm
Expand Down
4 changes: 3 additions & 1 deletion Documentation/devicetree/bindings/pwm/iqs620a-pwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ description: |
Documentation/devicetree/bindings/mfd/iqs62x.yaml for further details as
well as an example.
allOf:
- $ref: pwm.yaml#

properties:
compatible:
enum:
Expand All @@ -25,7 +28,6 @@ properties:

required:
- compatible
- "#pwm-cells"

additionalProperties: false

Expand Down
4 changes: 3 additions & 1 deletion Documentation/devicetree/bindings/pwm/mxs-pwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ maintainers:
- Shawn Guo <shawnguo@kernel.org>
- Anson Huang <anson.huang@nxp.com>

allOf:
- $ref: pwm.yaml#

properties:
compatible:
enum:
Expand All @@ -28,7 +31,6 @@ properties:
required:
- compatible
- reg
- "#pwm-cells"
- fsl,pwm-number

additionalProperties: false
Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/pwm/pwm-mtk-disp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Required properties:
- "mediatek,mt6595-disp-pwm": found on mt6595 SoC.
- "mediatek,mt8167-disp-pwm", "mediatek,mt8173-disp-pwm": found on mt8167 SoC.
- "mediatek,mt8173-disp-pwm": found on mt8173 SoC.
- "mediatek,mt8183-disp-pwm": found on mt8183 SoC.$
- reg: physical base address and length of the controller's registers.
- #pwm-cells: must be 2. See pwm.yaml in this directory for a description of
the cell format.
Expand Down
74 changes: 38 additions & 36 deletions Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,44 @@ properties:
required:
- compatible
- reg
- "#pwm-cells"

if:
properties:
compatible:
contains:
enum:
- rockchip,rk3328-pwm
- rockchip,rv1108-pwm

then:
properties:
clocks:
items:
- description: Used to derive the functional clock for the device.
- description: Used as the APB bus clock.

clock-names:
items:
- const: pwm
- const: pclk

required:
- clocks
- clock-names

else:
properties:
clocks:
maxItems: 1
description:
Used both to derive the functional clock
for the device and as the bus clock.

required:
- clocks

allOf:
- $ref: pwm.yaml#

- if:
properties:
compatible:
contains:
enum:
- rockchip,rk3328-pwm
- rockchip,rv1108-pwm

then:
properties:
clocks:
items:
- description: Used to derive the functional clock for the device.
- description: Used as the APB bus clock.

clock-names:
items:
- const: pwm
- const: pclk

required:
- clocks
- clock-names

else:
properties:
clocks:
maxItems: 1
description:
Used both to derive the functional clock
for the device and as the bus clock.

required:
- clocks

additionalProperties: false

Expand Down
1 change: 0 additions & 1 deletion Documentation/devicetree/bindings/pwm/pwm-samsung.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ required:
- clocks
- clock-names
- compatible
- "#pwm-cells"
- reg

additionalProperties: false
Expand Down
4 changes: 3 additions & 1 deletion Documentation/devicetree/bindings/pwm/pwm-sifive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ description:

https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/pwm

allOf:
- $ref: pwm.yaml#

properties:
compatible:
items:
Expand Down Expand Up @@ -54,7 +57,6 @@ required:
- compatible
- reg
- clocks
- "#pwm-cells"
- interrupts

additionalProperties: false
Expand Down
1 change: 0 additions & 1 deletion Documentation/devicetree/bindings/pwm/pwm-tiecap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ properties:
required:
- compatible
- reg
- "#pwm-cells"
- clocks
- clock-names

Expand Down
1 change: 0 additions & 1 deletion Documentation/devicetree/bindings/pwm/pwm-tiehrpwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ properties:
required:
- compatible
- reg
- "#pwm-cells"
- clocks
- clock-names

Expand Down
26 changes: 14 additions & 12 deletions Documentation/devicetree/bindings/pwm/renesas,pwm-rcar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,23 @@ properties:
required:
- compatible
- reg
- '#pwm-cells'
- clocks
- power-domains

if:
not:
properties:
compatible:
contains:
enum:
- renesas,pwm-r8a7778
- renesas,pwm-r8a7779
then:
required:
- resets
allOf:
- $ref: pwm.yaml#

- if:
not:
properties:
compatible:
contains:
enum:
- renesas,pwm-r8a7778
- renesas,pwm-r8a7779
then:
required:
- resets

additionalProperties: false

Expand Down
1 change: 0 additions & 1 deletion Documentation/devicetree/bindings/pwm/renesas,tpu-pwm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ properties:
required:
- compatible
- reg
- '#pwm-cells'
- clocks
- power-domains

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ title: Toshiba Visconti PWM Controller
maintainers:
- Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>

allOf:
- $ref: pwm.yaml#

properties:
compatible:
items:
Expand All @@ -23,7 +26,6 @@ properties:
required:
- compatible
- reg
- '#pwm-cells'

additionalProperties: false

Expand Down
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/timer/ingenic,tcu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ patternProperties:
- enum:
- ingenic,jz4740-pwm
- ingenic,jz4725b-pwm
- ingenic,x1000-pwm
- items:
- enum:
- ingenic,jz4760-pwm
Expand Down
2 changes: 1 addition & 1 deletion drivers/pwm/pwm-atmel.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static void atmel_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm,
bool disable_clk)
{
struct atmel_pwm_chip *atmel_pwm = to_atmel_pwm_chip(chip);
unsigned long timeout = jiffies + 2 * HZ;
unsigned long timeout;

atmel_pwm_wait_nonpending(atmel_pwm, pwm->hwpwm);

Expand Down
Loading

0 comments on commit 74164d2

Please sign in to comment.