<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/samples/rust/rust_misc_device.rs, branch v6.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-04-01T18:26:08Z</updated>
<entry>
<title>Merge tag 'char-misc-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc</title>
<updated>2025-04-01T18:26:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-04-01T18:26:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=25601e85441dd91cf7973b002f27af4c5b8691ea'/>
<id>urn:sha1:25601e85441dd91cf7973b002f27af4c5b8691ea</id>
<content type='text'>
Pull char / misc / IIO driver updates from Greg KH:
 "Here is the big set of char, misc, iio, and other smaller driver
  subsystems for 6.15-rc1. Lots of stuff in here, including:

   - loads of IIO changes and driver updates

   - counter driver updates

   - w1 driver updates

   - faux conversions for some drivers that were abusing the platform
     bus interface

   - coresight driver updates

   - rust miscdevice binding updates based on real-world-use

   - other minor driver updates

  All of these have been in linux-next with no reported issues for quite
  a while"

* tag 'char-misc-6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (292 commits)
  samples: rust_misc_device: fix markup in top-level docs
  Coresight: Fix a NULL vs IS_ERR() bug in probe
  misc: lis3lv02d: convert to use faux_device
  tlclk: convert to use faux_device
  regulator: dummy: convert to use the faux device interface
  bus: mhi: host: Fix race between unprepare and queue_buf
  coresight: configfs: Constify struct config_item_type
  doc: iio: ad7380: describe offload support
  iio: ad7380: add support for SPI offload
  iio: light: Add check for array bounds in veml6075_read_int_time_ms
  iio: adc: ti-ads7924 Drop unnecessary function parameters
  staging: iio: ad9834: Use devm_regulator_get_enable()
  staging: iio: ad9832: Use devm_regulator_get_enable()
  iio: gyro: bmg160_spi: add of_match_table
  dt-bindings: iio: adc: Add i.MX94 and i.MX95 support
  iio: adc: ad7768-1: remove unnecessary locking
  Documentation: ABI: add wideband filter type to sysfs-bus-iio
  iio: adc: ad7768-1: set MOSI idle state to prevent accidental reset
  iio: adc: ad7768-1: Fix conversion result sign
  iio: adc: ad7124: Benefit of dev = indio_dev-&gt;dev.parent in ad7124_parse_channel_config()
  ...
</content>
</entry>
<entry>
<title>samples: rust_misc_device: fix markup in top-level docs</title>
<updated>2025-03-17T07:06:07Z</updated>
<author>
<name>Alice Ryhl</name>
<email>aliceryhl@google.com</email>
</author>
<published>2025-03-13T08:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a24b18aa4fd619cc7961dae3395473c355bb5b6a'/>
<id>urn:sha1:a24b18aa4fd619cc7961dae3395473c355bb5b6a</id>
<content type='text'>
The meaning of /// is to document the thing that comes after it, so
currently the example is documentation for the `use core::pin::Pin;`
statement. To write top-level docs (and have them rendered as such in
the html by rustdoc), use //! instead.

This does not change the contents of the docs at all. The only change is
changing /// to //!.

Signed-off-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Fixes: 8d9b095b8f89 ("samples: rust_misc_device: Provide an example C program to exercise functionality")
Reviewed-by: Benno Lossin &lt;benno.lossin@proton.me&gt;
Reviewed-by: Christian Schrefl &lt;chrisi.schrefl@gmail.com&gt;
Link: https://lore.kernel.org/r/20250313-rust_misc_device_tld-v1-1-a519bced9a6d@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rust: module: introduce `authors` key</title>
<updated>2025-03-10T14:12:17Z</updated>
<author>
<name>Guilherme Giacomo Simoes</name>
<email>trintaeoitogc@gmail.com</email>
</author>
<published>2025-03-09T17:57:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38559da6afb239e271e709588babe7f98195096b'/>
<id>urn:sha1:38559da6afb239e271e709588babe7f98195096b</id>
<content type='text'>
In the `module!` macro, the `author` field is currently of type `String`.

Since modules can have multiple authors, this limitation prevents
specifying more than one.

