From patchwork Sat Jan 25 12:39:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13950350 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A397D207E18 for ; Sat, 25 Jan 2025 12:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808820; cv=none; b=iXDEnQm0KYuI/PIdBbsVlXmpSL4fAA8T4G9kB6pPGZcfgy8IU9l7ls6vaPdsKvcoAXW/Sa4RdCprfL1h/yWO8Hxw9hRhuUCx1q8BqtkqkPSGr97FwOsRjKe/mZBqoV73Ikm23Lg5eOb3mZ3FGXQeKvwtAbnWs5wz0DuZUZQmkS4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808820; c=relaxed/simple; bh=smprCYyFwoIZjRwIHe+Jo5e7e+pNpG3uSmHSFdWkK88=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qW6Fek+obboiVF4hFbfKJ6izVT3pvvThKcjzHCidmowmnM9z+T/88SSIUzZMoTGLHsf+h5SQYKlSHglp1R1WeFRkeEyD2nkicdp38Aqv9AG4N0EFKu8FhI7hP3zp293bSfLg4EVtCj0/tjmdAVX0sRgTd1TloSlhXcYVH5W4oVY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=AVzrOk72; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="AVzrOk72" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=2WOFRJFj98MocYfXFeBJDF4Pl26hqhV5yVfrAZs/QmY=; b=AVzrOk 72cS61tjo6B8txQdmHN7A8nZx8/bOKF+xuORnuqDK+eP94X6ePfbzsAf5oK4L7Gi fFgGfB8hbifaiMdeU2rLi4Ln+mouCWlVsHIYz/17IUdSpnRc2UowPp4J6PICVabZ f2njJ6lG/WFgGcOR825wJCVZ73vZ2jIwJ9LGak7mclsaKO31w/lAU6WKKFzCQJFZ 0lGPeuKIWgVHu5C1sHkHWaRJ90OmjuusVoYoBw5BOcUBZIRC8/9gUU66287qVy3r q6ghusiSYm9GtDng5Gwi0OfliAa6XeDVDxHghrk24v3NG7WCFgRk5hu3a490EgZn J0W0HGUV5RW8kl5Q== Received: (qmail 3871131 invoked from network); 25 Jan 2025 13:40:08 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 25 Jan 2025 13:40:08 +0100 X-UD-Smtp-Session: l3s3148p1@EjuyJIcs2q8ujnvm From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Subject: [PATCH RFT 1/6] hwmon: (ina3221) Use per-client debugfs entry Date: Sat, 25 Jan 2025 13:39:41 +0100 Message-ID: <20250125123941.36729-9-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> References: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The I2C core now offers a debugfs-directory per client. Use it and remove the custom handling. Signed-off-by: Wolfram Sang --- drivers/hwmon/ina3221.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c index 1bf479a0f793..ce0e3f214f5b 100644 --- a/drivers/hwmon/ina3221.c +++ b/drivers/hwmon/ina3221.c @@ -116,7 +116,6 @@ struct ina3221_input { * @fields: Register fields of the device * @inputs: Array of channel input source specific structures * @lock: mutex lock to serialize sysfs attribute accesses - * @debugfs: Pointer to debugfs entry for device * @reg_config: Register value of INA3221_CONFIG * @summation_shunt_resistor: equivalent shunt resistor value for summation * @summation_channel_control: Value written to SCC field in INA3221_MASK_ENABLE @@ -128,7 +127,6 @@ struct ina3221_data { struct regmap_field *fields[F_MAX_FIELDS]; struct ina3221_input inputs[INA3221_NUM_CHANNELS]; struct mutex lock; - struct dentry *debugfs; u32 reg_config; int summation_shunt_resistor; u32 summation_channel_control; @@ -913,12 +911,9 @@ static int ina3221_probe(struct i2c_client *client) goto fail; } - scnprintf(name, sizeof(name), "%s-%s", INA3221_DRIVER_NAME, dev_name(dev)); - ina->debugfs = debugfs_create_dir(name, NULL); - for (i = 0; i < INA3221_NUM_CHANNELS; i++) { scnprintf(name, sizeof(name), "in%d_summation_disable", i); - debugfs_create_bool(name, 0400, ina->debugfs, + debugfs_create_bool(name, 0400, client->debugfs, &ina->inputs[i].summation_disable); } @@ -940,8 +935,6 @@ static void ina3221_remove(struct i2c_client *client) struct ina3221_data *ina = dev_get_drvdata(&client->dev); int i; - debugfs_remove_recursive(ina->debugfs); - pm_runtime_disable(ina->pm_dev); pm_runtime_set_suspended(ina->pm_dev); From patchwork Sat Jan 25 12:39:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13950348 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC2722080D5 for ; Sat, 25 Jan 2025 12:40:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808820; cv=none; b=i9rXzQqm0QmTaOlrYxQpbyHw0BUhYIpfYfFFgKoPFyWWMJZI/pdxkXTo9WvmBFan1E2Jq94MdIqsz+yfDG/FZMNfpoVtDHjXtfWll14fqjWvWZxAp7d+9XGRMfa5riN8yjPsZnGYJj6jNd8AmDMLPUmolhzVJTvqcvEdqzc0qME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808820; c=relaxed/simple; bh=CoZtDHj2DzknZn7Aq9mOsSbhKnPVORJxAW0j5rrCV7Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nufXWp7ToYD59hRqIzwUhoNaImxlzeuNIdEAueA6rgs8fpIRjsRV+hcYJtgyN0UWcQS5ScQigtDgj49QlFrDEmAlcIvM8dYauRfAQma2N7jkwrIvwCSt/MqssmhTSRN+ZtEmucUHOkw2LduO1JeroaLBXjrBB8FN2oobL6QTEcE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=Ph1BKOib; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="Ph1BKOib" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=BmIgzuvtTXIRzbyuMaBqbNheEksULVal5rJMWSPrzD4=; b=Ph1BKO ib5DbWRYGCwbc9yPjTTQD54QdQ8gc3HxmbOD7sbLSs/puZdqYpYPs3aQywTyZrgH 7w3wxmN+NTZgX9rZzlkT2vPpAk29nxnJ76fipOrrdu9tBlSny09sA1ua5ZtJ5wX2 bzZyLgVn8vU7FvOPQD1mKLz9Z/HezWRqTUyDyxPa3gkvjJqRY3oFKGmc2QQ3v5bC 26dgKZHjxH33qTd/psP63NESZ1lqT3b5h6EtOd49pHnfUQEcxw3fDLsH7EbvFaDv ACraoXpa1US3CHnMzSrnHQ8xd353xp1EAbOTsbPxN3Tvn6EGGZMGU8jvIxuh2xpk HaLmFgWNmvVFtBWw== Received: (qmail 3871161 invoked from network); 25 Jan 2025 13:40:09 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 25 Jan 2025 13:40:09 +0100 X-UD-Smtp-Session: l3s3148p1@RIfAJIcs3K8ujnvm From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Nuno Sa , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Subject: [PATCH RFT 2/6] hwmon: (ltc4282) Use per-client debugfs entry Date: Sat, 25 Jan 2025 13:39:42 +0100 Message-ID: <20250125123941.36729-10-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> References: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The I2C core now offers a debugfs-directory per client. Use it and remove the custom handling. Signed-off-by: Wolfram Sang --- drivers/hwmon/ltc4282.c | 44 ++++++++--------------------------------- 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c index 4f608a3790fb..7f38d2696239 100644 --- a/drivers/hwmon/ltc4282.c +++ b/drivers/hwmon/ltc4282.c @@ -1674,47 +1674,19 @@ static int ltc4282_show_power1_bad_fault_log(void *arg, u64 *val) DEFINE_DEBUGFS_ATTRIBUTE(ltc4282_power1_bad_fault_log, ltc4282_show_power1_bad_fault_log, NULL, "%llu\n"); -static void ltc4282_debugfs_remove(void *dir) +static void ltc4282_debugfs_init(struct ltc4282_state *st, struct i2c_client *i2c) { - debugfs_remove_recursive(dir); -} - -static void ltc4282_debugfs_init(struct ltc4282_state *st, - struct i2c_client *i2c, - const struct device *hwmon) -{ - const char *debugfs_name; - struct dentry *dentry; - int ret; - - if (!IS_ENABLED(CONFIG_DEBUG_FS)) - return; - - debugfs_name = devm_kasprintf(&i2c->dev, GFP_KERNEL, "ltc4282-%s", - dev_name(hwmon)); - if (!debugfs_name) - return; - - dentry = debugfs_create_dir(debugfs_name, NULL); - if (IS_ERR(dentry)) - return; - - ret = devm_add_action_or_reset(&i2c->dev, ltc4282_debugfs_remove, - dentry); - if (ret) - return; - - debugfs_create_file_unsafe("power1_bad_fault_log", 0400, dentry, st, + debugfs_create_file_unsafe("power1_bad_fault_log", 0400, i2c->debugfs, st, <c4282_power1_bad_fault_log); - debugfs_create_file_unsafe("in0_fet_short_fault_log", 0400, dentry, st, + debugfs_create_file_unsafe("in0_fet_short_fault_log", 0400, i2c->debugfs, st, <c4282_fet_short_fault_log); - debugfs_create_file_unsafe("in0_fet_bad_fault_log", 0400, dentry, st, + debugfs_create_file_unsafe("in0_fet_bad_fault_log", 0400, i2c->debugfs, st, <c4282_fet_bad_fault_log); - debugfs_create_file_unsafe("in1_crit_fault_log", 0400, dentry, st, + debugfs_create_file_unsafe("in1_crit_fault_log", 0400, i2c->debugfs, st, <c4282_in1_crit_fault_log); - debugfs_create_file_unsafe("in1_lcrit_fault_log", 0400, dentry, st, + debugfs_create_file_unsafe("in1_lcrit_fault_log", 0400, i2c->debugfs, st, <c4282_in1_lcrit_fault_log); - debugfs_create_file_unsafe("curr1_crit_fault_log", 0400, dentry, st, + debugfs_create_file_unsafe("curr1_crit_fault_log", 0400, i2c->debugfs, st, <c4282_curr1_crit_fault_log); } @@ -1757,7 +1729,7 @@ static int ltc4282_probe(struct i2c_client *i2c) if (IS_ERR(hwmon)) return PTR_ERR(hwmon); - ltc4282_debugfs_init(st, i2c, hwmon); + ltc4282_debugfs_init(st, i2c); return 0; } From patchwork Sat Jan 25 12:39:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13950349 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0AFE02080DA for ; Sat, 25 Jan 2025 12:40:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808820; cv=none; b=EERsILr1uwDGEdFAX4eauq+8cCY/Nxup7SAnT4qnGZlySb0LdggaoR5TSKu536iKde1I7WPhtS1T9/WWrg64Y32ocxGBo6GkehIO7Bp9EuPlhIj8sPBQi/OPhAuLBu9K5G3w9yQtppfzsMM5Gn3B6aNgTajHO5D1uSh9YcVFQp4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808820; c=relaxed/simple; bh=/b5qQuglifflzOxcu25XJBmzO7Br0rKwUGqcu9Oq1Js=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B+FAHM/ofP5kYnGkFePSWDYtpGizJmg75Jvqc82/yniSW6Ct6OvTr+SPvhmiYO2VGi3koLTOtX0ArkDD01N+dgfLfyRcn8ptUYfEvVpDnmnooqXebgN4S8LxAeJFLFppqmKtWAXfnNnluhlHGQIQPQT9PdTyN4qOqmitRRvzy9g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=EH79b37C; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="EH79b37C" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=larzix8/bqXE08GPMM/1OuFjHmPlY/ag374YHx8Yuo4=; b=EH79b3 7CZZGitWE+YOV/PtNtPx1mWnUqg/be88pOSOcColXe0lgYNP7XnJyuDtsP12bmX1 R9XG43J8Gfav9BFbDg4it2kXYYn7OnQo/DGE73jGu5R3SqBxZ3tZU/7cBmIUIvn8 I8xuionbXfF5TknKWBcynzquAzLYltJ6GvPQTBx57ZLzJbmmhA9AzbTqy669xYO7 R1K881/4ZlOR4Tx2DeeQswTGyk+aeYubHlcPU2IA8Wm/KwEAWSK533PObYHdl8Fr NL/P+gR4ltL9dUuqL8jNIMfYLewVlP1+ZnzUDfJH6IiemQZiD+kSMZg4Bgndfl3h wD1F3pOoN3CYrvDw== Received: (qmail 3871195 invoked from network); 25 Jan 2025 13:40:10 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 25 Jan 2025 13:40:10 +0100 X-UD-Smtp-Session: l3s3148p1@TQzNJIcs6K8ujnvm From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Cosmo Chou , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Subject: [PATCH RFT 3/6] hwmon: (pt5161l) Use per-client debugfs entry Date: Sat, 25 Jan 2025 13:39:43 +0100 Message-ID: <20250125123941.36729-11-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> References: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The I2C core now offers a debugfs-directory per client. Use it and remove the custom handling. Signed-off-by: Wolfram Sang --- drivers/hwmon/pt5161l.c | 59 +++++++++-------------------------------- 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/drivers/hwmon/pt5161l.c b/drivers/hwmon/pt5161l.c index a9f0b23f9e76..1359d317024c 100644 --- a/drivers/hwmon/pt5161l.c +++ b/drivers/hwmon/pt5161l.c @@ -63,7 +63,6 @@ struct pt5161l_fw_ver { /* Each client has this additional data */ struct pt5161l_data { struct i2c_client *client; - struct dentry *debugfs; struct pt5161l_fw_ver fw_ver; struct mutex lock; /* for atomic I2C transactions */ bool init_done; @@ -72,8 +71,6 @@ struct pt5161l_data { bool mm_wide_reg_access; /* MM assisted wide register access */ }; -static struct dentry *pt5161l_debugfs_dir; - /* * Write multiple data bytes to Aries over I2C */ @@ -568,23 +565,6 @@ static const struct file_operations pt5161l_debugfs_ops_hb_sts = { .open = simple_open, }; -static int pt5161l_init_debugfs(struct pt5161l_data *data) -{ - data->debugfs = debugfs_create_dir(dev_name(&data->client->dev), - pt5161l_debugfs_dir); - - debugfs_create_file("fw_ver", 0444, data->debugfs, data, - &pt5161l_debugfs_ops_fw_ver); - - debugfs_create_file("fw_load_status", 0444, data->debugfs, data, - &pt5161l_debugfs_ops_fw_load_sts); - - debugfs_create_file("heartbeat_status", 0444, data->debugfs, data, - &pt5161l_debugfs_ops_hb_sts); - - return 0; -} - static int pt5161l_probe(struct i2c_client *client) { struct device *dev = &client->dev; @@ -600,21 +580,21 @@ static int pt5161l_probe(struct i2c_client *client) pt5161l_init_dev(data); dev_set_drvdata(dev, data); - hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, - data, - &pt5161l_chip_info, - NULL); + hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, data, + &pt5161l_chip_info, NULL); + if (IS_ERR(hwmon_dev)) + return PTR_ERR(hwmon_dev); - pt5161l_init_debugfs(data); + debugfs_create_file("fw_ver", 0444, client->debugfs, data, + &pt5161l_debugfs_ops_fw_ver); - return PTR_ERR_OR_ZERO(hwmon_dev); -} + debugfs_create_file("fw_load_status", 0444, client->debugfs, data, + &pt5161l_debugfs_ops_fw_load_sts); -static void pt5161l_remove(struct i2c_client *client) -{ - struct pt5161l_data *data = i2c_get_clientdata(client); + debugfs_create_file("heartbeat_status", 0444, client->debugfs, data, + &pt5161l_debugfs_ops_hb_sts); - debugfs_remove_recursive(data->debugfs); + return 0; } static const struct of_device_id __maybe_unused pt5161l_of_match[] = { @@ -643,24 +623,9 @@ static struct i2c_driver pt5161l_driver = { .acpi_match_table = ACPI_PTR(pt5161l_acpi_match), }, .probe = pt5161l_probe, - .remove = pt5161l_remove, .id_table = pt5161l_id, }; - -static int __init pt5161l_init(void) -{ - pt5161l_debugfs_dir = debugfs_create_dir("pt5161l", NULL); - return i2c_add_driver(&pt5161l_driver); -} - -static void __exit pt5161l_exit(void) -{ - i2c_del_driver(&pt5161l_driver); - debugfs_remove_recursive(pt5161l_debugfs_dir); -} - -module_init(pt5161l_init); -module_exit(pt5161l_exit); +module_i2c_driver(pt5161l_driver); MODULE_AUTHOR("Cosmo Chou "); MODULE_DESCRIPTION("Hwmon driver for Astera Labs Aries PCIe retimer"); From patchwork Sat Jan 25 12:39:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13950352 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B139E2080E5 for ; Sat, 25 Jan 2025 12:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808820; cv=none; b=KG8hYPKkgcVU1Kzh5yWm4tqCe/S+mKl7AHPyea5KCIoKXYQFBcrCaV//05xC0MK8+yufWsHGRwxuY+iZMuRhhlGCWTQMpK4RkipyoWzd7DlG/g//oIfMaxfdEQf+DatbksnzD6i4eogxQahPzImodbluv2y73gzppbR2nGdN7tc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808820; c=relaxed/simple; bh=4FyPcj/4fIrxiC0mQYqgahm27/XQOYAqcYeE76e8LmM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nFRiBUA2LdADpkLkmRhvZE43zgktho2kh6bQanTfwAM+4vceFZpOQ1g8UurKnriL+xGOvfq4IR2PxE1dnFBez9TIJSQaWUvdCPjL4CzOIDPmvaZQy2hnOU35WzTfLIVJ7eEpWFAPIgWCzGAtPpDpIHvKa2oCUxKehsAj/B27ki0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=aTNi8Re5; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="aTNi8Re5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=I3TIhRxKYBkgBIjkteSbYIZBRiVFShfDeceyu+anPxQ=; b=aTNi8R e5GPvNnmxZmTe1TUhhm2d+IZOhxvEfXFEuAHUHVgxhVkkjeIKkHbiVZNP9N/cCt1 e/QAj/VN5Ae2PZm3VaPcHH5cTMhP064wEqKBYgYKA/DuQRGnTSVs2hV89phnA7jU PnQVBP8XiASKxMdD1FvJf+ld++vsMu5Ujer7lKfR1KkUMYyVB4zPbYyMAciiKa6r dVFJlFvyJlQQqMLf0ezXE39l70xPNVJmWZ9SpQV/tOd1t2E7X1neokXq4a02s5uv Vp0ighbuO3L1Itoy4nFDvyhQ6g3pfUVJOF1bvsfNYswNhgIZO38c+5IJNV/4Nh8z R+ImuUrsjqfsVRLQ== Received: (qmail 3871227 invoked from network); 25 Jan 2025 13:40:11 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 25 Jan 2025 13:40:11 +0100 X-UD-Smtp-Session: l3s3148p1@/fvZJIcs6q8ujnvm From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Subject: [PATCH RFT 4/6] hwmon: (sg2042) Use per-client debugfs entry Date: Sat, 25 Jan 2025 13:39:44 +0100 Message-ID: <20250125123941.36729-12-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> References: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The I2C core now offers a debugfs-directory per client. Use it and remove the custom handling. Signed-off-by: Wolfram Sang --- drivers/hwmon/sg2042-mcu.c | 44 ++++++-------------------------------- 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/drivers/hwmon/sg2042-mcu.c b/drivers/hwmon/sg2042-mcu.c index aa3fb773602c..74c35945d169 100644 --- a/drivers/hwmon/sg2042-mcu.c +++ b/drivers/hwmon/sg2042-mcu.c @@ -50,12 +50,9 @@ struct sg2042_mcu_data { struct i2c_client *client; - struct dentry *debugfs; struct mutex mutex; }; -static struct dentry *sgmcu_debugfs; - static ssize_t reset_count_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -292,18 +289,15 @@ static const struct hwmon_chip_info sg2042_mcu_chip_info = { .info = sg2042_mcu_info, }; -static void sg2042_mcu_debugfs_init(struct sg2042_mcu_data *mcu, - struct device *dev) +static void sg2042_mcu_debugfs_init(struct sg2042_mcu_data *mcu) { - mcu->debugfs = debugfs_create_dir(dev_name(dev), sgmcu_debugfs); - - debugfs_create_file("firmware_version", 0444, mcu->debugfs, + debugfs_create_file("firmware_version", 0444, mcu->client->debugfs, mcu, &firmware_version_fops); - debugfs_create_file("pcb_version", 0444, mcu->debugfs, mcu, + debugfs_create_file("pcb_version", 0444, mcu->client->debugfs, mcu, &pcb_version_fops); - debugfs_create_file("mcu_type", 0444, mcu->debugfs, mcu, + debugfs_create_file("mcu_type", 0444, mcu->client->debugfs, mcu, &mcu_type_fops); - debugfs_create_file("board_type", 0444, mcu->debugfs, mcu, + debugfs_create_file("board_type", 0444, mcu->client->debugfs, mcu, &board_type_fops); } @@ -333,18 +327,11 @@ static int sg2042_mcu_i2c_probe(struct i2c_client *client) if (IS_ERR(hwmon_dev)) return PTR_ERR(hwmon_dev); - sg2042_mcu_debugfs_init(mcu, dev); + sg2042_mcu_debugfs_init(mcu); return 0; } -static void sg2042_mcu_i2c_remove(struct i2c_client *client) -{ - struct sg2042_mcu_data *mcu = i2c_get_clientdata(client); - - debugfs_remove_recursive(mcu->debugfs); -} - static const struct i2c_device_id sg2042_mcu_id[] = { { "sg2042-hwmon-mcu" }, { } @@ -364,25 +351,8 @@ static struct i2c_driver sg2042_mcu_driver = { .dev_groups = sg2042_mcu_groups, }, .probe = sg2042_mcu_i2c_probe, - .remove = sg2042_mcu_i2c_remove, .id_table = sg2042_mcu_id, }; +module_i2c_driver(sg2042_mcu_driver); -static int __init sg2042_mcu_init(void) -{ - sgmcu_debugfs = debugfs_create_dir("sg2042-mcu", NULL); - return i2c_add_driver(&sg2042_mcu_driver); -} - -static void __exit sg2042_mcu_exit(void) -{ - debugfs_remove_recursive(sgmcu_debugfs); - i2c_del_driver(&sg2042_mcu_driver); -} - -module_init(sg2042_mcu_init); -module_exit(sg2042_mcu_exit); - -MODULE_AUTHOR("Inochi Amaoto "); -MODULE_DESCRIPTION("MCU I2C driver for SG2042 soc platform"); MODULE_LICENSE("GPL"); From patchwork Sat Jan 25 12:39:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13950354 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD1FB2080F6 for ; Sat, 25 Jan 2025 12:40:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808823; cv=none; b=X/7Cc3c4uJgzfQfx4tk4Oya1G1pif5P9eKwLw3NVEZUsjkWBOEMCrMr5dcCmWyt6Pt/CZrK5gCqYCsP8H5OP7d+2PYAWorfbzG/yaPVg3+kwMESlwty8gBnWWpnV56Up0nFVoG8j+tKW6a9+BLTe1qCFFPdTeksu2Lpfln+qO0Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808823; c=relaxed/simple; bh=CJvzYJf5g5rEeWvK7/SUMIlM75WusBOssVylLiKRSpo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ggbEk9lemuU39FWnFAfBPfCpVUwKVHM603fnyjOmPuAnSKjrIwfXfz2uwqZ+GJzAuOh3OU9dnv18H2FGDSGmAQsBtRWd8qEXuvd0KDBYXnZczu1hdqZhEFgcZVxn1pSKDEVPU2QkUUmAK+pkH/iHW8uKQ7HfRJKrGnz4IB1nxJg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=ceRTgX5X; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="ceRTgX5X" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=vlIQU4MZ6pSduTmrPoJe8oP+MM8crSkqeS4MWFCRdJg=; b=ceRTgX 5XCGOtdFrgDWHe32kAhg8aF/spj9O/MvBnpWrq9IPl/aO3sKhV3LLS81147K7cFD wpRRDD7xSHGeyoeg4XrnQ01FDGqa63rDcFL6sqAc0ZEKC94af15bAKV5umwPV5+5 gk4DY/sirpyeONciO7UE4ex1iTlHa2SvKNB0izw41tbIUtOFou5iFKY5sFoOp9G4 TmRjLtvUgutPBQJKS3uZYGWDh8rceNcM1RtBKnDa9lCigO1qEXkPJsXpNfYMjMy4 e8DIo6g4A9YdKAUNguaKFGiGI0o3qMTriO0MkkmVRmqv3t6sL6cApuED2H6/yvwh zsRjX6pxsG2QIHiw== Received: (qmail 3871258 invoked from network); 25 Jan 2025 13:40:11 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 25 Jan 2025 13:40:11 +0100 X-UD-Smtp-Session: l3s3148p1@qDvnJIcs+q8ujnvm From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Subject: [PATCH RFT 5/6] hwmon: (sht3x) Use per-client debugfs entry Date: Sat, 25 Jan 2025 13:39:45 +0100 Message-ID: <20250125123941.36729-13-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> References: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The I2C core now offers a debugfs-directory per client. Use it and remove the custom handling. Signed-off-by: Wolfram Sang --- drivers/hwmon/sht3x.c | 57 ++++++------------------------------------- 1 file changed, 8 insertions(+), 49 deletions(-) diff --git a/drivers/hwmon/sht3x.c b/drivers/hwmon/sht3x.c index 650b0bcc2359..a6e7449de396 100644 --- a/drivers/hwmon/sht3x.c +++ b/drivers/hwmon/sht3x.c @@ -44,8 +44,6 @@ static const unsigned char sht3x_cmd_read_status_reg[] = { 0xf3, 0x2d }; static const unsigned char sht3x_cmd_clear_status_reg[] = { 0x30, 0x41 }; static const unsigned char sht3x_cmd_read_serial_number[] = { 0x37, 0x80 }; -static struct dentry *debugfs; - /* delays for single-shot mode i2c commands, both in us */ #define SHT3X_SINGLE_WAIT_TIME_HPM 15000 #define SHT3X_SINGLE_WAIT_TIME_MPM 6000 @@ -837,22 +835,6 @@ static int sht3x_write(struct device *dev, enum hwmon_sensor_types type, } } -static void sht3x_debugfs_init(struct sht3x_data *data) -{ - char name[32]; - - snprintf(name, sizeof(name), "i2c%u-%02x", - data->client->adapter->nr, data->client->addr); - data->sensor_dir = debugfs_create_dir(name, debugfs); - debugfs_create_u32("serial_number", 0444, - data->sensor_dir, &data->serial_number); -} - -static void sht3x_debugfs_remove(void *sensor_dir) -{ - debugfs_remove_recursive(sensor_dir); -} - static int sht3x_serial_number_read(struct sht3x_data *data) { int ret; @@ -931,27 +913,17 @@ static int sht3x_probe(struct i2c_client *client) return ret; ret = sht3x_serial_number_read(data); - if (ret) { + if (ret) dev_dbg(dev, "unable to read serial number\n"); - } else { - sht3x_debugfs_init(data); - ret = devm_add_action_or_reset(dev, - sht3x_debugfs_remove, - data->sensor_dir); - if (ret) - return ret; - } - - hwmon_dev = devm_hwmon_device_register_with_info(dev, - client->name, - data, - &sht3x_chip_info, - sht3x_groups); + hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name, data, + &sht3x_chip_info, sht3x_groups); if (IS_ERR(hwmon_dev)) - dev_dbg(dev, "unable to register hwmon device\n"); + return PTR_ERR(hwmon_dev); - return PTR_ERR_OR_ZERO(hwmon_dev); + debugfs_create_u32("serial_number", 0444, client->debugfs, &data->serial_number); + + return 0; } /* device ID table */ @@ -968,20 +940,7 @@ static struct i2c_driver sht3x_i2c_driver = { .probe = sht3x_probe, .id_table = sht3x_ids, }; - -static int __init sht3x_init(void) -{ - debugfs = debugfs_create_dir("sht3x", NULL); - return i2c_add_driver(&sht3x_i2c_driver); -} -module_init(sht3x_init); - -static void __exit sht3x_cleanup(void) -{ - debugfs_remove_recursive(debugfs); - i2c_del_driver(&sht3x_i2c_driver); -} -module_exit(sht3x_cleanup); +module_i2c_driver(sht3x_i2c_driver); MODULE_AUTHOR("David Frey "); MODULE_AUTHOR("Pascal Sachs "); From patchwork Sat Jan 25 12:39:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 13950353 Received: from mail.zeus03.de (zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF7622080E4 for ; Sat, 25 Jan 2025 12:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808821; cv=none; b=dQ95Oq667QYhZ3wDwk51I4Ona7HJE6RwMaQumn2jbXzgyP9pQbyZpQ2upyTehnSIpwlkQqkyLVq4QSkj6aCZ/8Dnm83iziqBFi9H/U4fParUga4bpOjp428k1um0jEU1fxjYEkdxdsXoGSudDv4iOjMOJpR1/YcyLGB6PeeYYpM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737808821; c=relaxed/simple; bh=C1Ed1/V5FUJJfkf5i/xzBuYZpQp3JGtjNsOessWUwuI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j/9xU1oVlcVBUL7Ck7fbVb+KctqXfVQVNQyXkCBneXAVlEFFo0vzM62+dFGZHhGKvS369RcqdUYbK8ucNtQeMqaEbVJjrolTg2HJQfaduABPMyQINUuJpi7Mn/Ydv08rj5Qb4PDSxBWZKS/ePXkRcRMljJg9UHNAB26akb/Cy2Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=SpM05Ovm; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="SpM05Ovm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=yW8nn4PqnneVia72AZOXVYIDYhz1EeldWyknAPPVGKg=; b=SpM05O vmmA+tHW73mtrOiJzF3Mml/hQpOq57bL5y+wM7xw7HNVinD/fo83YauCKEWECXzm 8HEbjvDhCYQgjC2x+MCv7meGRFU2wzYdaOILumYd5/PfPmEW0Y5qfqVbAOTcyPbA CI5l6kL7aG6mUHx+BXcEpNsw8pcItu0P2YDoMX1K/dorfrD4TFSD2I3/mYCPVPEx 1/b1GNFnX8uQw3igJmfWNoTAwwm+czOHIpoW3Dfi2TjvVP/guh4YQo4D2FJwgfAC 0KIBViQVQlNHT9gqGTZwOHB03cRZJ2zc3x9UTRo6kL+OWKGRy1hr2zdOIOUwiQKb 0c0NOduKWS1CAR7Q== Received: (qmail 3871287 invoked from network); 25 Jan 2025 13:40:12 +0100 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 25 Jan 2025 13:40:12 +0100 X-UD-Smtp-Session: l3s3148p1@WD/0JIcsALAujnvm From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Robert Marko , Luka Perkov , Jean Delvare , Guenter Roeck , linux-hwmon@vger.kernel.org Subject: [PATCH RFT 6/6] hwmon: (tps23861) Use per-client debugfs entry Date: Sat, 25 Jan 2025 13:39:46 +0100 Message-ID: <20250125123941.36729-14-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> References: <20250125123941.36729-8-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The I2C core now offers a debugfs-directory per client. Use it and remove the custom handling. Signed-off-by: Wolfram Sang --- drivers/hwmon/tps23861.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/drivers/hwmon/tps23861.c b/drivers/hwmon/tps23861.c index 80fb03f30c30..4cb3960d5170 100644 --- a/drivers/hwmon/tps23861.c +++ b/drivers/hwmon/tps23861.c @@ -114,7 +114,6 @@ struct tps23861_data { struct regmap *regmap; u32 shunt_resistor; struct i2c_client *client; - struct dentry *debugfs_dir; }; static const struct regmap_config tps23861_regmap_config = { @@ -503,25 +502,6 @@ static int tps23861_port_status_show(struct seq_file *s, void *data) DEFINE_SHOW_ATTRIBUTE(tps23861_port_status); -static void tps23861_init_debugfs(struct tps23861_data *data, - struct device *hwmon_dev) -{ - const char *debugfs_name; - - debugfs_name = devm_kasprintf(&data->client->dev, GFP_KERNEL, "%s-%s", - data->client->name, dev_name(hwmon_dev)); - if (!debugfs_name) - return; - - data->debugfs_dir = debugfs_create_dir(debugfs_name, NULL); - - debugfs_create_file("port_status", - 0400, - data->debugfs_dir, - data, - &tps23861_port_status_fops); -} - static int tps23861_probe(struct i2c_client *client) { struct device *dev = &client->dev; @@ -562,18 +542,12 @@ static int tps23861_probe(struct i2c_client *client) if (IS_ERR(hwmon_dev)) return PTR_ERR(hwmon_dev); - tps23861_init_debugfs(data, hwmon_dev); + debugfs_create_file("port_status", 0400, client->debugfs, data, + &tps23861_port_status_fops); return 0; } -static void tps23861_remove(struct i2c_client *client) -{ - struct tps23861_data *data = i2c_get_clientdata(client); - - debugfs_remove_recursive(data->debugfs_dir); -} - static const struct of_device_id __maybe_unused tps23861_of_match[] = { { .compatible = "ti,tps23861", }, { }, @@ -582,7 +556,6 @@ MODULE_DEVICE_TABLE(of, tps23861_of_match); static struct i2c_driver tps23861_driver = { .probe = tps23861_probe, - .remove = tps23861_remove, .driver = { .name = "tps23861", .of_match_table = of_match_ptr(tps23861_of_match),