|
33 | 33 | #include <linux/of_device.h>
|
34 | 34 | #include <linux/platform_device.h>
|
35 | 35 | #include <linux/refcount.h>
|
| 36 | +#include <linux/regmap.h> |
36 | 37 | #include <linux/sched/signal.h>
|
37 | 38 | #include <linux/security.h>
|
38 | 39 | #include <linux/spinlock.h>
|
@@ -298,6 +299,55 @@ void rust_helper_i2c_set_clientdata(struct i2c_client *client, void *data)
|
298 | 299 | }
|
299 | 300 | EXPORT_SYMBOL_GPL(rust_helper_i2c_set_clientdata);
|
300 | 301 |
|
| 302 | +struct regmap *rust_helper_regmap_init_i2c(struct i2c_client *i2c, |
| 303 | + const struct regmap_config *config) |
| 304 | +{ |
| 305 | + return regmap_init_i2c(i2c, config); |
| 306 | +} |
| 307 | +EXPORT_SYMBOL_GPL(rust_helper_regmap_init_i2c); |
| 308 | + |
| 309 | +int rust_helper_regmap_field_write(struct regmap_field *field, unsigned int val) |
| 310 | +{ |
| 311 | + return regmap_field_write(field, val); |
| 312 | +} |
| 313 | +EXPORT_SYMBOL_GPL(rust_helper_regmap_field_write); |
| 314 | + |
| 315 | +int rust_helper_regmap_field_force_write(struct regmap_field *field, |
| 316 | + unsigned int val) |
| 317 | +{ |
| 318 | + return regmap_field_force_write(field, val); |
| 319 | +} |
| 320 | +EXPORT_SYMBOL_GPL(rust_helper_regmap_field_force_write); |
| 321 | + |
| 322 | +int rust_helper_regmap_field_update_bits(struct regmap_field *field, |
| 323 | + unsigned int mask, unsigned int val) |
| 324 | +{ |
| 325 | + return regmap_field_update_bits(field, mask, val); |
| 326 | +} |
| 327 | +EXPORT_SYMBOL_GPL(rust_helper_regmap_field_update_bits); |
| 328 | + |
| 329 | +int rust_helper_regmap_field_set_bits(struct regmap_field *field, |
| 330 | + unsigned int bits) |
| 331 | +{ |
| 332 | + return regmap_field_set_bits(field, bits); |
| 333 | +} |
| 334 | +EXPORT_SYMBOL_GPL(rust_helper_regmap_field_set_bits); |
| 335 | + |
| 336 | +int rust_helper_regmap_field_clear_bits(struct regmap_field *field, |
| 337 | + unsigned int bits) |
| 338 | +{ |
| 339 | + return regmap_field_clear_bits(field, bits); |
| 340 | +} |
| 341 | +EXPORT_SYMBOL_GPL(rust_helper_regmap_field_clear_bits); |
| 342 | + |
| 343 | +int rust_helper_regmap_field_force_update_bits(struct regmap_field *field, |
| 344 | + unsigned int mask, |
| 345 | + unsigned int val) |
| 346 | +{ |
| 347 | + return regmap_field_force_update_bits(field, mask, val); |
| 348 | +} |
| 349 | +EXPORT_SYMBOL_GPL(rust_helper_regmap_field_force_update_bits); |
| 350 | + |
301 | 351 | /*
|
302 | 352 | * `bindgen` binds the C `size_t` type as the Rust `usize` type, so we can
|
303 | 353 | * use it in contexts where Rust expects a `usize` like slice (array) indices.
|
|
0 commit comments