Re: [RFC PATCH 1/1] [media] pci: Add support for DVB PCIe cards from Prospero Technologies Ltd.

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

 



On Mon, Feb 16, 2015 at 07:48:46PM +0000, Philip Downer wrote:
-snip-
> +	dev = rc_allocate_device();
> +
> +	if (!ir || !dev)
> +		goto err_out_free;
> +
> +	ir->dev = dev;
> +
> +	snprintf(ir->name, sizeof(ir->name), "prospero IR");
> +	snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", pci_name(pci));
> +
> +	dev->input_name = ir->name;
> +	dev->input_phys = ir->phys;
> +	dev->input_id.bustype = BUS_PCI;
> +	dev->input_id.version = 1;
> +	dev->input_id.vendor = pci->vendor;
> +	dev->input_id.product = pci->device;
> +
> +	dev->dev.parent = &pci->dev;
> +	dev->map_name = RC_MAP_LIRC;

RC_MAP_LIRC isn't really a useful default; no remote will work with that.
Other drivers default to RC_MAP_RC6_MCE if no remote was provided with 
the product. I don't know if this is good choice, but at least it is
consistent.

> +
> +	dev->driver_name = "prospero";
> +	dev->priv = p;
> +	dev->open = prospero_ir_open;
> +	dev->close = prospero_ir_close;
> +	dev->driver_type = RC_DRIVER_IR_RAW;
> +	dev->timeout = 10 * 1000 * 1000;

There is a MS_TO_NS() macro for this.


Sean
--
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