Add an `authors` field as `Option&lt;Vec&lt;String&gt;&gt;` to allow creating
modules with multiple authors, and change the documentation and all
current users to use it. Eventually, the single `author` field may
be removed.

[ The `modinfo` key needs to still be `author`; otherwise, tooling
  may not work properly, e.g.:

      $ modinfo --author samples/rust/rust_print.ko
      Rust for Linux Contributors

  I have also kept the original `author` field (undocumented), so
  that we can drop it more easily in a kernel cycle or two.

    - Miguel ]

Suggested-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Link: https://github.com/Rust-for-Linux/linux/issues/244
Reviewed-by: Charalampos Mitrodimas &lt;charmitro@posteo.net&gt;
Reviewed-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Reviewed-by: Andreas Hindborg &lt;a.hindborg@kernel.org&gt;
Signed-off-by: Guilherme Giacomo Simoes &lt;trintaeoitogc@gmail.com&gt;
Link: https://lore.kernel.org/r/20250309175712.845622-2-trintaeoitogc@gmail.com
[ Fixed `modinfo` key. Kept `author` field. Reworded message
  accordingly. Updated my email. - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>samples: rust_misc_device: Provide an example C program to exercise functionality</title>
<updated>2024-12-16T15:12:56Z</updated>
<author>
<name>Lee Jones</name>
<email>lee@kernel.org</email>
</author>
<published>2024-12-13T13:47:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d9b095b8f898bddc6c59a3eb9f50c1aa194c57a'/>
<id>urn:sha1:8d9b095b8f898bddc6c59a3eb9f50c1aa194c57a</id>
<content type='text'>
Here is the expected output (manually spliced together):

USERSPACE: Opening /dev/rust-misc-device for reading and writing
KERNEL: rust_misc_device: Opening Rust Misc Device Sample
USERSPACE: Calling Hello
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -&gt; Hello from the Rust Misc Device
USERSPACE: Fetching initial value
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -&gt; Copying data to userspace (value: 0)
USERSPACE: Submitting new value (1)
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -&gt; Copying data from userspace (value: 1)
USERSPACE: Fetching new value
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -&gt; Copying data to userspace (value: 1)
USERSPACE: Attempting to call in to an non-existent IOCTL
KERNEL: rust_misc_device: IOCTLing Rust Misc Device Sample
KERNEL: rust_misc_device: -&gt; IOCTL not recognised: 20992
USERSPACE: ioctl: Succeeded to fail - this was expected: Inappropriate ioctl for device
USERSPACE: Closing /dev/rust-misc-device
KERNEL: rust_misc_device: Exiting the Rust Misc Device Sample
USERSPACE: Success

Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20241213134715.601415-6-lee@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>samples: rust_misc_device: Demonstrate additional get/set value functionality</title>
<updated>2024-12-16T15:12:53Z</updated>
<author>
<name>Lee Jones</name>
<email>lee@kernel.org</email>
</author>
<published>2024-12-13T13:47:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=42523ceba5f6735df4d02c6982d1733a1465afbd'/>
<id>urn:sha1:42523ceba5f6735df4d02c6982d1733a1465afbd</id>
<content type='text'>
Expand the complexity of the sample driver by providing the ability to
get and set an integer.  The value is protected by a mutex.

Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20241213134715.601415-4-lee@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>samples: rust: Provide example using the new Rust MiscDevice abstraction</title>
<updated>2024-12-16T15:12:45Z</updated>
<author>
<name>Lee Jones</name>
<email>lee@kernel.org</email>
</author>
<published>2024-12-13T13:47:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fdb1ac6c302689b286eca9bb7247111bffc7db17'/>
<id>urn:sha1:fdb1ac6c302689b286eca9bb7247111bffc7db17</id>
<content type='text'>
This sample driver demonstrates the following basic operations:

* Register a Misc Device
* Create /dev/rust-misc-device
* Provide open call-back for the aforementioned character device
* Operate on the character device via a simple ioctl()
* Provide close call-back for the character device

Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Reviewed-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Link: https://lore.kernel.org/r/20241213134715.601415-3-lee@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
