* What would be a good time to move subdev drivers to a subdev directory? @ 2010-03-28 10:24 Hans Verkuil 2010-03-28 15:38 ` Mauro Carvalho Chehab 2010-03-29 7:31 ` Laurent Pinchart 0 siblings, 2 replies; 6+ messages in thread From: Hans Verkuil @ 2010-03-28 10:24 UTC (permalink / raw) To: Mauro Carvalho Chehab, linux-media Hi Mauro, Currently drivers/media/video is a mix of subdev drivers and bridge/platform drivers. I think it would be good to create a drivers/media/subdev directory where subdev drivers can go. We discussed in the past whether we should have categories for audio subdevs, video subdevs, etc. but I think that will cause problems, especially with future multifunction devices. What is your opinion on this, and what would be a good time to start moving drivers? Regards, Hans -- Hans Verkuil - video4linux developer - sponsored by TANDBERG ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What would be a good time to move subdev drivers to a subdev directory? 2010-03-28 10:24 What would be a good time to move subdev drivers to a subdev directory? Hans Verkuil @ 2010-03-28 15:38 ` Mauro Carvalho Chehab 2010-03-28 16:03 ` Hans Verkuil 2010-03-29 7:31 ` Laurent Pinchart 1 sibling, 1 reply; 6+ messages in thread From: Mauro Carvalho Chehab @ 2010-03-28 15:38 UTC (permalink / raw) To: Hans Verkuil; +Cc: linux-media Hans Verkuil wrote: > Hi Mauro, > > Currently drivers/media/video is a mix of subdev drivers and bridge/platform > drivers. I think it would be good to create a drivers/media/subdev directory > where subdev drivers can go. > > We discussed in the past whether we should have categories for audio subdevs, > video subdevs, etc. but I think that will cause problems, especially with > future multifunction devices. Due to the discussions we had on the last time, I'm not so sure that such move would be good: There are some cases where the division of a subdev is more a matter of a logical organization than a physical device division. for example, cx231xx is just one chip, but, as it has internally the same functionalities as a cx2584x, the cx2584x is a subdev used by the driver. There are other similar examples on other IC's and SoC. I remember that Oliver argued on that time that the better would be to reduce the number of subdirs, instead of increasing. On that discussions, I got convinced that he was right, but maybe we have some new reasons to create a subdev dir. So, let's get some feedback from developers about this again. Whatever decided, we should clearly document the used criteria, to avoid having drivers misplaced. Ah, as we're talking about drivers directory, I'm intending to move the Remote Controller common code to another place, likely drivers/input/rc or drivers/rc. The idea is to use this subsystem for pure input devices as well. By keeping it at drivers/media, it will be missplaced. > What is your opinion on this, and what would be a good time to start moving > drivers? If we're doing this change, I prefer to generate the patch by the end of a merge window, after merging from everybody else and being sure that trivial patches also got merged. Comments? -- Cheers, Mauro ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What would be a good time to move subdev drivers to a subdev directory? 2010-03-28 15:38 ` Mauro Carvalho Chehab @ 2010-03-28 16:03 ` Hans Verkuil 2010-03-28 23:08 ` Andy Walls 0 siblings, 1 reply; 6+ messages in thread From: Hans Verkuil @ 2010-03-28 16:03 UTC (permalink / raw) To: Mauro Carvalho Chehab; +Cc: linux-media On Sunday 28 March 2010 17:38:31 Mauro Carvalho Chehab wrote: > Hans Verkuil wrote: > > Hi Mauro, > > > > Currently drivers/media/video is a mix of subdev drivers and bridge/platform > > drivers. I think it would be good to create a drivers/media/subdev directory > > where subdev drivers can go. > > > > We discussed in the past whether we should have categories for audio subdevs, > > video subdevs, etc. but I think that will cause problems, especially with > > future multifunction devices. > > Due to the discussions we had on the last time, I'm not so sure that such move > would be good: There are some cases where the division of a subdev is more a > matter of a logical organization than a physical device division. for example, > cx231xx is just one chip, but, as it has internally the same functionalities as > a cx2584x, the cx2584x is a subdev used by the driver. There are other similar > examples on other IC's and SoC. I should have mentioned why I think it is a good idea to split it: right now it is not clear in media/video what the bridge drivers are and what the subdev drivers are. Note that integrated subdev drivers that are tightly coupled to a bridge or platform driver should stay with that driver (in practice these will always be in a driver-specific subdirectory), but subdevs that can be used stand-alone should (I think) be moved to their own 'subdev' subdirectory. It also makes no sense to me to mix bridge drivers and subdev drivers in one directory. They are simply different types of driver. I don't care whether they are moved to media/subdev or media/video/subdev. The latter is probably easier. > I remember that Oliver argued on that time that the better would be to reduce the > number of subdirs, instead of increasing. On that discussions, I got convinced > that he was right, but maybe we have some new reasons to create a subdev dir. > > So, let's get some feedback from developers about this again. Whatever decided, > we should clearly document the used criteria, to avoid having drivers misplaced. 1) Reusable subdev drivers go into the subdev directory. 2) Subdev drivers that are tightly coupled to a bridge or platform driver go into the subdirectory containing that bridge or platform driver. Rule 1 applies to roughly 50 subdev drivers. I wonder if for rule 2 we should require that subdev drivers would go into a <bridge driver>/subdev directory. It would help in keeping track of what is what, but this may be overkill. > Ah, as we're talking about drivers directory, I'm intending to move the Remote > Controller common code to another place, likely drivers/input/rc or drivers/rc. > The idea is to use this subsystem for pure input devices as well. By keeping it > at drivers/media, it will be missplaced. Makes sense. > > > What is your opinion on this, and what would be a good time to start moving > > drivers? > > If we're doing this change, I prefer to generate the patch by the end of a > merge window, after merging from everybody else and being sure that trivial patches > also got merged. OK, makes sense. > Comments? Regards, Hans -- Hans Verkuil - video4linux developer - sponsored by TANDBERG ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What would be a good time to move subdev drivers to a subdev directory? 2010-03-28 16:03 ` Hans Verkuil @ 2010-03-28 23:08 ` Andy Walls 2010-03-29 6:07 ` Hans Verkuil 0 siblings, 1 reply; 6+ messages in thread From: Andy Walls @ 2010-03-28 23:08 UTC (permalink / raw) To: Hans Verkuil; +Cc: Mauro Carvalho Chehab, linux-media On Sun, 2010-03-28 at 18:03 +0200, Hans Verkuil wrote: > On Sunday 28 March 2010 17:38:31 Mauro Carvalho Chehab wrote: > > Hans Verkuil wrote: > > So, let's get some feedback from developers about this again. Whatever decided, > > we should clearly document the used criteria, to avoid having drivers misplaced. > > 1) Reusable subdev drivers go into the subdev directory. OK by me. I will note the cx25840 module is used stand-alone and by the cx23885 and cx231xx drivers as an integrated A/V core. However the integrated core is internally I2C connected so it's fairly loosely coupled. I don't see a problem with the cx25840 module being pushed into a subdev directory. > 2) Subdev drivers that are tightly coupled to a bridge or platform driver go > into the subdirectory containing that bridge or platform driver. Ack. > Rule 1 applies to roughly 50 subdev drivers. > > I wonder if for rule 2 we should require that subdev drivers would go into a > <bridge driver>/subdev directory. It would help in keeping track of what is what, > but this may be overkill. NAK. That is overkill. BTW, here are some exceptional cases to ponder: Where does the cx2341x module go? It is common code used by ivtv, cx18, and cx23885 (and probably cx88), but it is not a subdevice. Also some code in cx23885/cx23888-ir.c could be broken out and shared between the cx25840, cx18, and cx231xx modules since it is the same IR hardware (mostly), but connected to the bridge chip differently. Where would that go? Regards, Andy ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What would be a good time to move subdev drivers to a subdev directory? 2010-03-28 23:08 ` Andy Walls @ 2010-03-29 6:07 ` Hans Verkuil 0 siblings, 0 replies; 6+ messages in thread From: Hans Verkuil @ 2010-03-29 6:07 UTC (permalink / raw) To: Andy Walls; +Cc: Mauro Carvalho Chehab, linux-media On Monday 29 March 2010 01:08:23 Andy Walls wrote: > On Sun, 2010-03-28 at 18:03 +0200, Hans Verkuil wrote: > > On Sunday 28 March 2010 17:38:31 Mauro Carvalho Chehab wrote: > > > Hans Verkuil wrote: > > > > So, let's get some feedback from developers about this again. Whatever decided, > > > we should clearly document the used criteria, to avoid having drivers misplaced. > > > > 1) Reusable subdev drivers go into the subdev directory. > > OK by me. > > I will note the cx25840 module is used stand-alone and by the cx23885 > and cx231xx drivers as an integrated A/V core. However the integrated > core is internally I2C connected so it's fairly loosely coupled. I > don't see a problem with the cx25840 module being pushed into a subdev > directory. > > > > 2) Subdev drivers that are tightly coupled to a bridge or platform driver go > > into the subdirectory containing that bridge or platform driver. > > Ack. > > > > Rule 1 applies to roughly 50 subdev drivers. > > > > I wonder if for rule 2 we should require that subdev drivers would go into a > > <bridge driver>/subdev directory. It would help in keeping track of what is what, > > but this may be overkill. > > NAK. That is overkill. > > > > BTW, here are some exceptional cases to ponder: > > Where does the cx2341x module go? It is common code used by ivtv, cx18, > and cx23885 (and probably cx88), but it is not a subdevice. > > Also some code in cx23885/cx23888-ir.c could be broken out and shared > between the cx25840, cx18, and cx231xx modules since it is the same IR > hardware (mostly), but connected to the bridge chip differently. Where > would that go? It is common code for Conexant bridge drivers. So it definitely belongs under media/video. Perhaps we might want to move it to media/video/cx-common, but personally I do not think that is needed. Regards, Hans > > Regards, > Andy > > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Hans Verkuil - video4linux developer - sponsored by TANDBERG ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: What would be a good time to move subdev drivers to a subdev directory? 2010-03-28 10:24 What would be a good time to move subdev drivers to a subdev directory? Hans Verkuil 2010-03-28 15:38 ` Mauro Carvalho Chehab @ 2010-03-29 7:31 ` Laurent Pinchart 1 sibling, 0 replies; 6+ messages in thread From: Laurent Pinchart @ 2010-03-29 7:31 UTC (permalink / raw) To: Hans Verkuil; +Cc: Mauro Carvalho Chehab, linux-media Hi Hans, On Sunday 28 March 2010 12:24:17 Hans Verkuil wrote: > Hi Mauro, > > Currently drivers/media/video is a mix of subdev drivers and > bridge/platform drivers. I think it would be good to create a > drivers/media/subdev directory where subdev drivers can go. > > We discussed in the past whether we should have categories for audio > subdevs, video subdevs, etc. but I think that will cause problems, > especially with future multifunction devices. Would have been nice though. Maybe a multifunction subdir would do ? :-) > What is your opinion on this, and what would be a good time to start moving > drivers? -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-29 7:31 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-03-28 10:24 What would be a good time to move subdev drivers to a subdev directory? Hans Verkuil 2010-03-28 15:38 ` Mauro Carvalho Chehab 2010-03-28 16:03 ` Hans Verkuil 2010-03-28 23:08 ` Andy Walls 2010-03-29 6:07 ` Hans Verkuil 2010-03-29 7:31 ` Laurent Pinchart
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox