Lines Matching +full:dma +full:- +full:safe +full:- +full:map
1 // SPDX-License-Identifier: GPL-2.0
37 ) -> Result {
48 // SAFETY: It's safe to set the fields of `struct platform_driver` on initialization.
68 extern "C" fn probe_callback(pdev: *mut bindings::platform_device) -> kernel::ffi::c_int {
103 fn of_id_table() -> Option<of::IdTable<Self::IdInfo>> {
107 fn acpi_id_table() -> Option<acpi::IdTable<Self::IdInfo>> {
169 /// ) -> Result<Pin<KBox<Self>>> {
194 -> Result<Pin<KBox<Self>>>;
228 fn as_raw(&self) -> *mut bindings::platform_device {
233 pub fn resource_by_index(&self, index: u32) -> Option<&Resource> {
249 pub fn resource_by_name(&self, name: &CStr) -> Option<&Resource> {
272 pub fn io_request_by_index(&self, index: u32) -> Option<IoRequest<'_>> {
276 .map(|resource| unsafe { IoRequest::new(self.as_ref(), resource) })
280 pub fn io_request_by_name(&self, name: &CStr) -> Option<IoRequest<'_>> {
284 .map(|resource| unsafe { IoRequest::new(self.as_ref(), resource) })
302 ) -> Result<impl PinInit<irq::$reg_type<T>, Error> + 'a> {
329 ) -> Result<impl PinInit<irq::$reg_type<T>, Error> + 'a> {
344 pub fn irq_by_index(&self, index: u32) -> Result<IrqRequest<'_>> {
358 pub fn optional_irq_by_index(&self, index: u32) -> Result<IrqRequest<'_>> {
371 pub fn irq_by_name(&self, name: &CStr) -> Result<IrqRequest<'_>> {
385 pub fn optional_irq_by_name(&self, name: &CStr) -> Result<IrqRequest<'_>> {
468 impl crate::dma::Device for Device<device::Core> {}
470 // SAFETY: Instances of `Device` are always reference-counted.
473 // SAFETY: The existence of a shared reference guarantees that the refcount is non-zero.
478 // SAFETY: The safety requirements guarantee that the refcount is non-zero.
484 fn as_ref(&self) -> &device::Device<Ctx> {
497 fn try_from(dev: &device::Device<Ctx>) -> Result<Self, Self::Error> {
514 // SAFETY: A `Device` is always reference-counted and can be released from any thread.
518 // (i.e. `Device<Normal>) are thread safe.