From patchwork Thu Dec 26 21:49:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shree Ramamoorthy X-Patchwork-Id: 13921455 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 DFF771684B0; Thu, 26 Dec 2024 21:49:41 +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=1735249783; cv=none; b=oRobS4MO4DMQDO7691fU6JeWuN0dWWD95dnE0BqDYdI6f0aYKfl/ekvLy/8et8lQ2FmjJqB56h9R9NIHWjVpQ9mZAcwO5Bt3byb3jm+HgDtLmq8ZVtcaz3TTeXD+MAWpwcDQLjwdB6ym2advyPzR8WNjnaUPfJqMw11ZYBa3cGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735249783; c=relaxed/simple; bh=0s9xrnN7IE4jrj6aPnpczhMyviPWxQHmBwhXJEhymDw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Upj8zJLZgi0pvdbe8wK7k7QQ87sVQAQeKmveuIrdl6Z/eIkxsr7cEHviDc0VJ6F9iOMoXVMsEofzOPs+7Pxa1YX11GDRIE1wKZCxZPgqv1HyybBbrwi+srBKfK4uwoq/ztD2+NYvRk/BLB9zumD/wA/IMouDMlwM4M4Jk195k90= 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=MPUNv0lV; 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="MPUNv0lV" Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 4BQLnNtL044437; Thu, 26 Dec 2024 15:49:23 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1735249763; bh=PKLp56TOmGimPBnuh/2ayPehkH496lkDjOrJVfqEpP0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MPUNv0lVaPgYSHy1HXNdG1eLTMIgWvH/Hkrex0xhGpmgiGatynL1ZmOqbqYY4ZfrQ vIEqbIpo+UPJIS5y/FIFw4MtQkGtrnksONO7YDBpTySgwUgZbUXDg9ORKzcUc1YCLr dPTuoTeDHz+QfgpJtx7W5afG1YQZma0zbtlK87vw= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 4BQLnN5L099737 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 26 Dec 2024 15:49:23 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 26 Dec 2024 15:49:23 -0600 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) 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; Thu, 26 Dec 2024 15:49:23 -0600 Received: from DMZ007XYY.dhcp.ti.com ([10.250.33.34]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 4BQLnMXo060782; Thu, 26 Dec 2024 15:49:22 -0600 From: Shree Ramamoorthy To: , , , , , , , CC: , Subject: [PATCH v1 1/2] mfd: tps65215: Remove regmap_read check Date: Thu, 26 Dec 2024 15:49:21 -0600 Message-ID: <20241226214922.374987-2-s-ramamoorthy@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241226214922.374987-1-s-ramamoorthy@ti.com> References: <20241226214922.374987-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 The chipid macro/variable and regmap_read function call is not needed because the TPS65219_REG_TI_DEV_ID register value is not a consistent value across TPS65219 PMIC config versions. Reading from the DEV_ID register without a consistent value to compare it to isn't useful. There isn't a way to verify the match data ID is the same ID read from the DEV_ID device register. 0xF0 isn't a DEV_ID value consistent across TPS65219 NVM configurations. For TPS65215, there is a consistent value in bits 5-0 of the DEV_ID register. However, there are other error checks in place within probe() that apply to both PMICs rather than keeping this isolated check for one PMIC. Signed-off-by: Shree Ramamoorthy --- drivers/mfd/tps65219.c | 7 ------- include/linux/mfd/tps65219.h | 3 --- 2 files changed, 10 deletions(-) diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c index 081c5a30b04a..4aca922658e3 100644 --- a/drivers/mfd/tps65219.c +++ b/drivers/mfd/tps65219.c @@ -221,7 +221,6 @@ static const struct regmap_irq_chip tps65219_irq_chip = { static int tps65219_probe(struct i2c_client *client) { struct tps65219 *tps; - unsigned int chipid; bool pwr_button; int ret; @@ -246,12 +245,6 @@ static int tps65219_probe(struct i2c_client *client) if (ret) return ret; - ret = regmap_read(tps->regmap, TPS65219_REG_TI_DEV_ID, &chipid); - if (ret) { - dev_err(tps->dev, "Failed to read device ID: %d\n", ret); - return ret; - } - ret = devm_mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO, tps65219_cells, ARRAY_SIZE(tps65219_cells), NULL, 0, regmap_irq_get_domain(tps->irq_data)); diff --git a/include/linux/mfd/tps65219.h b/include/linux/mfd/tps65219.h index 546bceec7173..6ed2ec4264d9 100644 --- a/include/linux/mfd/tps65219.h +++ b/include/linux/mfd/tps65219.h @@ -13,9 +13,6 @@ #include #include -/* TPS chip id list */ -#define TPS65219 0xF0 - /* I2C ID for TPS65219 part */ #define TPS65219_I2C_ID 0x24