public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuah.kh@samsung.com>
To: gregkh@linuxfoundation.org, m.chehab@samsung.com, tj@kernel.org,
	olebowle@gmx.com
Cc: Shuah Khan <shuah.kh@samsung.com>,
	linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 0/4] Add managed token devres interfaces and change media drivers to use it
Date: Tue, 29 Apr 2014 13:49:22 -0600	[thread overview]
Message-ID: <cover.1398797954.git.shuah.kh@samsung.com> (raw)

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

-- 
1.7.10.4


             reply	other threads:[~2014-04-29 19:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29 19:49 Shuah Khan [this message]
2014-04-29 19:49 ` [PATCH 1/4] drivers/base: add managed token devres interfaces Shuah Khan
2014-05-01 14:53   ` Tejun Heo
2014-05-05 19:16     ` Shuah Khan
2014-05-05 19:26       ` Tejun Heo
2014-05-05 19:30         ` Devin Heitmueller
2014-05-05 19:36           ` Tejun Heo
2014-05-05 19:41             ` Devin Heitmueller
2014-05-05 19:42             ` Shuah Khan
2014-04-29 19:49 ` [PATCH 2/4] media: dvb-fe changes to use tuner token Shuah Khan
2014-04-29 19:49 ` [PATCH 3/4] media/em28xx: changes to create token for tuner access Shuah Khan
2014-04-29 19:49 ` [PATCH 4/4] media: em28xx dvb changes to initialze tuner token Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1398797954.git.shuah.kh@samsung.com \
    --to=shuah.kh@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=olebowle@gmx.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox