Skip to content

Add managed token devres interfaces and change media drivers to use it

Shuah Khan linux-media lkml 1 version NAK

Status from this message: Nacked-by: Tejun Heo <[email protected]>

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 7 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/4drivers/base: add managed token devres interfacesdrivers/base/Makefile drivers/base/token_devres.c include/linux/token_devres.h+166 -17 replies
2/4media: dvb-fe changes to use tuner tokendrivers/media/dvb-core/dvb_frontend.c drivers/media/dvb-core/dvb_frontend.h+16 -00 replies
3/4media/em28xx: changes to create token for tuner accessdrivers/media/usb/em28xx/em28xx-cards.c drivers/media/usb/em28xx/em28xx.h+45 -00 replies
4/4media: em28xx dvb changes to initialze tuner tokendrivers/media/usb/em28xx/em28xx-dvb.c+4 -00 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchTejun Heo
1/4Nacked-by
2/4
3/4
4/4

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

Read the v1 thread

Cover letter [PATCH 0/4] Add managed token devres interfaces and change media drivers to use it

Media drivers that control a single media TV stick are a diversified group. Analog and digital TV function drivers have to coordinate access to their shared functions. In some cases, snd-usb-audio is used to support audio function on media devices.

A shared managed resource framework at drivers/base level will allow a media device to be controlled by drivers that don't fall under drivers/media and share functions with other media drivers.

A token devres that can be looked up by a token for locking, try locking, unlocking will help avoid adding data structure dependencies between various drivers. This token is a unique string that can be constructed from a common data structure such as struct device, bus_name, and hardware address.

This patch series adds devm_token_* interfaces to manage access to token resource and a tuner token to allow sharing tuner function across analog and digital functions. em28xx and dvb-core make use of this new tuner token to control tuner access. Analog changes will be added in a subsequent patch series.

Patch series is tested with Kworld UB435-Q V3 USB TV stick and Kaffeine media player.

Shuah Khan (4):
drivers/base: add managed token devres interfaces
media: dvb-fe changes to use token for shared access control media/em28xx: changes to create token for tuner access
media: em28xx dvb changes to initialze dvb fe tuner token

 drivers/base/Makefile                   |    2 +-
 drivers/base/token_devres.c             |  146 +++++++++++++++++++++++++++++++
 drivers/media/dvb-core/dvb_frontend.c   |   15 ++++
 drivers/media/dvb-core/dvb_frontend.h   |    1 +
 drivers/media/usb/em28xx/em28xx-cards.c |   41 +++++++++
 drivers/media/usb/em28xx/em28xx-dvb.c   |    4 +
 drivers/media/usb/em28xx/em28xx.h       |    4 +
 include/linux/token_devres.h            |   19 ++++
 8 files changed, 231 insertions(+), 1 deletion(-)
 create mode 100644 drivers/base/token_devres.c
 create mode 100644 include/linux/token_devres.h
Signature · 1 line
1.7.10.4