Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp397736lqh; Thu, 28 Mar 2024 05:42:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMaTyphO2U9ZIYy1wwQ1F8wKMwa23Y33g3UAi1Nt/NEt03CWNL2EySIntdwBWZH9l4hgXYrh9qVRGU7DPWujwJI3SsHfz712XdKFCdtw== X-Google-Smtp-Source: AGHT+IEldGWYAA/w1ti6Zns4ftOjDgdw6xpCrTixzYNsZ+2bu0241xLBFWt/3Eyd7WGlf8S4fl/N X-Received: by 2002:a05:6214:d89:b0:68f:dddb:747 with SMTP id e9-20020a0562140d8900b0068fdddb0747mr3162188qve.58.1711629721866; Thu, 28 Mar 2024 05:42:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711629721; cv=pass; d=google.com; s=arc-20160816; b=JwEkYIS7r5A7NLv8lia0UKukF8qTU3jt/kRkSLImwklUmzRlNSpB91IlIQwNQdSkgk b1+Mp/6hRdZqA3DJg4rTfEaZqirTdTnzb8IeVZLmFr/JKLx49kCLo9gwwSVddHLCbqi1 73Bqh4kfEg97ntUcFumpiILm/tPha75mszmbzNbhK2uqQs9rEyFNPiw924tJqvxr6CyI WSFU5Jm3M+Dvw+N7UZIeti7z7JzrjGnBC9f5C+NP5OgEQaQ7ZlQL6HnZJmZMBIGaycRI GEDOC17IBgyi2kDI4Krb9XDA6plnt5/7QiEc4B3nCG3ma2xj2YVVHWjEoZZa0xY/izFF EdwA== 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=RMVHvlR4i8xepMivwcp8L4i5plBN/pGUC6Ayqqxl/cs=; fh=wiCHd3sd+nGR6RMzX74j5wvnmiIZ1CMGhEcpQW9vpus=; b=KGEtrsaTddGf5VgohYPXv/0R/iL/KQqKGpPOY+gxnntiaY7uGT1E3cA/gSPBND0MnA BQbrcOyAkqyqgnrWrDpYlzmZO3MhrdpZdiLUk/kiQxtCNM/XUA7vzNcAdS5ImF/vlQ7C k80wKeZbpuW/NF5x+XWYKyBo4SM9mGe5Xgf9tczHxeFOm1EYu6t81ZSIOVuDQ+C8jK2o y/F+E10rMgSpCQ0Rc/s5kosxdpBgDHIx5j2FBB+e3z2/OscRV0htpxtbXuNg4LHaomdX jh6i4HSF+Frz88t0BxMLyCezmXq33iXW+InX9EqYDCpwVXcn4bV2yGCs+qCzhGSWWKq4 Szug==; 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-122906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122906-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ltts.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x17-20020a0ceb91000000b006967317cf2bsi1300195qvo.483.2024.03.28.05.42.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 05:42:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; 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-122906-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122906-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CE1461C29791 for ; Thu, 28 Mar 2024 12:41:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E544681731; Thu, 28 Mar 2024 12:40:42 +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 B1BA28003B; Thu, 28 Mar 2024 12:40:39 +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=1711629642; cv=none; b=J5lPmLg67uWjZ2D2iJHUEImGcpE6xSMJvgJt21OaMtonzZk4hwk+ikLS8yxMFxB2ryu1xIM8lMZLBxe5rRj/Rks5Zo37kn5bWYab+JiDxLW/Nh1FzlIUb+P2JVl6WyLXPmCEQnVXVH7L07OBrfsk7CujZkPlam+2k5O0ilcgQZk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711629642; c=relaxed/simple; bh=meFra01wSqvik460QI1BkYgoMrU6jS4EmDaaP6c1kkc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=h73GTt5wPJWx1GzkA0VqccjVkzpigTt1yFK5GBJCc1fuWwfvF1EdtfH+sOteXph/25vpE86o9QQUNDi3OBzMn8z6y5AilA19FoLy7HojDYa6JavbEoPaLt6G+Cj08AAZGK4nyoJR45g3aHDduM8WrTouAHKo1mzxtlz+5OXbDWQ= 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: BuIRpoMSo6y6zxi47wvQXWLtxNzdoWmp/CkcbQSj/vVbQGFfdAg8hwaVffQEae9H3YBAdQFj9+ VujdFcF4aNDg== Received: from unknown (HELO localhost.localdomain) ([192.168.34.55]) by esa2.ltts.com with ESMTP; 28 Mar 2024 18:10:37 +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 v5 06/11] mfd: tps6594-spi: Add TI TPS65224 PMIC SPI Date: Thu, 28 Mar 2024 18:10:11 +0530 Message-Id: <20240328124016.161959-7-bhargav.r@ltts.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240328124016.161959-1-bhargav.r@ltts.com> References: <20240328124016.161959-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 82a1c02e3..a9cdc524f 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 = &match_data[TPS6594], }, { .compatible = "ti,tps6593-q1", .data = &match_data[TPS6593], }, { .compatible = "ti,lp8764-q1", .data = &match_data[LP8764], }, + { .compatible = "ti,tps65224-q1", .data = &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