Lines Matching +full:protocol +full:- +full:node
1 /* SPDX-License-Identifier: GPL-2.0 */
5 * Copyright (C) 2008 Hewlett-Packard Development Company, L.P.
46 if (res && !(res->flags & IORESOURCE_DISABLED)) in pnp_resource_enabled()
53 if (res->start == 0 && res->end == 0) in pnp_resource_len()
65 return res->start; in pnp_port_start()
75 return res->end; in pnp_port_end()
85 return res->flags; in pnp_port_flags()
111 return res->start; in pnp_mem_start()
121 return res->end; in pnp_mem_end()
130 return res->flags; in pnp_mem_flags()
155 return res->start; in pnp_irq()
156 return -1; in pnp_irq()
164 return res->flags; in pnp_irq_flags()
179 return res->start; in pnp_dma()
180 return -1; in pnp_dma()
188 return res->flags; in pnp_dma_flags()
205 struct list_head global_list; /* node in global list of cards */
206 struct list_head protocol_list; /* node in protocol's list of cards */
209 struct pnp_protocol *protocol; member
212 char name[PNP_NAME_LEN]; /* contains a human-readable name */
216 unsigned char checksum; /* if zero - checksum passed */
235 return pcard->driver_data; in pnp_get_card_drvdata()
240 pcard->driver_data = data; in pnp_set_card_drvdata()
249 struct list_head global_list; /* node in global list of devices */
250 struct list_head protocol_list; /* node in list of device's protocol */
251 struct list_head card_list; /* node in card's list of devices */
252 struct list_head rdev_list; /* node in cards list of requested devices */
254 struct pnp_protocol *protocol; member
267 char name[PNP_NAME_LEN]; /* contains a human-readable name */
279 list_for_each_entry(dev, &(card)->devices, card_list)
280 #define pnp_dev_name(dev) (dev)->name
284 return dev_get_drvdata(&pdev->dev); in pnp_get_drvdata()
289 dev_set_drvdata(&pdev->dev, data); in pnp_set_drvdata()
309 #define pnp_can_read(dev) (((dev)->protocol->get) && \
310 ((dev)->capabilities & PNP_READ))
311 #define pnp_can_write(dev) (((dev)->protocol->set) && \
312 ((dev)->capabilities & PNP_WRITE))
313 #define pnp_can_disable(dev) (((dev)->protocol->disable) && \
314 ((dev)->capabilities & PNP_DISABLE) && \
315 (!((dev)->capabilities & PNP_CONSOLE) || \
317 #define pnp_can_configure(dev) ((!(dev)->active) && \
318 ((dev)->capabilities & PNP_CONFIGURABLE))
319 #define pnp_can_suspend(dev) (((dev)->protocol->suspend) && \
320 (!((dev)->capabilities & PNP_CONSOLE) || \
326 #define pnp_device_is_isapnp(dev) ((dev)->protocol == (&isapnp_protocol))
335 #define pnp_device_is_pnpbios(dev) ((dev)->protocol == (&pnpbios_protocol))
346 if (dev->protocol == &pnpacpi_protocol) in pnp_acpi_device()
347 return dev->data; in pnp_acpi_device()
362 #define isapnp_card_number(dev) ((dev)->card ? (dev)->card->number : -1)
363 #define isapnp_csn_number(dev) ((dev)->number)
408 * Protocol Management
420 /* protocol specific suspend/resume */
426 unsigned char number; /* protocol number */
433 #define protocol_for_each_card(protocol, card) \ argument
434 list_for_each_entry(card, &(protocol)->cards, protocol_list)
435 #define protocol_for_each_dev(protocol, dev) \ argument
436 list_for_each_entry(dev, &(protocol)->devices, protocol_list)
464 /* protocol helpers */
475 static inline int pnp_device_attach(struct pnp_dev *pnp_dev) { return -ENODEV; } in pnp_device_attach()
483 static inline int pnp_register_card_driver(struct pnp_card_driver *drv) { return -ENODEV; } in pnp_register_card_driver()
490 static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_auto_config_dev()
491 static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_start_dev()
492 static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_stop_dev()
493 static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_activate_dev()
494 static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } in pnp_disable_dev()
497 /* protocol helpers */
499 static inline int compare_pnp_id(struct pnp_id *pos, const char *id) { return -ENODEV; } in compare_pnp_id()
500 static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; } in pnp_register_driver()
508 * module_pnp_driver() - Helper macro for registering a PnP driver