Lines Matching full:bus

70  * DOC: Bus layer - role and goal
72 * iwl-bus.h defines the API to the bus layer of the iwlwifi driver.
73 * The bus layer is responsible for doing very basic bus operations that are
75 * The bus layer registers to the bus driver, advertises the supported HW and
77 * For the moment, the bus layer is not a linux kernel module as itself, and
78 * the module_init function of the driver must call the bus specific
87 * The iwl_bus describes the data that is shared amongst all the bus layer
88 * implementations. This data is visible to other layers. Data in the bus
89 * specific area is not visible outside the bus specific implementation.
95 * bus layer. Type safety is still kept since functions that gets iwl_priv gets
102 * The module_init calls the bus specific registration function. The
103 * registration to the bus layer will trigger an enumeration of the bus which
104 * will call the bus specific probe function.
107 * Once the bus specific probe function has configured the hardware, it
109 * the bus independent probe flow.
111 * Note: The bus specific code must set the following data in iwl_bus before it
113 * * bus->dev
114 * * bus->irq
115 * * bus->ops
122 * struct iwl_bus_ops - bus specific operations
123 * @get_pm_support: must returns true if the bus can go to sleep
132 bool (*get_pm_support)(struct iwl_bus *bus);
133 void (*apm_config)(struct iwl_bus *bus);
134 void (*get_hw_id_string)(struct iwl_bus *bus, char buf[], int buf_len);
135 u32 (*get_hw_id)(struct iwl_bus *bus);
136 void (*write8)(struct iwl_bus *bus, u32 ofs, u8 val);
137 void (*write32)(struct iwl_bus *bus, u32 ofs, u32 val);
138 u32 (*read32)(struct iwl_bus *bus, u32 ofs);
142 * struct iwl_bus - bus common data
144 * This data is common to all bus layer implementations.
162 /* pointer to bus specific struct */
167 static inline bool bus_get_pm_support(struct iwl_bus *bus) in bus_get_pm_support() argument
169 return bus->ops->get_pm_support(bus); in bus_get_pm_support()
172 static inline void bus_apm_config(struct iwl_bus *bus) in bus_apm_config() argument
174 bus->ops->apm_config(bus); in bus_apm_config()
177 static inline void bus_get_hw_id_string(struct iwl_bus *bus, char buf[], in bus_get_hw_id_string() argument
180 bus->ops->get_hw_id_string(bus, buf, buf_len); in bus_get_hw_id_string()
183 static inline u32 bus_get_hw_id(struct iwl_bus *bus) in bus_get_hw_id() argument
185 return bus->ops->get_hw_id(bus); in bus_get_hw_id()
188 static inline void bus_write8(struct iwl_bus *bus, u32 ofs, u8 val) in bus_write8() argument
190 bus->ops->write8(bus, ofs, val); in bus_write8()
193 static inline void bus_write32(struct iwl_bus *bus, u32 ofs, u32 val) in bus_write32() argument
195 bus->ops->write32(bus, ofs, val); in bus_write32()
198 static inline u32 bus_read32(struct iwl_bus *bus, u32 ofs) in bus_read32() argument
200 return bus->ops->read32(bus, ofs); in bus_read32()
204 * Bus layer registration functions