Re: [PATCH 1/6 v4] media: V4L2: support asynchronous subdevice registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 01/08/2013 11:35 AM, Laurent Pinchart wrote:
If we need a workaround, I'd rather pass the device name in addition
to the I2C adapter number and address, instead of embedding the
workaround in this new API.

...or we can change the I2C subdevice name format. The actual need to do

	snprintf(clk_name, sizeof(clk_name), "%s %d-%04x",
	
		 asdl->dev->driver->name,
		 i2c_adapter_id(client->adapter), client->addr);

in soc-camera now to exactly match the subdevice name, as created by
v4l2_i2c_subdev_init(), doesn't make me specifically happy either. What
if the latter changes at some point? Or what if one driver wishes to
create several subdevices for one I2C device?

The common clock framework uses %d-%04x, maybe we could use that as well
for clock names ?

And preserve the subdevice names? Then matching would be more difficult
and less precise. Or change subdevice names too? I think, we can do the
latter, since anyway at any time only one driver can be attached to an I2C
device.

That's right. Where else is the subdev name used ?

Subdev names are exposed to user space by the media controller API.
So they are really part of an ABI, aren't they ?

Also having I2C bus number or I2C slave address as part of the subdev
name makes it more difficult to write portable applications. Hence
in sensor drivers I used to overwrite subdev name to remove I2C bus
and slave address, as the format used v4l2_i2c_subdev_init() seemed
highly unsuitable..

--

Regards,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux