Skip to content

clk: add gpio controlled clock multiplexer

Sergej Sawazki linux-clk 4 versions – Applied

Status from this message: Applied to clk-next (but won't appear in -next until after rc1

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 3 repliesApplied
  2. v31 patch 2 repliesSuperseded
  3. v21 patch 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC1 patch4 repliesSuperseded

Changes in v4 from the cover letter

* Suggested by Stephen Boyd:
- Split the patch into a patch series, separate gpio-gate-clock fixes and file renaming.
- Include linux/gpio/consumer.h.
- Remove debug noise.
- Remove some comments.
- Fix: Do not call free if alloc fails.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4clk: gpio-gate: Include export.h instead of module.hdrivers/clk/clk-gpio-gate.c+1 -10 replies
2/4clk: gpio-gate: Stay silent on EPROBE_DEFERdrivers/clk/clk-gpio-gate.c+3 -20 replies
3/4clk: add gpio controlled clock multiplexerDocumentation/devicetree/bindings/clock/gpio-mux-clock.txt drivers/clk/clk-gpio-gate.c include/linux/clk-provider.h+207 -601 reply
4/4clk: Rename clk-gpio-gate.c to clk-gpio.cdrivers/clk/Makefile drivers/clk/clk-gpio-gate.c drivers/clk/clk-gpio.c+320 -3201 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/4] clk: add gpio controlled clock multiplexer

This patch series adds a common clock driver for basic gpio controlled clock multiplexers. It does also contain some minor fixes for the gpio-gate-clock.

The first two patches are minor fixes for the gpio-gate-clock. Patch three refactors the file clk-gpio-gate.c and adds the new gpio-mux-clock driver. Finally, patch four renames the file clk-gpio-gate.c to clk-gpio.c.

Based on clk-next.

Changes since v3:
* Suggested by Stephen Boyd:
- Split the patch into a patch series, separate gpio-gate-clock fixes and file renaming.
- Include linux/gpio/consumer.h.
- Remove debug noise.
- Remove some comments.
- Fix: Do not call free if alloc fails.

Changes since v2:
* Suggested by Stephen Boyd:
- Delete unneeded includes.
- Fix some style issues.
- Put gpio-gate-clock and gpio-mux-clock into a new file (clk-gpio.c) and refactor the code to minimize code duplication.

Changes since v1:
* Suggested by Stephen Boyd and Jyri Sarha:
- Remove the optional enable/disable support. If enable/disable is required, the gpio-mux-clock can be used in combination with the gpio-gate-clock.

* Suggested by Stephen Boyd:
- Remove the (index > 1)-check from clk_gpio_mux_set_parent().
- Stay silent if gpio_request_one() fails with -EPROBE_DEFER.
- Make sure num_parents is 2 in clk_register_gpio_mux().
- Use devm_clk_register() if a device is provided.
- Remove the flags variable from of_clk_gpio_mux_delayed_register_get().
- Fix num_parents check in of_clk_gpio_mux_delayed_register_get().
- Use kcalloc() for parent_names array allocation.
- Use pr_debug() instead of pr_warn() for the EPROBE_DEFER message.
- Use kzalloc(sizeof(*data)... ) instead of kzalloc(sizeof(struct clk_gpio_mux_delayed_register_data)... ) in of_gpio_mux_clk_setup().

Many thanks for your time and effort,
Sergej

Sergej Sawazki (4):
clk: gpio-gate: Include export.h instead of module.h
clk: gpio-gate: Stay silent on EPROBE_DEFER
clk: add gpio controlled clock multiplexer
clk: Rename clk-gpio-gate.c to clk-gpio.c

 .../devicetree/bindings/clock/gpio-mux-clock.txt   |  19 ++
 drivers/clk/Makefile                               |   2 +-
 drivers/clk/clk-gpio-gate.c                        | 207 -------------
 drivers/clk/clk-gpio.c                             | 319 +++++++++++++++++++++
 include/linux/clk-provider.h                       |  17 ++
 5 files changed, 356 insertions(+), 208 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/gpio-mux-clock.txt
 delete mode 100644 drivers/clk/clk-gpio-gate.c
 create mode 100644 drivers/clk/clk-gpio.c
Signature · 1 line
1.9.1