From patchwork Tue Dec 17 20:49:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shree Ramamoorthy X-Patchwork-Id: 851964 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 80BDA1F9EB9; Tue, 17 Dec 2024 20:50:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468605; cv=none; b=lCHezE8vPGJK1tH/K86QH8xBl3QzNZBKZMjQobi5XPbklbrKrtxiQyM2mWRkxZAdkiQrseRK1AJ8OmsPDWh/yUmTbkq3+kV3fAI3zNPPlh7gUm2a7y/VlfHfnqW7Uz2k1I+gEvobBQFO2pgU4YvSIOf9FiPk1gu4rO0VnS/1eFk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468605; c=relaxed/simple; bh=mZlTlq74Zsx83Hk8sIiKsS9q50kgYVdWeIXNj3xnkJM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WB27azHWM1wTgmkGraU/2Oyy6KJO3GRIR6HZ2kr/vtPif7rFFFRRMSIPRCR9dNESEMfFbY94YMHwl2EPil1pg/VLbd9iTGKr7CdNezN9en+bkeu2HpQjo6+U5oP0Ql8W5elQ4ZjPw/WgOREYFsaIROn3mCvlXpU+OpSZzv4s95I= 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=SXRnGwRO; arc=none smtp.client-ip=198.47.23.249 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="SXRnGwRO" Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKnZVi098742; Tue, 17 Dec 2024 14:49:35 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1734468575; bh=F9V/m94d4Q9kQpNvv9HlMs2+If0hYEG8bWCVkNU7a+w=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=SXRnGwRO7MhMEWf98e+Xyujc5/SUvduZEjm+WZd9/s8t+sek2sBrDZZBrRh3P9QdD 6Yn7BigGb8mXC1KWz6VX61GG2kPy/rG0cbvm3dsp+Z4sOkpDQnBn7zbzUahlh8CMt4 bIZ2DjkOIDVSBjRaEX3Jw9mdjmupFdALUFMsbLyM= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4BHKnZGO070018 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2024 14:49:35 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE115.ent.ti.com (10.64.6.36) 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:49:35 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) 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:49:35 -0600 Received: from DMZ007XYY.dhcp.ti.com (dmz007xyy.dhcp.ti.com [128.247.29.8]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKnZIC097729; Tue, 17 Dec 2024 14:49:35 -0600 From: Shree Ramamoorthy To: , , , , , , , , CC: , Subject: [PATCH v1 1/2] mfd: tps65219: Use MFD_CELL macros Date: Tue, 17 Dec 2024 14:49:34 -0600 Message-ID: <20241217204935.1012106-2-s-ramamoorthy@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217204935.1012106-1-s-ramamoorthy@ti.com> References: <20241217204935.1012106-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 Use MFD_CELL macro helpers instead of plain struct properties, which makes the code shorter with the common defined MFD cell attributes. Signed-off-by: Shree Ramamoorthy --- drivers/mfd/tps65219.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c index 57ff5cb294a6..081c5a30b04a 100644 --- a/drivers/mfd/tps65219.c +++ b/drivers/mfd/tps65219.c @@ -110,19 +110,12 @@ static const struct resource tps65219_regulator_resources[] = { }; static const struct mfd_cell tps65219_cells[] = { - { - .name = "tps65219-regulator", - .resources = tps65219_regulator_resources, - .num_resources = ARRAY_SIZE(tps65219_regulator_resources), - }, - { .name = "tps65219-gpio", }, + MFD_CELL_RES("tps65219-regulator", tps65219_regulator_resources), + MFD_CELL_NAME("tps65219-gpio"), }; -static const struct mfd_cell tps65219_pwrbutton_cell = { - .name = "tps65219-pwrbutton", - .resources = tps65219_pwrbutton_resources, - .num_resources = ARRAY_SIZE(tps65219_pwrbutton_resources), -}; +static const struct mfd_cell tps65219_pwrbutton_cell = + MFD_CELL_RES("tps65219-pwrbutton", tps65219_pwrbutton_resources); static const struct regmap_config tps65219_regmap_config = { .reg_bits = 8, From patchwork Tue Dec 17 20:49:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shree Ramamoorthy X-Patchwork-Id: 851965 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 61C641DA10C; Tue, 17 Dec 2024 20:49:47 +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=1734468588; cv=none; b=U3/J+bvJgN9exru10xoelJZnvWudvENdZmKY+hJurB3/hjt2wXM4PLEU7MHd5GDJdIT9ePfOFB+fxHLFEgTeQY65wyt++gfEFuAdO5BvpovKXkw00v2PF4x1ESkhydSd7UFdm09cDZi/c2DjN32QdjH9IZ7eVqYCLhSNy2dPsyc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734468588; c=relaxed/simple; bh=TBIAI0KbaZKKy12fWhjv4+5VlK7GSnTG6wl2N2kru0o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dtYWflPEtRpApaYHNNBJNBNWiMRAoH6SK3PmIF+T4zyFYJ7GU/L/6Y3tONW+g1pWYXl8a/VSYsRiLq8vj8/LdrOcWnmaqOeEbcbLv1e+h1etycBojFE7PRLvZYmUDjjqAOZP1ZF2LZgqAWGErXG1YHtn5AZAd7b+K7jbCxo6X20= 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=v6fofImU; 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="v6fofImU" Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTPS id 4BHKnZYS057062 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Dec 2024 14:49:35 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1734468575; bh=6hr+nb0eMhjzs66rKOS0CfHiJ25UR5bzMYAS5I+4flw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=v6fofImU1P4xVPVr1YxGrrxTxm1ZMYThD79tbzH5zNTHPqBnX27XgUh/QQv2/7hCt z5t6563jSIBnOb1igNJqrxiJ8OjSPDPmPSyHCJC5zNJxSyFOWIZ588fTA0m+7FZ59v Upw6uFiy4nhO9BXiwFgDIG79p05CrO+ekxJBmJNA= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4BHKnZrN022531 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2024 14:49:35 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE110.ent.ti.com (157.170.170.21) 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:49:35 -0600 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE113.ent.ti.com (157.170.170.24) 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:49:35 -0600 Received: from DMZ007XYY.dhcp.ti.com (dmz007xyy.dhcp.ti.com [128.247.29.8]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4BHKnZID097729; Tue, 17 Dec 2024 14:49:35 -0600 From: Shree Ramamoorthy To: , , , , , , , , CC: , Subject: [PATCH v1 2/2] mfd: tps65219: Remove unused macros & add regmap.h Date: Tue, 17 Dec 2024 14:49:35 -0600 Message-ID: <20241217204935.1012106-3-s-ramamoorthy@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241217204935.1012106-1-s-ramamoorthy@ti.com> References: <20241217204935.1012106-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 These macros are not used by the driver, and the structs are accounted for with the addition of the linux/regmap.h file. Signed-off-by: Shree Ramamoorthy --- include/linux/mfd/tps65219.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/linux/mfd/tps65219.h b/include/linux/mfd/tps65219.h index e6826e34e2a6..546bceec7173 100644 --- a/include/linux/mfd/tps65219.h +++ b/include/linux/mfd/tps65219.h @@ -10,14 +10,9 @@ #include #include +#include #include -struct regmap; -struct regmap_irq_chip_data; - -#define TPS65219_1V35 1350000 -#define TPS65219_1V8 1800000 - /* TPS chip id list */ #define TPS65219 0xF0