Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp460143lqc; Fri, 8 Mar 2024 02:37:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWFNlipdXlZl1s+mQkBeVOyfBzhcQLDxeILzWXpHOsLCO9nN6/syXxOk0iRp9PBrQP0eEp5Vf+56Rabf5Yf/Pg31Hnu1XMTPt6ujLgA6Q== X-Google-Smtp-Source: AGHT+IEnPBSCXXozlgnrWm1dmEEZAW20qFXBCa9sBVHcjdnTH1vRvcz7P8IJ2UtK19KI+eFhbDyH X-Received: by 2002:a17:906:5a9a:b0:a43:ffe3:70a with SMTP id l26-20020a1709065a9a00b00a43ffe3070amr13569944ejq.9.1709894228196; Fri, 08 Mar 2024 02:37:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709894228; cv=pass; d=google.com; s=arc-20160816; b=ressSiA3+BA8XirnlIwtPfCJVeHsGvSGgwE7R0/dJTMknKCo8RcxhUojIyosgfWg9c R65Z4oEzNem5qogVipnw6qqZC3f7E3BPNaIloZi+RYoAU+mSz8zv9791tlgJdEyd9tn4 gNhYgG8MEdNo7GatInkJ0m716aIWHFJT3GB+iusuV/SZKFReVo1cv3Ht5SGBjgf2wXlQ BspwAn4ss4RLpjmgDECqB9VMxBNw8Z7TxEc9qdR2BqP7OrzlC2yY4/UDiV+WdGFPQSQZ IKGTLnrTJ3a324w+SziSATcYi++zYFfo78fRdqkM8p1cIhUrNQQLBuV9nsIz8z7E4Ndv UEwg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:ironport-sdr; bh=RtjZfwxovK2/lKER6Ep4JTMj2oTLjA2pmACNkVgPOjc=; fh=wiCHd3sd+nGR6RMzX74j5wvnmiIZ1CMGhEcpQW9vpus=; b=vEhlUgnBCM4GF1+c4DeZ8myvEDAoF+9ytXziQnAg9bk3T8bRwmmEqV+9x8IBXzcdtK n4OpOfNpGfHLdrDVyjPmDwv/dDqociAWCdpQFg2TKDj1lxvIxXS/cIwUH0Q2bM45nKX0 8EVM6tW8MDdeN1zysn3eMRq/xuvztFg1V9yLZYmFKbCTLy26s2MbMEfRbaq3z5V5eK7a 8qgnZXvE+f2e/O834RCURBWhtzKbV6X4mO8xNa4cdr7bRviXgtcbJY06TPEUUMmOW+hJ 81X4islWNjhYtgrgF1lnTzKQDt5wfL8o0TP0i06WD5eNbW7nCxIe0Jyh2Wy31HT3Gv35 PF1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ltts.com dmarc=pass fromdomain=ltts.com); spf=pass (google.com: domain of linux-kernel+bounces-96847-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ltts.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id sh43-20020a1709076eab00b00a44d27980c5si6120706ejc.421.2024.03.08.02.37.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:37:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96847-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ltts.com dmarc=pass fromdomain=ltts.com); spf=pass (google.com: domain of linux-kernel+bounces-96847-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96847-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ltts.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CC2631F21C65 for ; Fri, 8 Mar 2024 10:37:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 79B0458201; Fri, 8 Mar 2024 10:35:30 +0000 (UTC) Received: from esa2.ltts.com (unknown [14.140.155.42]) (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 232F95646D; Fri, 8 Mar 2024 10:35:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=14.140.155.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709894129; cv=none; b=RhlLkuxs+HzmnUlOvAgge4gNEghCL6zdSJ5hckrB7ma/YCl+d9ktS6jvQTTr22bXY+gtXgOthYiozcXOCY42ghQyVEDxD2T9SIVnhGebT9qr9wtAdx0uPmAD0wORY9kinbThMR3TV1iW/9ySeP9d3AbTr+AhFGcY46Zr2TSkdjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709894129; c=relaxed/simple; bh=QqN94Chqijdxl/7t02yMeS853DWUacErYK7KORxxwjk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=s2yV5WKGfXZbIREgyGmbcEKuzPp7FEYisyqwp6RsmaQkFzmCR4218lPnaXb3MDgQLPT2Nw3YwyaU4Mv88gIixg9daBBWJpC2KR/I4goqoL6bVCgPvR0f/vqMTZF+qzwADt+OzGFrNlT5sH8KeTkeMA3xvCwlq40TpLXT3iRvwrQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ltts.com; spf=pass smtp.mailfrom=ltts.com; arc=none smtp.client-ip=14.140.155.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ltts.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ltts.com IronPort-SDR: C/mkGctU34Ufv1Pdk4mhacotdjR1wbzH5qZUdLAGszJHGzVwns5FYnGxs3WSnwNaJeghA/t8TI iYAnCjJrzxZw== Received: from unknown (HELO localhost.localdomain) ([192.168.34.55]) by esa2.ltts.com with ESMTP; 08 Mar 2024 16:05:10 +0530 From: Bhargav Raviprakash To: linux-kernel@vger.kernel.org Cc: m.nirmaladevi@ltts.com, lee@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, jpanis@baylibre.com, devicetree@vger.kernel.org, arnd@arndb.de, gregkh@linuxfoundation.org, lgirdwood@gmail.com, broonie@kernel.org, linus.walleij@linaro.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, nm@ti.com, vigneshr@ti.com, kristo@kernel.org, eblanc@baylibre.com, Bhargav Raviprakash Subject: [PATCH v3 06/11] mfd: tps6594-spi: Add TI TPS65224 PMIC SPI Date: Fri, 8 Mar 2024 16:04:50 +0530 Message-Id: <20240308103455.242705-7-bhargav.r@ltts.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240308103455.242705-1-bhargav.r@ltts.com> References: <20240308103455.242705-1-bhargav.r@ltts.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Add support for TPS65224 PMIC in TPS6594's SPI driver which has significant functional overlap. Signed-off-by: Bhargav Raviprakash Acked-by: Julien Panis --- drivers/mfd/tps6594-spi.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/tps6594-spi.c b/drivers/mfd/tps6594-spi.c index b9428dc12..393f8ebec 100644 --- a/drivers/mfd/tps6594-spi.c +++ b/drivers/mfd/tps6594-spi.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * SPI access driver for TI TPS6594/TPS6593/LP8764 PMICs + * SPI access driver for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs * * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/ */ @@ -77,16 +77,29 @@ static const struct regmap_config tps6594_spi_regmap_config = { .use_single_write = true, }; +static const struct regmap_config tps65224_spi_regmap_config = { + .reg_bits = 16, + .val_bits = 8, + .max_register = TPS6594_REG_DWD_FAIL_CNT_REG, + .volatile_table = &tps65224_volatile_table, + .reg_read = tps6594_spi_reg_read, + .reg_write = tps6594_spi_reg_write, + .use_single_read = true, + .use_single_write = true, +}; + static const struct tps6594_match_data match_data[] = { [TPS6594] = {TPS6594, &tps6594_spi_regmap_config}, [TPS6593] = {TPS6593, &tps6594_spi_regmap_config}, [LP8764] = {LP8764, &tps6594_spi_regmap_config}, + [TPS65224] = {TPS65224, &tps65224_spi_regmap_config}, }; static const struct of_device_id tps6594_spi_of_match_table[] = { { .compatible = "ti,tps6594-q1", .data = (void *)&match_data[TPS6594], }, { .compatible = "ti,tps6593-q1", .data = (void *)&match_data[TPS6593], }, { .compatible = "ti,lp8764-q1", .data = (void *)&match_data[LP8764], }, + { .compatible = "ti,tps65224-q1", .data = (void *)&match_data[TPS65224],}, {} }; MODULE_DEVICE_TABLE(of, tps6594_spi_of_match_table); @@ -133,5 +146,5 @@ static struct spi_driver tps6594_spi_driver = { module_spi_driver(tps6594_spi_driver); MODULE_AUTHOR("Julien Panis "); -MODULE_DESCRIPTION("TPS6594 SPI Interface Driver"); +MODULE_DESCRIPTION("SPI Interface Driver for TPS65224, TPS6594/3, and LP8764"); MODULE_LICENSE("GPL"); -- 2.25.1