diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-16 15:59:38 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-16 15:59:38 +0200 |
commit | 130395cf96bc2eff45e54eacd73cc251a30e92ea (patch) | |
tree | f51d99818c8c085d91ec3e2a313343fe1186317f /driver/main.h | |
parent | 3a0e12380b6316db215fd5c086fe6d8be108bd01 (diff) |
Diffstat (limited to 'driver/main.h')
-rw-r--r-- | driver/main.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/driver/main.h b/driver/main.h index 059f277..bdc4e5d 100644 --- a/driver/main.h +++ b/driver/main.h @@ -28,3 +28,12 @@ struct i2c_driver lork_driver = { .id_table = lork_ids, }; +ssize_t drv_attr_show(struct device_driver*, char*); +static const struct driver_attribute drv_attr = { + .attr = { + .name = "foo", // -> /sys/bus/i2c/drivers/lork/foo + .mode = 0444, + }, + .show = drv_attr_show, +}; + |