/linux/rust/kernel/drm/gem/ |
H A D | mod.rs | 9 bindings, drm, 45 fn as_raw(&self) -> *mut bindings::drm_gem_object; in as_raw() 54 unsafe fn as_ref<'a>(self_ptr: *mut bindings::drm_gem_object) -> &'a Self; in as_ref() 61 unsafe { bindings::drm_gem_object_get(self.as_raw()) }; in inc_ref() 73 unsafe { bindings::drm_gem_object_put(obj) }; in dec_ref() 84 raw_obj: *mut bindings::drm_gem_object, in open_callback() 85 raw_file: *mut bindings::drm_file, in open_callback() 104 raw_obj: *mut bindings::drm_gem_object, in close_callback() 105 raw_file: *mut bindings::drm_file, in close_callback() 123 fn as_raw(&self) -> *mut bindings::drm_gem_object { in as_raw() [all …]
|
/linux/rust/kernel/ |
H A D | kunit.rs | 21 bindings::_printk( in err() 37 bindings::_printk( in info() 65 let kunit_test = unsafe { $crate::bindings::kunit_get_current_test() }; 88 struct Location($crate::bindings::kunit_loc); 91 struct UnaryAssert($crate::bindings::kunit_unary_assert); 101 static LOCATION: Location = Location($crate::bindings::kunit_loc { 105 static ASSERTION: UnaryAssert = UnaryAssert($crate::bindings::kunit_unary_assert { 106 assert: $crate::bindings::kunit_assert {}, 130 $crate::bindings::__kunit_do_failed_assertion( 133 $crate::bindings::kunit_assert_type_KUNIT_ASSERTION, [all …]
|
H A D | configfs.rs | 131 subsystem: Opaque<bindings::configfs_subsystem>, 155 |place: &mut Opaque<bindings::configfs_subsystem>| { in new() 158 bindings::config_group_init_type_name( in new() 167 bindings::__mutex_init( in new() 181 unsafe { bindings::configfs_register_subsystem(this.subsystem.get()) }, in new() 191 unsafe { bindings::configfs_unregister_subsystem(self.subsystem.get()) }; in drop() 193 unsafe { bindings::mutex_destroy(&raw mut (*self.subsystem.get()).su_mutex) }; in drop() 198 /// `bindings::config_group`. 204 /// - Implementers of this trait must embed a `bindings::config_group`. 207 /// Return the address of the `bindings::config_group` embedded in [`Self`]. [all …]
|
H A D | sizes.rs | 8 pub const SZ_1K: usize = bindings::SZ_1K as usize; 10 pub const SZ_2K: usize = bindings::SZ_2K as usize; 12 pub const SZ_4K: usize = bindings::SZ_4K as usize; 14 pub const SZ_8K: usize = bindings::SZ_8K as usize; 16 pub const SZ_16K: usize = bindings::SZ_16K as usize; 18 pub const SZ_32K: usize = bindings::SZ_32K as usize; 20 pub const SZ_64K: usize = bindings::SZ_64K as usize; 22 pub const SZ_128K: usize = bindings::SZ_128K as usize; 24 pub const SZ_256K: usize = bindings::SZ_256K as usize; 26 pub const SZ_512K: usize = bindings::SZ_512K as usize;
|
H A D | auxiliary.rs | 8 bindings, container_of, device, 28 type RegType = bindings::auxiliary_driver; 45 bindings::__auxiliary_driver_register(adrv.get(), module.0, name.as_char_ptr()) in register() 51 unsafe { bindings::auxiliary_driver_unregister(adrv.get()) } in unregister() 57 adev: *mut bindings::auxiliary_device, in probe_callback() 58 id: *const bindings::auxiliary_device_id, in probe_callback() 77 bindings::auxiliary_set_drvdata(adev.as_raw(), data.into_foreign().cast()) in probe_callback() 86 extern "C" fn remove_callback(adev: *mut bindings::auxiliary_device) { in remove_callback() 89 let ptr = unsafe { bindings::auxiliary_get_drvdata(adev) }; in remove_callback() 106 /// Abstraction for `bindings::auxiliary_device_id`. [all …]
|
H A D | pci.rs | 9 bindings, container_of, device, 33 type RegType = bindings::pci_driver; 50 bindings::__pci_register_driver(pdrv.get(), module.0, name.as_char_ptr()) in register() 56 unsafe { bindings::pci_unregister_driver(pdrv.get()) } in unregister() 62 pdev: *mut bindings::pci_dev, in probe_callback() 63 id: *const bindings::pci_device_id, in probe_callback() 81 unsafe { bindings::pci_set_drvdata(pdev.as_raw(), data.into_foreign() as _) }; in probe_callback() 89 extern "C" fn remove_callback(pdev: *mut bindings::pci_dev) { in remove_callback() 92 let ptr = unsafe { bindings::pci_get_drvdata(pdev) }.cast(); in remove_callback() 126 pub struct DeviceId(bindings::pci_device_id); [all …]
|
H A D | opp.rs | 34 ptr: *mut bindings::cpufreq_frequency_table, 40 let mut ptr: *mut bindings::cpufreq_frequency_table = ptr::null_mut(); in new() 45 bindings::dev_pm_opp_init_cpufreq_table(table.dev.as_raw(), &mut ptr) in new() 76 bindings::dev_pm_opp_free_cpufreq_table(self.dev.as_raw(), &mut self.as_raw()) in drop() 184 to_result(unsafe { bindings::dev_pm_opp_add_dynamic(dev.as_raw(), &mut data.0) })?; in new() 196 unsafe { bindings::dev_pm_opp_remove(self.dev.as_raw(), self.freq.into()) }; in drop() 224 pub struct Data(bindings::dev_pm_opp_data); 231 Self(bindings::dev_pm_opp_data { in new() 305 _data: *mut *mut bindings::regulator, in config_regulators() 321 unsafe { bindings::dev_pm_opp_clear_config(self.0) }; in drop() [all …]
|
H A D | task.rs | 8 bindings, 24 pub const TASK_INTERRUPTIBLE: c_int = bindings::TASK_INTERRUPTIBLE as c_int; 26 pub const TASK_UNINTERRUPTIBLE: c_int = bindings::TASK_UNINTERRUPTIBLE as c_int; 28 pub const TASK_FREEZABLE: c_int = bindings::TASK_FREEZABLE as c_int; 31 pub const TASK_NORMAL: c_uint = bindings::TASK_NORMAL as c_uint; 96 pub struct Task(pub(crate) Opaque<bindings::task_struct>); 148 pub type Pid = bindings::pid_t; 153 kuid: bindings::kuid_t, 161 pub fn current_raw() -> *mut bindings::task_struct { in current_raw() 163 unsafe { bindings::get_current() } in current_raw() [all …]
|
H A D | miscdevice.rs | 12 bindings, 34 pub const fn into_raw<T: MiscDevice>(self) -> bindings::miscdevice { in into_raw() 36 let mut result: bindings::miscdevice = unsafe { MaybeUninit::zeroed().assume_init() }; in into_raw() 37 result.minor = bindings::MISC_DYNAMIC_MINOR as _; in into_raw() 53 inner: Opaque<bindings::miscdevice>, 68 inner <- Opaque::try_ffi_init(move |slot: *mut bindings::miscdevice| { in register() 77 to_result(unsafe { bindings::misc_register(slot) }) in register() 84 pub fn as_raw(&self) -> *mut bindings::miscdevice { in as_raw() 103 unsafe { bindings::misc_deregister(self.inner.get()) }; in drop() 188 unsafe extern "C" fn open(inode: *mut bindings::inode, raw_file: *mut bindings::file) -> c_int { in open() [all …]
|
H A D | firmware.rs | 7 use crate::{bindings, device::Device, error::Error, error::Result, ffi, str::CStr}; 12 /// One of the following: `bindings::request_firmware`, `bindings::firmware_request_nowarn`, 13 /// `bindings::firmware_request_platform`, `bindings::request_firmware_direct`. 16 *mut *const bindings::firmware, 18 *mut bindings::device, 24 Self(bindings::request_firmware) in request() 28 Self(bindings::firmware_request_nowarn) in request_nowarn() 59 pub struct Firmware(NonNull<bindings::firmware>); 63 let mut fw: *mut bindings::firmware = core::ptr::null_mut(); in request_internal() 64 let pfw: *mut *mut bindings::firmware = &mut fw; in request_internal() [all …]
|
H A D | xarray.rs | 8 alloc, bindings, build_assert, 22 /// `self.xa` is always an initialized and valid [`bindings::xarray`] whose entries are either 57 xa: Opaque<bindings::xarray>, 74 unsafe { bindings::xa_destroy(self.xa.get()) }; in drop() 90 AllocKind::Alloc => bindings::XA_FLAGS_ALLOC, in new() 91 AllocKind::Alloc1 => bindings::XA_FLAGS_ALLOC1, in new() 96 // INVARIANT: `xa` is initialized here to an empty, valid [`bindings::xarray`]. in new() 98 bindings::xa_init_flags(xa, flags) in new() 109 bindings::xa_find(self.xa.get(), &mut index, usize::MAX, bindings::XA_PRESENT) in iter() 114 bindings::xa_find_after(self.xa.get(), &mut index, usize::MAX, bindings::XA_PRESENT) in iter() [all …]
|
H A D | cpumask.rs | 38 /// use kernel::bindings; 42 /// fn set_clear_cpu(ptr: *mut bindings::cpumask, set_cpu: CpuId, clear_cpu: CpuId) { 52 pub struct Cpumask(Opaque<bindings::cpumask>); 61 pub unsafe fn as_mut_ref<'a>(ptr: *mut bindings::cpumask) -> &'a mut Self { in as_mut_ref() 75 pub unsafe fn as_ref<'a>(ptr: *const bindings::cpumask) -> &'a Self { in as_ref() 84 pub fn as_raw(&self) -> *mut bindings::cpumask { in as_raw() 97 unsafe { bindings::__cpumask_set_cpu(u32::from(cpu), self.as_raw()) }; in set() 109 unsafe { bindings::__cpumask_clear_cpu(i32::from(cpu), self.as_raw()) }; in clear() 118 unsafe { bindings::cpumask_test_cpu(i32::from(cpu), self.as_raw()) } in test() 127 unsafe { bindings::cpumask_setall(self.as_raw()) }; in setall() [all …]
|
H A D | mm.rs | 15 bindings, 48 mm: Opaque<bindings::mm_struct>, 61 unsafe { bindings::mmgrab(self.as_raw()) }; 67 unsafe { bindings::mmdrop(obj.cast().as_ptr()) }; 97 unsafe { bindings::mmget(self.as_raw()) }; 103 unsafe { bindings::mmput(obj.cast().as_ptr()) }; 121 pub fn as_raw(&self) -> *mut bindings::mm_struct { 132 pub unsafe fn from_raw<'a>(ptr: *const bindings::mm_struct) -> &'a Mm { 142 let success = unsafe { bindings::mmget_not_zero(self.as_raw()) }; in dec_ref() 162 pub unsafe fn from_raw<'a>(ptr: *const bindings [all...] |
/linux/Documentation/devicetree/bindings/clock/ |
H A D | qcom,gpucc.yaml | 18 include/dt-bindings/clock/qcom,gpucc-sdm845.h 19 include/dt-bindings/clock/qcom,gpucc-sa8775p.h 20 include/dt-bindings/clock/qcom,gpucc-sc7180.h 21 include/dt-bindings/clock/qcom,gpucc-sc7280.h 22 include/dt-bindings/clock/qcom,gpucc-sc8280xp.h 23 include/dt-bindings/clock/qcom,gpucc-sm6350.h 24 include/dt-bindings/clock/qcom,gpucc-sm8150.h 25 include/dt-bindings/clock/qcom,gpucc-sm8250.h 26 include/dt-bindings/clock/qcom,gpucc-sm8350.h 27 include/dt-bindings/clock/qcom,qcs8300-gpucc.h [all …]
|
/linux/rust/kernel/mm/ |
H A D | virt.rs | 18 bindings, 36 vma: Opaque<bindings::vm_area_struct>, 49 pub unsafe fn from_raw<'a>(vma: *const bindings::vm_area_struct) -> &'a Self { in from_raw() 56 pub fn as_ptr(&self) -> *mut bindings::vm_area_struct { in as_ptr() 127 bindings::zap_page_range_single(self.as_ptr(), address, size, core::ptr::null_mut()) in zap_page_range_single() 185 pub unsafe fn from_raw<'a>(vma: *const bindings::vm_area_struct) -> &'a Self { in from_raw() 197 to_result(unsafe { bindings::vm_insert_page(self.as_ptr(), address, page.as_ptr()) }) in vm_insert_page() 233 pub unsafe fn from_raw<'a>(vma: *mut bindings::vm_area_struct) -> &'a Self { in from_raw() 387 pub use bindings::vm_flags_t; 392 use crate::bindings; [all …]
|
/linux/Documentation/devicetree/bindings/power/ |
H A D | rockchip,power-controller.yaml | 20 Documentation/devicetree/bindings/power/power-domain.yaml. 114 "include/dt-bindings/power/px30-power.h" 115 "include/dt-bindings/power/rk3036-power.h" 116 "include/dt-bindings/power/rk3066-power.h" 117 "include/dt-bindings/power/rk3128-power.h" 118 "include/dt-bindings/power/rk3188-power.h" 119 "include/dt-bindings/power/rk3228-power.h" 120 "include/dt-bindings/power/rk3288-power.h" 121 "include/dt-bindings/power/rk3328-power.h" 122 "include/dt-bindings/power/rk3366-power.h" [all …]
|
/linux/Documentation/devicetree/bindings/mmc/ |
H A D | sdhci-st.txt | 4 Documentation/devicetree/bindings/mmc/mmc.txt and the properties 14 See: Documentation/devicetree/bindings/resource-names.txt 16 See: Documentation/devicetree/bindings/clock/clock-bindings.txt 23 See: Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt 36 See: Documentation/devicetree/bindings/mmc/mmc.txt. 39 See: Documentation/devicetree/bindings/mmc/mmc.txt. 43 See: Documentation/devicetree/bindings/mmc/mmc.txt. 46 See: Documentation/devicetree/bindings/reset/reset.txt 52 See: Documentation/devicetree/bindings/mmc/mmc.txt. 55 See: Documentation/devicetree/bindings/mmc/mmc.txt. [all …]
|
/linux/rust/kernel/net/ |
H A D | phy.rs | 74 pub struct Device(Opaque<bindings::phy_device>); 86 unsafe fn from_raw<'a>(ptr: *mut bindings::phy_device) -> &'a mut Self { in from_raw() 87 // CAST: `Self` is a `repr(transparent)` wrapper around `bindings::phy_device`. in from_raw() 111 bindings::phy_state_PHY_DOWN => DeviceState::Down, in state() 112 bindings::phy_state_PHY_READY => DeviceState::Ready, in state() 113 bindings::phy_state_PHY_HALTED => DeviceState::Halted, in state() 114 bindings::phy_state_PHY_ERROR => DeviceState::Error, in state() 115 bindings::phy_state_PHY_UP => DeviceState::Up, in state() 116 bindings::phy_state_PHY_RUNNING => DeviceState::Running, in state() 117 bindings in state() [all...] |
/linux/tools/power/cpupower/bindings/python/ |
H A D | README | 1 This folder contains the necessary files to build the Python bindings for 21 the bindings code: is permissively licensed + the license of libcpupower's 22 library files. For these bindings that means GPL v2. 54 developing/using the bindings directly 57 You need to add the Python bindings directory to your $PYTHONPATH. 61 PYTHONPATH=~/linux/tools/power/cpupower/bindings/python:$PYTHONPATH 63 This allows you to set a specific repo of the bindings to use. 70 by default. You do not need to install cpupower to use the SWIG bindings. 72 You can install and uninstall the bindings to the site-packages with: 82 Original Bindings Author:
|
/linux/Documentation/devicetree/bindings/display/mediatek/ |
H A D | mediatek,wdma.yaml | 18 Documentation/devicetree/bindings/arm/mediatek/mediatek,mmsys.yaml 37 description: A phandle and PM domain specifier as defined by bindings of 39 Documentation/devicetree/bindings/power/power-domain.yaml for details. 48 see Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml for details. 54 defined in the header include/dt-bindings/gce/<chip>-gce.h. 70 #include <dt-bindings/interrupt-controller/arm-gic.h> 71 #include <dt-bindings/clock/mt8173-clk.h> 72 #include <dt-bindings/power/mt8173-power.h> 73 #include <dt-bindings/gce/mt8173-gce.h> 74 #include <dt-bindings/memory/mt8173-larb-port.h>
|
/linux/rust/kernel/block/mq/ |
H A D | gen_disk.rs | 9 use crate::{bindings, error::from_err_ptr, error::Result, sync::Arc}; 27 logical_block_size: bindings::PAGE_SIZE as u32, in default() 28 physical_block_size: bindings::PAGE_SIZE as u32, in default() 49 if !(512..=bindings::PAGE_SIZE as u32).contains(&size) || !size.is_power_of_two() { in validate_block_size() 96 // SAFETY: `bindings::queue_limits` contain only fields that are valid when zeroed. in build() 97 let mut lim: bindings::queue_limits = unsafe { core::mem::zeroed() }; in build() 102 lim.features = bindings::BLK_FEAT_ROTATIONAL; in build() 107 bindings::__blk_mq_alloc_disk( in build() 115 const TABLE: bindings::block_device_operations = bindings::block_device_operations { in build() 154 unsafe { bindings::set_capacity(gendisk, self.capacity_sectors) }; in build() [all …]
|
/linux/Documentation/devicetree/bindings/serial/ |
H A D | atmel,at91-usart.yaml | 74 <AT91_USART_MODE_SERIAL> for USART (found in dt-bindings/mfd/at91-usart.h). 135 #include <dt-bindings/gpio/gpio.h> 136 #include <dt-bindings/interrupt-controller/irq.h> 137 #include <dt-bindings/mfd/at91-usart.h> 138 #include <dt-bindings/dma/at91.h> 159 #include <dt-bindings/gpio/gpio.h> 160 #include <dt-bindings/interrupt-controller/irq.h> 161 #include <dt-bindings/mfd/at91-usart.h> 162 #include <dt-bindings/dma/at91.h> 181 #include <dt-bindings/gpio/gpio.h> [all …]
|
/linux/ |
H A D | MAINTAINERS | 199 F: Documentation/devicetree/bindings/power/supply/*ab8500* 454 F: Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml 478 F: Documentation/devicetree/bindings/iio/adc/adi,ad7944.yaml 486 F: Documentation/devicetree/bindings/input/adafruit,seesaw-gamepad.yaml 499 F: Documentation/devicetree/bindings/net/ieee802154/adf7242.txt 525 F: Documentation/devicetree/bindings/hwmon/pmbus/adi,adp1050.yaml 531 F: Documentation/devicetree/bindings/media/i2c/adi,adp1653.txt 551 F: Documentation/devicetree/bindings/*/adi,adp5585*.yaml 562 F: Documentation/devicetree/bindings/input/adi,adp5588.yaml 601 F: Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml [all …]
|
/linux/Documentation/rust/ |
H A D | general-information.rst | 67 Abstractions vs. bindings 72 In order to use functions and types from the C side, bindings are created. 73 Bindings are the declarations for Rust of those functions and types from 77 a ``struct mutex`` from the C side and calls its functions through the bindings. 81 (e.g. drivers) should not use the C bindings directly. Instead, subsystems 86 rust/bindings/ 96 | my_foo | -----> | | foo | | bar | | -------> | Bindings | <-+ | 98 +---------+ | |system| |system| | | bindings | <-----+ 114 Bindings section in Abstractions vs. bindings 118 ``rust/bindings/bindings_helper.h``, the ``bindgen`` tool will auto-generate the [all …]
|
/linux/rust/kernel/drm/ |
H A D | device.rs | 8 bindings, device, drm, 20 bindings::drm_driver { 42 bindings::drm_driver { 58 dev: Opaque<bindings::drm_device>, 64 const VTABLE: bindings::drm_driver = drm_legacy_fields! { 95 const GEM_FOPS: bindings::file_operations = drm::gem::create_fops(); 103 bindings::__drm_dev_alloc( in new() 122 unsafe { bindings::drm_dev_put(ptr::addr_of_mut!((*raw_drm.as_ptr()).dev).cast()) }; in new() 130 pub(crate) fn as_raw(&self) -> *mut bindings::drm_device { in as_raw() 137 unsafe fn from_drm_device(ptr: *const bindings::drm_device) -> *mut Self { in from_drm_device() [all …]
|