Skip to content

pwm: tegra: Cleanups and .get_state()

Uwe Kleine-König linux-pwm linux-tegra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest3 patches 21 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3pwm: tegra: Make use of dev_err_probe()drivers/pwm/pwm-tegra.c+31 -214 replies
2/3pwm: tegra: Check for match_data being NULLdrivers/pwm/pwm-tegra.c+8 -09 replies
3/3pwm: tegra: Implement .get_state()drivers/pwm/pwm-tegra.c+48 -07 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchMikko PerttunenOla Chr. Vaage
1/3R-b
2/3
3/3R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] pwm: tegra: Cleanups and .get_state()

Hello,

v1 of this series can be found at
https://lore.kernel.org/[email protected].

Changes since then:

- Reordered the patches to have dev_err_probe and dev first. Fixes a build failure in the middle of v1. This way patch 2 -- which could be considered a fix -- isn't before the cleanup in patch 1, but doing patch 1 the old way first also feels strange.

- add { } around blocks with a single statement if there is also a comment.

- fixed too many parenthesis in patch #3 (formerly #6).

- dropped other patches as they reorder stuff in unwanted or at least untested ways.

There was a concern in reply to patch #1 of the v1 series (now #2) from

Quoted 9 lines · Mikko Perttunen. He

I feel like driver_override falls in the realm of 'root can mess with the system as they feel like but if they don't know what they're doing they get to keep the pieces'. So adding a check in every driver, or in practice having a random mix of drivers with and without the check, doesn't seem necessary to me.

If we actually want to check for this condition, could it be done centrally instead? I.e. don't call probe if there's no match data and the driver's match table implies it requires it.

It cannot be done reliably in the driver core, and IMHO even root shouldn't be able to trigger a NULL pointer exception. So I kept the check.

Uwe Kleine-König (3):
pwm: tegra: Make use of dev_err_probe()
pwm: tegra: Check for match_data being NULL
pwm: tegra: Implement .get_state()

 drivers/pwm/pwm-tegra.c | 108 ++++++++++++++++++++++++++++++++--------
 1 file changed, 87 insertions(+), 21 deletions(-)

base-commit: cee9395acd8043be0644b25c34bfa86623f2b935

Signature · 1 line
2.47.3