devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] reset: gpio: ASoC: shared GPIO resets
@ 2024-01-05 15:59 Krzysztof Kozlowski
  2024-01-05 15:59 ` [PATCH v2 1/4] reset: gpio: Add GPIO-based reset controller Krzysztof Kozlowski
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2024-01-05 15:59 UTC (permalink / raw)
  To: Srinivas Kandagatla, Banajit Goswami, Bjorn Andersson,
	Konrad Dybcio, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Philipp Zabel, Jaroslav Kysela,
	Takashi Iwai, alsa-devel, linux-arm-msm, linux-sound, devicetree,
	linux-kernel
  Cc: Krzysztof Kozlowski, Chris Packham, Bartosz Golaszewski,
	Sean Anderson

Hi,

Changes in v2
=============
1. wsa884x.c: add missing return in wsa884x_get_reset(), correct comment.
2. qcom,wsa8840.yaml: fix oneOf syntax.
3. reset/core.c:
   - Revise approach based on Bartosz comments: parse the reset-gpios phandle
     with arguments, do not use deprecated API and do not rely on gpio_desc
     pointer.
   - Create a list of instantiated platform devices to avoid any duplicates.
   - After creating reset-gpio platform device, try to get new reset controller
     or return EPROBE_DEFER.
   - Drop the "cookie" member and add new "of_args" to "struct
     reset_controller_dev".
4. reset-gpio.c:
   - Fix smatch warning on platdata evaluation.
   - Parse GPIO args and store them in rc.of_args.

Description
===========

We have at least few cases where hardware engineers decided to use one
powerdown/shutdown/reset GPIO line for multiple devices:

1. WSA884x (this and previous patch):
https://lore.kernel.org/all/b7aeda24-d638-45b7-8e30-80d287f498f8@sirena.org.uk/
2. https://lore.kernel.org/all/20231027033104.1348921-1-chris.packham@alliedtelesis.co.nz/
3. https://lore.kernel.org/lkml/20191030120440.3699-1-peter.ujfalusi@ti.com/
4. https://lore.kernel.org/all/20211018234923.1769028-1-sean.anderson@seco.com/
5. https://social.treehouse.systems/@marcan/111268780311634160

I try to solve my case, hopefuly Chris' (2), partially Sean's (4) and maybe
Hectors (5), using Rob's suggestion:

https://lore.kernel.org/all/YXi5CUCEi7YmNxXM@robh.at.kernel.org/

Best regards,
Krzysztof

Cc: Chris Packham <chris.packham@alliedtelesis.co.nz>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Sean Anderson <sean.anderson@seco.com>

Krzysztof Kozlowski (4):
  reset: gpio: Add GPIO-based reset controller
  reset: Instantiate reset GPIO controller for shared reset-gpios
  ASoC: dt-bindings: qcom,wsa8840: Add reset-gpios for shared line
  ASoC: codecs: wsa884x: Allow sharing reset GPIO

 .../bindings/sound/qcom,wsa8840.yaml          |  11 +-
 MAINTAINERS                                   |   5 +
 drivers/reset/Kconfig                         |   9 +
 drivers/reset/Makefile                        |   1 +
 drivers/reset/core.c                          | 176 ++++++++++++++++--
 drivers/reset/reset-gpio.c                    | 121 ++++++++++++
 include/linux/reset-controller.h              |   4 +
 sound/soc/codecs/wsa884x.c                    |  53 +++++-
 8 files changed, 356 insertions(+), 24 deletions(-)
 create mode 100644 drivers/reset/reset-gpio.c

-- 
2.34.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-01-11  9:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-05 15:59 [PATCH v2 0/4] reset: gpio: ASoC: shared GPIO resets Krzysztof Kozlowski
2024-01-05 15:59 ` [PATCH v2 1/4] reset: gpio: Add GPIO-based reset controller Krzysztof Kozlowski
2024-01-05 16:39   ` Biju Das
2024-01-06 15:28     ` Krzysztof Kozlowski
2024-01-07 10:46       ` Biju Das
2024-01-07 11:56         ` Krzysztof Kozlowski
2024-01-08 12:21   ` Philipp Zabel
2024-01-09 11:00     ` Krzysztof Kozlowski
2024-01-05 15:59 ` [PATCH v2 2/4] reset: Instantiate reset GPIO controller for shared reset-gpios Krzysztof Kozlowski
2024-01-08 12:17   ` Philipp Zabel
2024-01-09 10:59     ` Krzysztof Kozlowski
2024-01-09 11:58       ` Philipp Zabel
2024-01-11  9:48         ` Krzysztof Kozlowski
2024-01-05 15:59 ` [PATCH v2 3/4] ASoC: dt-bindings: qcom,wsa8840: Add reset-gpios for shared line Krzysztof Kozlowski
2024-01-05 15:59 ` [PATCH v2 4/4] ASoC: codecs: wsa884x: Allow sharing reset GPIO Krzysztof Kozlowski
     [not found] ` <d86f0d2c-40fc-44d2-94f6-e67068e55594@alliedtelesis.co.nz>
2024-01-08  9:44   ` [PATCH v2 0/4] reset: gpio: ASoC: shared GPIO resets Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).