• Home
  • Raw
  • Download

Lines Matching refs:dev

27 struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned long type,
30 static inline struct resource *pnp_get_resource(struct pnp_dev *dev, in pnp_get_resource() argument
59 static inline resource_size_t pnp_port_start(struct pnp_dev *dev, in pnp_port_start() argument
62 struct resource *res = pnp_get_resource(dev, IORESOURCE_IO, bar); in pnp_port_start()
69 static inline resource_size_t pnp_port_end(struct pnp_dev *dev, in pnp_port_end() argument
72 struct resource *res = pnp_get_resource(dev, IORESOURCE_IO, bar); in pnp_port_end()
79 static inline unsigned long pnp_port_flags(struct pnp_dev *dev, in pnp_port_flags() argument
82 struct resource *res = pnp_get_resource(dev, IORESOURCE_IO, bar); in pnp_port_flags()
89 static inline int pnp_port_valid(struct pnp_dev *dev, unsigned int bar) in pnp_port_valid() argument
91 return pnp_resource_valid(pnp_get_resource(dev, IORESOURCE_IO, bar)); in pnp_port_valid()
94 static inline resource_size_t pnp_port_len(struct pnp_dev *dev, in pnp_port_len() argument
97 struct resource *res = pnp_get_resource(dev, IORESOURCE_IO, bar); in pnp_port_len()
105 static inline resource_size_t pnp_mem_start(struct pnp_dev *dev, in pnp_mem_start() argument
108 struct resource *res = pnp_get_resource(dev, IORESOURCE_MEM, bar); in pnp_mem_start()
115 static inline resource_size_t pnp_mem_end(struct pnp_dev *dev, in pnp_mem_end() argument
118 struct resource *res = pnp_get_resource(dev, IORESOURCE_MEM, bar); in pnp_mem_end()
125 static inline unsigned long pnp_mem_flags(struct pnp_dev *dev, unsigned int bar) in pnp_mem_flags() argument
127 struct resource *res = pnp_get_resource(dev, IORESOURCE_MEM, bar); in pnp_mem_flags()
134 static inline int pnp_mem_valid(struct pnp_dev *dev, unsigned int bar) in pnp_mem_valid() argument
136 return pnp_resource_valid(pnp_get_resource(dev, IORESOURCE_MEM, bar)); in pnp_mem_valid()
139 static inline resource_size_t pnp_mem_len(struct pnp_dev *dev, in pnp_mem_len() argument
142 struct resource *res = pnp_get_resource(dev, IORESOURCE_MEM, bar); in pnp_mem_len()
150 static inline resource_size_t pnp_irq(struct pnp_dev *dev, unsigned int bar) in pnp_irq() argument
152 struct resource *res = pnp_get_resource(dev, IORESOURCE_IRQ, bar); in pnp_irq()
159 static inline unsigned long pnp_irq_flags(struct pnp_dev *dev, unsigned int bar) in pnp_irq_flags() argument
161 struct resource *res = pnp_get_resource(dev, IORESOURCE_IRQ, bar); in pnp_irq_flags()
168 static inline int pnp_irq_valid(struct pnp_dev *dev, unsigned int bar) in pnp_irq_valid() argument
170 return pnp_resource_valid(pnp_get_resource(dev, IORESOURCE_IRQ, bar)); in pnp_irq_valid()
174 static inline resource_size_t pnp_dma(struct pnp_dev *dev, unsigned int bar) in pnp_dma() argument
176 struct resource *res = pnp_get_resource(dev, IORESOURCE_DMA, bar); in pnp_dma()
183 static inline unsigned long pnp_dma_flags(struct pnp_dev *dev, unsigned int bar) in pnp_dma_flags() argument
185 struct resource *res = pnp_get_resource(dev, IORESOURCE_DMA, bar); in pnp_dma_flags()
192 static inline int pnp_dma_valid(struct pnp_dev *dev, unsigned int bar) in pnp_dma_valid() argument
194 return pnp_resource_valid(pnp_get_resource(dev, IORESOURCE_DMA, bar)); in pnp_dma_valid()
203 struct device dev; /* Driver Model device interface */ member
222 #define to_pnp_card(n) container_of(n, struct pnp_card, dev)
246 struct device dev; /* Driver Model device interface */ member
278 #define to_pnp_dev(n) container_of(n, struct pnp_dev, dev)
279 #define pnp_for_each_dev(dev) \ argument
280 for((dev) = global_to_pnp_dev(pnp_global.next); \
281 (dev) != global_to_pnp_dev(&pnp_global); \
282 (dev) = global_to_pnp_dev((dev)->global_list.next))
283 #define card_for_each_dev(card,dev) \ argument
284 for((dev) = card_to_pnp_dev((card)->devices.next); \
285 (dev) != card_to_pnp_dev(&(card)->devices); \
286 (dev) = card_to_pnp_dev((dev)->card_list.next))
287 #define pnp_dev_name(dev) (dev)->name argument
291 return dev_get_drvdata(&pdev->dev); in pnp_get_drvdata()
296 dev_set_drvdata(&pdev->dev, data); in pnp_set_drvdata()
301 void (*quirk_function) (struct pnp_dev * dev); /* fixup function */
316 #define pnp_can_read(dev) (((dev)->protocol->get) && \ argument
317 ((dev)->capabilities & PNP_READ))
318 #define pnp_can_write(dev) (((dev)->protocol->set) && \ argument
319 ((dev)->capabilities & PNP_WRITE))
320 #define pnp_can_disable(dev) (((dev)->protocol->disable) && \ argument
321 ((dev)->capabilities & PNP_DISABLE) && \
322 (!((dev)->capabilities & PNP_CONSOLE) || \
324 #define pnp_can_configure(dev) ((!(dev)->active) && \ argument
325 ((dev)->capabilities & PNP_CONFIGURABLE))
326 #define pnp_can_suspend(dev) (((dev)->protocol->suspend) && \ argument
327 (!((dev)->capabilities & PNP_CONSOLE) || \
333 #define pnp_device_is_isapnp(dev) ((dev)->protocol == (&isapnp_protocol)) argument
335 #define pnp_device_is_isapnp(dev) 0 argument
342 #define pnp_device_is_pnpbios(dev) ((dev)->protocol == (&pnpbios_protocol)) argument
344 #define pnp_device_is_pnpbios(dev) 0 argument
351 static inline struct acpi_device *pnp_acpi_device(struct pnp_dev *dev) in pnp_acpi_device() argument
353 if (dev->protocol == &pnpacpi_protocol) in pnp_acpi_device()
354 return dev->data; in pnp_acpi_device()
358 #define pnp_acpi_device(dev) 0 argument
369 #define isapnp_card_number(dev) ((dev)->card ? (dev)->card->number : -1) argument
370 #define isapnp_csn_number(dev) ((dev)->number) argument
385 int (*probe) (struct pnp_dev *dev, const struct pnp_device_id *dev_id);
386 void (*remove) (struct pnp_dev *dev);
387 void (*shutdown) (struct pnp_dev *dev);
388 int (*suspend) (struct pnp_dev *dev, pm_message_t state);
389 int (*resume) (struct pnp_dev *dev);
423 int (*get) (struct pnp_dev *dev);
424 int (*set) (struct pnp_dev *dev);
425 int (*disable) (struct pnp_dev *dev);
428 bool (*can_wakeup) (struct pnp_dev *dev);
429 int (*suspend) (struct pnp_dev * dev, pm_message_t state);
430 int (*resume) (struct pnp_dev * dev);
434 struct device dev; /* link to driver model */ member
444 #define protocol_for_each_dev(protocol,dev) \ argument
445 for((dev) = protocol_to_pnp_dev((protocol)->devices.next); \
446 (dev) != protocol_to_pnp_dev(&(protocol)->devices); \
447 (dev) = protocol_to_pnp_dev((dev)->protocol_list.next))
462 void pnp_release_card_device(struct pnp_dev *dev);
468 int pnp_possible_config(struct pnp_dev *dev, int type, resource_size_t base,
470 int pnp_auto_config_dev(struct pnp_dev *dev);
471 int pnp_start_dev(struct pnp_dev *dev);
472 int pnp_stop_dev(struct pnp_dev *dev);
473 int pnp_activate_dev(struct pnp_dev *dev);
474 int pnp_disable_dev(struct pnp_dev *dev);
478 int pnp_is_active(struct pnp_dev *dev);
493 static inline void pnp_release_card_device(struct pnp_dev *dev) { } in pnp_release_card_device() argument
498 static inline int pnp_possible_config(struct pnp_dev *dev, int type, in pnp_possible_config() argument
501 static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_auto_config_dev() argument
502 static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_start_dev() argument
503 static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_stop_dev() argument
504 static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_activate_dev() argument
505 static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_disable_dev() argument
509 static inline int pnp_is_active(struct pnp_dev *dev) { return 0; } in pnp_is_active() argument