From patchwork Tue Dec 17 20:45:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shree Ramamoorthy X-Patchwork-Id: 13912478 Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) (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 8E36C1F9ECD; Tue, 17 Dec 2024 20:45:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.235 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468350; cv=none; b=MubU+YNjqRVA42Yx7sX24zCy6G8X2kvxpOIMzSQRGjdZixYpXHJZM1jkNGG9zDbK63f/BnIEIV6APnbSDCWbDBpa5AUWfl2kmxpkCKtaV6LprpKvm7W/2nFxkGyofUs/bgsaAKHEaugdX4Qp9k0tzSYEyKEmQmWt4dW4UCF6iUs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468350; c=relaxed/simple; bh=wqwX2LRN7Cvfj7zvG/L0j1RWpgnPCfXnXiwPiXsIasA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iSRY9TklKpaQd22QrdH0i1DVIPnpjpsBSmxQgv6B7GPSu7CbIwOcly5bKLMmT6KecuvtCsFckAXkTCGCAEOkPx7a0qMZ7UK55F7yYu1SMfhtyqmEpO5ZrUW3wer1pv5+FuBKpqp0CsQqN8IkSTR7j+IOY1MgaDTuafdWt4Hmpfg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=Mb+Z2Sk3; arc=none smtp.client-ip=198.47.23.235 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Mb+Z2Sk3" Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTPS id 4BHKjR46056650 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Dec 2024 14:45:27 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1734468327; bh=9y776ljyRYJrbtd+o/avgDnfB90ofxXiFoP5bQB6CTk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Mb+Z2Sk37sE7LTKVt10zY6Dm1h5eCQwAFYHxCyxDE3jjal6pWIDD1CExflFg7y6hV Q1d7f4wgDYX7x8mn2GXaIySwLqxr/BSc929PZj0OkatiS2JxoC7udDpEkpvzZpmq34 VZjKZu8MtCoud6A70Pz9nVWh552UQ9fvmN655V0s= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4BHKjRHo128936 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2024 14:45:27 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 17 Dec 2024 14:45:26 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 17 Dec 2024 14:45:26 -0600 Received: from DMZ007XYY.dhcp.ti.com (dmz007xyy.dhcp.ti.com [128.247.29.8]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKjQj1023682; Tue, 17 Dec 2024 14:45:26 -0600 From: Shree Ramamoorthy To: , , , , , , , , CC: , Subject: [PATCH v1 1/4] regulator: tps65219: Use dev_err_probe() instead of dev_err() Date: Tue, 17 Dec 2024 14:45:23 -0600 Message-ID: <20241217204526.1010989-2-s-ramamoorthy@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217204526.1010989-1-s-ramamoorthy@ti.com> References: <20241217204526.1010989-1-s-ramamoorthy@ti.com> Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Make the error message format unified by switching from dev_err() to dev_err_probe() where there is a chance of -EPROBE_DEFER returned. This helps simplify the error code where possible. Signed-off-by: Shree Ramamoorthy --- drivers/regulator/tps65219-regulator.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c index b4065356392f..14d843a99d0f 100644 --- a/drivers/regulator/tps65219-regulator.c +++ b/drivers/regulator/tps65219-regulator.c @@ -322,11 +322,11 @@ static int tps65219_regulator_probe(struct platform_device *pdev) dev_dbg(tps->dev, "%s regul i= %d START", __func__, i); rdev = devm_regulator_register(&pdev->dev, ®ulators[i], &config); - if (IS_ERR(rdev)) { - dev_err(tps->dev, "failed to register %s regulator\n", - regulators[i].name); - return PTR_ERR(rdev); - } + if (IS_ERR(rdev)) + return dev_err_probe(tps->dev, PTR_ERR(rdev), + "Failed to register %s regulator\n", + regulators[i].name); + rdevtbl[i] = rdev; dev_dbg(tps->dev, "%s regul i= %d COMPLETED", __func__, i); } From patchwork Tue Dec 17 20:45:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shree Ramamoorthy X-Patchwork-Id: 13912481 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 87FA41F9AAD; Tue, 17 Dec 2024 20:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468363; cv=none; b=ne7eOR0O3WpDGzHN0fP03c2/Qy0TN9tUbU+K3kQ6yuYKVB7k1YOq2Vrg/qfXZAeDD3g3rWFHD1YkgQx/sogenVcUCV36DMfd+tNnllqMeaPyL3jxjZ2LaI+TW75H7U6kozQ9DxbhkujRhRPVYskNGe643AbxouhN3g2d6G3xaSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468363; c=relaxed/simple; bh=YOI6h8XUIB/90wiMiXASh+OZXUQzf7Ce6dLej9RDjWM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BwOF7eMlzr9Z2Yn7XPmSPBsfLO3pPxzxjIsIJlxF5Mizm9bJHU7PcxoRAVOBEhMT/8mw+fVBXxpZT02csEj40o+f+oHowan8m0hfleyd5QIDBCs4lnvUBkZg2j7TEYEVxmHQ6LuRz1cWzQ4yHja4eB2KQuP/KLuXG5k5f05+VLM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=rakZ/KAx; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="rakZ/KAx" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKjRJK038606; Tue, 17 Dec 2024 14:45:27 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1734468327; bh=CIZma+nxV4y+meHOQX9kEBGIzHgsRLLP2aNuGZUN7Zs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=rakZ/KAxRJ2VJp9ROCGfJJpVW58vD7MUqL3szgHBVlbc9ya1+b6dBmjs2zV+Pt9Of 3gTEFQRBGelJcjW0kJZ5xAfTuGnCzpJjv9taVcrtQe2GXlJ8TKjb497GSMFmz4tL+V bVLjUWAWzLMfcg2nbzxr+9QZQKe62PrCdqHb3FUE= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4BHKjR49020477 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2024 14:45:27 -0600 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 17 Dec 2024 14:45:26 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 17 Dec 2024 14:45:26 -0600 Received: from DMZ007XYY.dhcp.ti.com (dmz007xyy.dhcp.ti.com [128.247.29.8]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKjQj2023682; Tue, 17 Dec 2024 14:45:26 -0600 From: Shree Ramamoorthy To: , , , , , , , , CC: , Subject: [PATCH v1 2/4] regulator: tps65219: Update driver name Date: Tue, 17 Dec 2024 14:45:24 -0600 Message-ID: <20241217204526.1010989-3-s-ramamoorthy@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217204526.1010989-1-s-ramamoorthy@ti.com> References: <20241217204526.1010989-1-s-ramamoorthy@ti.com> Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Follow the same naming convention in tps6594-regulator.c with tpsxxx-regulator instead of tpsxxx-pmic. Signed-off-by: Shree Ramamoorthy --- drivers/regulator/tps65219-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c index 14d843a99d0f..5decf69f327a 100644 --- a/drivers/regulator/tps65219-regulator.c +++ b/drivers/regulator/tps65219-regulator.c @@ -379,7 +379,7 @@ MODULE_DEVICE_TABLE(platform, tps65219_regulator_id_table); static struct platform_driver tps65219_regulator_driver = { .driver = { - .name = "tps65219-pmic", + .name = "tps65219-regulator", .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = tps65219_regulator_probe, From patchwork Tue Dec 17 20:45:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shree Ramamoorthy X-Patchwork-Id: 13912477 Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) (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 5403C38DFC; Tue, 17 Dec 2024 20:45:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.235 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468346; cv=none; b=a7PQBsHNsV9sA44BWb79ncEo2K9QOO3p5GssQ1e2RoxSIGxadJHz4x2QFjzoqBU/HQMJ/LpZLJWkvDoNeS9FQST6v+prn/CJvQvfXhNU4NkJBsDN71/y7BZhKwPkSSZFy4jV3yk+Zn24Yht9ekMc2mZG3oNx6XDkYLezb9rz//Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468346; c=relaxed/simple; bh=cNXRFtyTRJf7SaLbQYiA/Y3vgc+vWLsRr65qFvH17Fo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=AMlWTzMha3YTJcLIonRskGdfejZFVRD/+RPp4Ggf/CPP6qFl7HZH9DWHlecKJNxB0tzHm3ly0fIuFvPoNeVFYEmoF+X8BmuaXaRToN/Pl60BY6MMM42uFmn9DENWKVOpUTSIHYFbo55GBW+0T98HiMSOLGEAV7ZRLtrplYi7ly4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=wAvMk859; arc=none smtp.client-ip=198.47.23.235 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="wAvMk859" Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTPS id 4BHKjRQe056652 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 17 Dec 2024 14:45:27 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1734468327; bh=n1ZMyHRLZgw0n68nTZPSThSj5mXsTB9oMwUSDIld2Q8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wAvMk859RFrGC3AGm+EmtC6bvm7llHmo7ojtJY3EjeHzc/R/Dzl1nQcwvQVXFKDq7 oVaPXLsE9qeQ7jp3q9ez2jF3gM+CgQVsx/HsG+QEySb7MCXAtQi5noKvGMpLGVKxVQ BlRmI8HLdX2nix01+yiH1Lq1ZFMxqS8pBbhOWdVk= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKjRYm011336; Tue, 17 Dec 2024 14:45:27 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 17 Dec 2024 14:45:26 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 17 Dec 2024 14:45:26 -0600 Received: from DMZ007XYY.dhcp.ti.com (dmz007xyy.dhcp.ti.com [128.247.29.8]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKjQj3023682; Tue, 17 Dec 2024 14:45:26 -0600 From: Shree Ramamoorthy To: , , , , , , , , CC: , Subject: [PATCH v1 3/4] regulator: tps65219: Remove MODULE_ALIAS Date: Tue, 17 Dec 2024 14:45:25 -0600 Message-ID: <20241217204526.1010989-4-s-ramamoorthy@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217204526.1010989-1-s-ramamoorthy@ti.com> References: <20241217204526.1010989-1-s-ramamoorthy@ti.com> Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Remove MODULE_ALIAS because the same module alias is already generated by MODULE_DEVICE_TABLE. Signed-off-by: Shree Ramamoorthy --- drivers/regulator/tps65219-regulator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c index 5decf69f327a..f57a046f9dea 100644 --- a/drivers/regulator/tps65219-regulator.c +++ b/drivers/regulator/tps65219-regulator.c @@ -390,5 +390,4 @@ module_platform_driver(tps65219_regulator_driver); MODULE_AUTHOR("Jerome Neanne "); MODULE_DESCRIPTION("TPS65219 voltage regulator driver"); -MODULE_ALIAS("platform:tps65219-pmic"); MODULE_LICENSE("GPL"); From patchwork Tue Dec 17 20:45:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shree Ramamoorthy X-Patchwork-Id: 13912480 Received: from lelvem-ot01.ext.ti.com (lelvem-ot01.ext.ti.com [198.47.23.234]) (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 A81DB1DA10C; Tue, 17 Dec 2024 20:45:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.234 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468356; cv=none; b=HF1IijLtYiZvFhje80/IYAKTFaeW1FpZoHXh1HhmxZaL/ZLuL8Z45/2nhhoWhoR5dq+L/uIOQTMXZcKIMRihQYorLMeu0GTOH+oBc7lnPRlpsd3f4hwwgQD7Ay+Ypv46uvSsuh3Sftk16aqwZJBYJmde41wvgv/ZUNZWG1Rwgwo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468356; c=relaxed/simple; bh=39goWSCO0jHhG0vKVa7QSDcQw1Ek8t2HscqiklNgNZk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RuyYD/4UpaznVxoxrgZ18VxDzeul69GEgPTfm4swDRfvXxbyEWgQQk4RIG2C+M+AAHi340wUj6e3sX9TcPqEXm7uSfDW9TsFX/NpQwaQ3V7AQ9E8X0/8Job6WgTMKErq1qlbliTlTFmz4BkEnN9flviv0k+vtYysF2tqb9Msx0Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=GYwGZdw6; arc=none smtp.client-ip=198.47.23.234 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="GYwGZdw6" Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelvem-ot01.ext.ti.com (8.15.2/8.15.2) with ESMTPS id 4BHKjRLi4018757 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 17 Dec 2024 14:45:27 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1734468327; bh=PzBGjI5W+yeQ2/F7RLmrj0KQUdxDjAno3EGhp3N+V9M=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GYwGZdw6KFIUDA/KJDmRR5hVFvV7W5J8TC/4VkcGxgB4feCYTK35mc3CMjXn66dQW UQhKSwMSe2yV5J+fWaUw5FWY2MD/c/9jB/hu2w5/jEJ359ifh5jhxgEm0OxdABzHMH /nHoWVexAcfurgnz5AEhH5uK9fYBfHMjQFVNnqhA= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKjRal011339; Tue, 17 Dec 2024 14:45:27 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 17 Dec 2024 14:45:26 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 17 Dec 2024 14:45:26 -0600 Received: from DMZ007XYY.dhcp.ti.com (dmz007xyy.dhcp.ti.com [128.247.29.8]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKjQj4023682; Tue, 17 Dec 2024 14:45:26 -0600 From: Shree Ramamoorthy To: , , , , , , , , CC: , Subject: [PATCH v1 4/4] regulator: tps65219: Remove debugging helper function Date: Tue, 17 Dec 2024 14:45:26 -0600 Message-ID: <20241217204526.1010989-5-s-ramamoorthy@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217204526.1010989-1-s-ramamoorthy@ti.com> References: <20241217204526.1010989-1-s-ramamoorthy@ti.com> Precedence: bulk X-Mailing-List: linux-omap@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea This helper function is primarily used by developers for debugging & is not a standard feature included in other PMIC drivers. The purpose of debugging function is to check if rdev is determine if the regulator has been registered prior to requesting a threaded irq. This case is already handled with the ISERR(rdev) check because the error code is returned. Signed-off-by: Shree Ramamoorthy --- drivers/regulator/tps65219-regulator.c | 28 -------------------------- 1 file changed, 28 deletions(-) diff --git a/drivers/regulator/tps65219-regulator.c b/drivers/regulator/tps65219-regulator.c index f57a046f9dea..aa65077f9d41 100644 --- a/drivers/regulator/tps65219-regulator.c +++ b/drivers/regulator/tps65219-regulator.c @@ -287,21 +287,6 @@ static irqreturn_t tps65219_regulator_irq_handler(int irq, void *data) return IRQ_HANDLED; } -static int tps65219_get_rdev_by_name(const char *regulator_name, - struct regulator_dev *rdevtbl[7], - struct regulator_dev **dev) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(regulators); i++) { - if (strcmp(regulator_name, regulators[i].name) == 0) { - *dev = rdevtbl[i]; - return 0; - } - } - return -EINVAL; -} - static int tps65219_regulator_probe(struct platform_device *pdev) { struct tps65219 *tps = dev_get_drvdata(pdev->dev.parent); @@ -312,23 +297,18 @@ static int tps65219_regulator_probe(struct platform_device *pdev) int irq; struct tps65219_regulator_irq_data *irq_data; struct tps65219_regulator_irq_type *irq_type; - struct regulator_dev *rdevtbl[7]; config.dev = tps->dev; config.driver_data = tps; config.regmap = tps->regmap; for (i = 0; i < ARRAY_SIZE(regulators); i++) { - dev_dbg(tps->dev, "%s regul i= %d START", __func__, i); rdev = devm_regulator_register(&pdev->dev, ®ulators[i], &config); if (IS_ERR(rdev)) return dev_err_probe(tps->dev, PTR_ERR(rdev), "Failed to register %s regulator\n", regulators[i].name); - - rdevtbl[i] = rdev; - dev_dbg(tps->dev, "%s regul i= %d COMPLETED", __func__, i); } irq_data = devm_kmalloc(tps->dev, @@ -348,14 +328,6 @@ static int tps65219_regulator_probe(struct platform_device *pdev) irq_data[i].dev = tps->dev; irq_data[i].type = irq_type; - tps65219_get_rdev_by_name(irq_type->regulator_name, rdevtbl, &rdev); - if (IS_ERR(rdev)) { - dev_err(tps->dev, "Failed to get rdev for %s\n", - irq_type->regulator_name); - return -EINVAL; - } - irq_data[i].rdev = rdev; - error = devm_request_threaded_irq(tps->dev, irq, NULL, tps65219_regulator_irq_handler, IRQF_ONESHOT,