News: 0001595884

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux 6.19 Will Allow You To Write I2C Drivers In Rust

([Linux Kernel] 5 Hours Ago Rust I2C Drivers)


With the upcoming [1]Linux 6.19 kernel cycle there are yet more Rust kernel bindings being introduced and other additions to make it possible to write more Linux kernel drivers within the Rust programming language. Among the new Rust additions expected for Linux 6.19 are making it possible to write Inter-Integrated Circuit (I2C) bus drivers in Rust.

Queued in the past two weeks to the [2]driver-core.git's driver-core-next Git branch are the patches enabling the Rust I2C bindings as well as sample drivers. Thus with the Linux 6.19 merge window expected to open as soon as tonight, Rust I2C drivers will become a possibility once the driver-core code gets submitted and merged.

This code coming for Linux 6.19 adds all the groundwork for writing Linux I2C drivers in Rust, including the core abstractions, an API for registering I2C devices, and then sample I2C driver code.

Beyond the Rust I2C sample driver code, for Linux 6.19 there doesn't appear to be any actual Rust I2C hardware drivers in tow at this point.



[1] https://www.phoronix.com/search/Linux+6.19

[2] https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git/log/?h=driver-core-next



"I have examined Bogota," he said, "and the case is clearer to me.
I think very probably he might be cured."
"That is what I have always hoped," said old Yacob.
"His brain is affected," said the blind doctor.
The elders murmured assent.
"Now, what affects it?"
"Ah!" said old Yacob.
"This," said the doctor, answering his own question. "Those queer
things that are called the eyes, and which exist to make an agreeable soft
depression in the face, are diseased, in the case of Bogota, in such a way
as to affect his brain. They are greatly distended, he has eyelashes, and
his eyelids move, and consequently his brain is in a state of constant
irritation and distraction."
"Yes?" said old Yacob. "Yes?"
"And I think I may say with reasonable certainty that, in order
to cure him completely, all that we need do is a simple and easy surgical
operation -- namely, to remove those irritant bodies."
"And then he will be sane?"
"Then he will be perfectly sane, and a quite admirable citizen."
"Thank heaven for science!" said old Yacob.
-- H. G. Wells, "The Country of the Blind"