Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: aat2870: Use per-client debugfs directory

The I2C core now provides a debugfs entry for each client. Let this
driver use it instead of the custom directory in debugfs root. Further
improvements by this change: automatic clean up on removal, support of
multiple instances.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250318091426.22258-2-wsa+renesas@sang-engineering.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Wolfram Sang and committed by
Lee Jones
1d2aeee6 18e6c1d2

+1 -6
+1 -3
drivers/mfd/aat2870-core.c
··· 320 320 321 321 static void aat2870_init_debugfs(struct aat2870_data *aat2870) 322 322 { 323 - aat2870->dentry_root = debugfs_create_dir("aat2870", NULL); 324 - 325 - debugfs_create_file("regs", 0644, aat2870->dentry_root, aat2870, 323 + debugfs_create_file("regs", 0644, aat2870->client->debugfs, aat2870, 326 324 &aat2870_reg_fops); 327 325 } 328 326
-3
include/linux/mfd/aat2870.h
··· 133 133 int (*read)(struct aat2870_data *aat2870, u8 addr, u8 *val); 134 134 int (*write)(struct aat2870_data *aat2870, u8 addr, u8 val); 135 135 int (*update)(struct aat2870_data *aat2870, u8 addr, u8 mask, u8 val); 136 - 137 - /* for debugfs */ 138 - struct dentry *dentry_root; 139 136 }; 140 137 141 138 struct aat2870_subdev_info {