Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-14 Thread Shuah Khan
On 04/10/2014 08:39 AM, Mauro Carvalho Chehab wrote: Em Thu, 10 Apr 2014 12:46:53 +0100 One Thousand Gnomes escreveu: For example, some devices provide standard USB Audio Class, handled by snd-usb-audio for the audio stream, while the video stream is handled via a separate driver, like some

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-14 Thread Shuah Khan
On 04/10/2014 08:39 AM, Mauro Carvalho Chehab wrote: Em Thu, 10 Apr 2014 12:46:53 +0100 One Thousand Gnomes gno...@lxorguk.ukuu.org.uk escreveu: For example, some devices provide standard USB Audio Class, handled by snd-usb-audio for the audio stream, while the video stream is handled via a

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-11 Thread Shuah Khan
Here is an example driver use-case for this token resource: This is not polished, but should give an idea on this new token resource is intended to be used: - create token resources in em28xx_usb_probe() right before the required modules are loaded. It creates tuner, video and audio tokens to

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-11 Thread Shuah Khan
Here is an example driver use-case for this token resource: This is not polished, but should give an idea on this new token resource is intended to be used: - create token resources in em28xx_usb_probe() right before the required modules are loaded. It creates tuner, video and audio tokens to

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread Mauro Carvalho Chehab
Em Thu, 10 Apr 2014 12:46:53 +0100 One Thousand Gnomes escreveu: > > For example, some devices provide standard USB Audio Class, handled by > > snd-usb-audio for the audio stream, while the video stream is handled > > via a separate driver, like some em28xx devices. > > Which is what mfd is

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread Shuah Khan
On 04/10/2014 05:38 AM, Mauro Carvalho Chehab wrote: Hi Alan, Em Thu, 10 Apr 2014 12:04:35 +0100 One Thousand Gnomes escreveu: - Construct string with (dev is struct em28xx *dev) format: "tuner:%s-%s-%d" with the following:

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread One Thousand Gnomes
> For example, some devices provide standard USB Audio Class, handled by > snd-usb-audio for the audio stream, while the video stream is handled > via a separate driver, like some em28xx devices. Which is what mfd is designed to handle. > There are even more complex devices that provide 3G

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread Mauro Carvalho Chehab
Hi Alan, Em Thu, 10 Apr 2014 12:04:35 +0100 One Thousand Gnomes escreveu: > > >> - Construct string with (dev is struct em28xx *dev) > > >> format: "tuner:%s-%s-%d" > > >> with the following: > > >> dev_name(>udev->dev) > > >>

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread One Thousand Gnomes
> >> - Construct string with (dev is struct em28xx *dev) > >>format: "tuner:%s-%s-%d" > >>with the following: > >>dev_name(>udev->dev) > >> dev->udev->bus->bus_name > >> dev->tuner_addr What guarantees this won't

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread One Thousand Gnomes
- Construct string with (dev is struct em28xx *dev) format: tuner:%s-%s-%d with the following: dev_name(dev-udev-dev) dev-udev-bus-bus_name dev-tuner_addr What guarantees this won't get confused by hot

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread Mauro Carvalho Chehab
Hi Alan, Em Thu, 10 Apr 2014 12:04:35 +0100 One Thousand Gnomes gno...@lxorguk.ukuu.org.uk escreveu: - Construct string with (dev is struct em28xx *dev) format: tuner:%s-%s-%d with the following: dev_name(dev-udev-dev)

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread One Thousand Gnomes
For example, some devices provide standard USB Audio Class, handled by snd-usb-audio for the audio stream, while the video stream is handled via a separate driver, like some em28xx devices. Which is what mfd is designed to handle. There are even more complex devices that provide 3G modem,

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread Shuah Khan
On 04/10/2014 05:38 AM, Mauro Carvalho Chehab wrote: Hi Alan, Em Thu, 10 Apr 2014 12:04:35 +0100 One Thousand Gnomes gno...@lxorguk.ukuu.org.uk escreveu: - Construct string with (dev is struct em28xx *dev) format: tuner:%s-%s-%d with the following:

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-10 Thread Mauro Carvalho Chehab
Em Thu, 10 Apr 2014 12:46:53 +0100 One Thousand Gnomes gno...@lxorguk.ukuu.org.uk escreveu: For example, some devices provide standard USB Audio Class, handled by snd-usb-audio for the audio stream, while the video stream is handled via a separate driver, like some em28xx devices. Which

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-09 Thread Shuah Khan
On 04/09/2014 01:17 PM, Greg KH wrote: On Wed, Apr 09, 2014 at 09:21:06AM -0600, Shuah Khan wrote: Test Cases for token devres interfaces: (passed) - Create, lock, unlock, and destroy sequence. - Try lock while it is locked. Returns -EBUSY as expected. - Try lock after destroy. Returns

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-09 Thread Greg KH
On Wed, Apr 09, 2014 at 09:21:06AM -0600, Shuah Khan wrote: > Media devices often have hardware resources that are shared > across several functions. For instance, TV tuner cards often > have MUXes, converters, radios, tuners, etc. that are shared > across various functions. However, v4l2, alsa,

[RFC PATCH 0/2] managed token devres interfaces

2014-04-09 Thread Shuah Khan
Media devices often have hardware resources that are shared across several functions. For instance, TV tuner cards often have MUXes, converters, radios, tuners, etc. that are shared across various functions. However, v4l2, alsa, DVB, usbfs, and all other drivers have no knowledge of what resources

[RFC PATCH 0/2] managed token devres interfaces

2014-04-09 Thread Shuah Khan
Media devices often have hardware resources that are shared across several functions. For instance, TV tuner cards often have MUXes, converters, radios, tuners, etc. that are shared across various functions. However, v4l2, alsa, DVB, usbfs, and all other drivers have no knowledge of what resources

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-09 Thread Greg KH
On Wed, Apr 09, 2014 at 09:21:06AM -0600, Shuah Khan wrote: Media devices often have hardware resources that are shared across several functions. For instance, TV tuner cards often have MUXes, converters, radios, tuners, etc. that are shared across various functions. However, v4l2, alsa, DVB,

Re: [RFC PATCH 0/2] managed token devres interfaces

2014-04-09 Thread Shuah Khan
On 04/09/2014 01:17 PM, Greg KH wrote: On Wed, Apr 09, 2014 at 09:21:06AM -0600, Shuah Khan wrote: Test Cases for token devres interfaces: (passed) - Create, lock, unlock, and destroy sequence. - Try lock while it is locked. Returns -EBUSY as expected. - Try lock after destroy. Returns