Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1416502lqt; Wed, 20 Mar 2024 03:28:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUGbdpJvf5q/QTcl2kbhsS33tiMpKzV08n7N9yxhUxauWaTEJKhbjX6Oh2jCrOzejtKgphhvDOmOzvLWlWRrItFzpNyNTaWYUCQ6MxpLQ== X-Google-Smtp-Source: AGHT+IFO2JqV8L4xkhywZNRi/vi9LGPBkwpXR65zURqVcM609vopvMgXXQ+ECVhaQAK58FiIfn8Q X-Received: by 2002:a50:8a84:0:b0:568:c3c5:4641 with SMTP id j4-20020a508a84000000b00568c3c54641mr743065edj.40.1710930501019; Wed, 20 Mar 2024 03:28:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710930501; cv=pass; d=google.com; s=arc-20160816; b=ANRz0+U9TdP6IxPT2IKA0XnGfWqF3YaGA1l66x9ChugvlaIANEoq0ak2+FQS+qS4sf raOLZ85dj32HKn6e5fURb9ukQMlSUrJigjiimzEZ66H801C4ToXdqg8VbZsm+xP2Eq6m q9Syi2sWaCc+jrS5mYL02Yt/JIWxZKGcO6ceZ2H27FPs7KxMCChKNREoel9TN2nDElpX 4dPLs0eUSwNdn4AZIYNyNuDB3X83KAx+5D3ATSHI5Lr2TY723HQrUXxoPqx48Y13xFw/ QEUJX10yx/NXIeTqOgAqbfjkxmHxd2UPk4UYfln4dUZcxyt7q+cGmAOUHfsGky/NpFur 2L1A== 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=JtQm8eJaGEZeHNdZaN7VrmSTeubS/g9dX9Jch/FhxMFez45NtjEPPDWN7pzjNUrSp8 K1KNxFuwZav8z7C8PHJJwWLtLMBzX0GIXuaDwU+dHh4xkRtXAyxJDogqt4v0+Zh0TAhQ bPMVIF8a/p2HdWf7Pvr78WiGgyE+5B4Nv9LTH0EwksPcB+NgcvhdpfEJShkujzRbMZza bU0YS4E6y/BguB3/rN+sQ0JBk4IvXjF042Q42WAC3VHLz2G3vTPLsigh8NxF7rLzuFJr EpDpBCf6Y/77VzL0x4nrq3RuhcVZsX+/NrrhpS+clzhO1z807iIZeQT2oC3LziIijQfT Dd0g==; 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-108766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108766-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 fk6-20020a056402398600b0056ba8b69efdsi805279edb.500.2024.03.20.03.28.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 03:28:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108766-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-108766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108766-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 BE8471F213DF for ; Wed, 20 Mar 2024 10:28:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DA4447F7C; Wed, 20 Mar 2024 10:26:27 +0000 (UTC) Received: from esa1.ltts.com (unknown [118.185.121.105]) (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 0E29940843; Wed, 20 Mar 2024 10:26:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=118.185.121.105 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710930386; cv=none; b=tmxww8bcEnvm6y8fZXPveC1ttvVJi2+S42eBQR8wr9mTDDREzpq6faFb8VfRNUyQZoijWY+fnjWdE/8qhra3K42CS/snhssmHZbWu/xdkb6BKLTUnYUcRSH86571KrlbASkTq7Hh1yxAT5X/U3ZNqX/Ag2NLzpnXIVx4/jnK5tA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710930386; c=relaxed/simple; bh=meFra01wSqvik460QI1BkYgoMrU6jS4EmDaaP6c1kkc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RFVkZsugyPPcGjYAh5OH3Tc8ZGKnlGYAN67+WbyHT6675fN67wxFs9kG5B3UWj2+42BOAg28jsOsNbF8BXZVEvzDjk5GO3RIk6Wc3uSjDQRGOcBNsQmPpPwrt4mP4xI1WyANq49oyZ5HjHlOD3jDFd1gdsy/nPUoFVczdwUDO1Q= 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=118.185.121.105 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: DGqQ5P+8fHtHKecCscuy5+Eb73BNAZLwdU7bSHyKRWwrPaeq36rZ9FsUZiet8YW7waB3uKtQ1L cdEUPWIBxr/Q== Received: from unknown (HELO localhost.localdomain) ([192.168.34.55]) by esa1.ltts.com with ESMTP; 20 Mar 2024 15:56:17 +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 v4 06/11] mfd: tps6594-spi: Add TI TPS65224 PMIC SPI Date: Wed, 20 Mar 2024 15:55:54 +0530 Message-Id: <20240320102559.464981-7-bhargav.r@ltts.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240320102559.464981-1-bhargav.r@ltts.com> References: <20240320102559.464981-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