Lines Matching defs:device
32 #include <linux/device.h>
108 static int is_parport(struct device *dev)
113 static int parport_probe(struct device *dev)
175 * new device model
201 * new device model
218 * iterates through all the devices connected to the bus and sends the device
221 * port to which it wants to register its device.
223 static int port_check(struct device *dev, void *dev_drv)
235 * if the device is a parallel port.
238 static int port_detect(struct device *dev, void *dev_drv)
246 * parport_register_driver - register a parallel port device driver
251 * This can be called by a parallel port device driver in order
255 * If devmodel is true then the new device model is used
261 * If using the non device model:
274 * Returns 0 on success. The non device model will always succeeds.
275 * but the new device model can fail and will return the error code.
281 /* using device model */
312 static int port_detach(struct device *dev, void *_drv)
323 * parport_unregister_driver - deregister a parallel port device driver
327 * This should be called by a parallel port device driver that
348 static void free_port(struct device *dev)
378 struct device *dev = get_device(&port->bus_dev);
413 * should be made available to parallel port device drivers, it
422 * If there are parallel port device drivers in the system that
440 int device;
497 for (device = 0; device < 5; device++)
499 tmp->probe_info[device].class = PARPORT_CLASS_LEGACY;
514 * parport_announce_port - tell device drivers about a parallel port
520 * parport_announce_port() in order to notify all device drivers
535 pr_warn("%s: fix this legacy no-device port driver!\n",
566 * this function in order to deal with device drivers that still
622 static void free_pardevice(struct device *dev)
631 * parport_register_dev_model - register a device on a parallel port
632 * @port: port to which the device is attached
633 * @name: a name to refer to the device
635 * @id: device number to be given to the device
637 * This function, called by parallel port device drivers,
638 * declares that a device is connected to a port, and tells the
642 * callback function, @preempt, is called when this device driver
643 * has claimed access to the port but another device driver wants
653 * it may be called from interrupt context. If the device driver
662 * from interrupt context. If the device driver does not want to
667 * arrives from the parallel port. Note that if a device driver
683 * so should only be used when sharing the port with other device
688 * the device on the port, or %NULL if there is not enough memory
701 /* An exclusive device is registered. */
708 pr_info("%s: refused to register lurking device (%s) without callbacks\n",
717 * If a device is already registered and this new
718 * device wants exclusive access, then no need to
720 * this device.
722 pr_err("%s: cannot grant exclusive access for device %s\n",
781 pr_debug("%s: cannot grant exclusive access for device %s\n",
834 * parport_unregister_device - deregister a device on a parallel port
835 * @dev: pointer to structure representing device
966 * parport_claim - claim access to a parallel port device
967 * @dev: pointer to structure representing a device on the port
988 /* Preempt any current device */
1039 /* If it's a daisy chain device, select it. */
1082 * parport_claim_or_block - claim access to a parallel port device
1083 * @dev: pointer to structure representing a device on the port
1148 * parport_release - give up access to a parallel port device
1149 * @dev: pointer to structure representing parallel port device
1162 /* Make sure that dev is the current device */
1178 /* If this is a daisy device, deselect it. */