From patchwork Wed Nov 8 17:11:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Biju Das X-Patchwork-Id: 13450329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FB89C4332F for ; Wed, 8 Nov 2023 17:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232528AbjKHRMS (ORCPT ); Wed, 8 Nov 2023 12:12:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232602AbjKHRMQ (ORCPT ); Wed, 8 Nov 2023 12:12:16 -0500 Received: from relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 09CD3E8; Wed, 8 Nov 2023 09:12:10 -0800 (PST) X-IronPort-AV: E=Sophos;i="6.03,286,1694703600"; d="scan'208";a="186043560" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie6.idc.renesas.com with ESMTP; 09 Nov 2023 02:12:10 +0900 Received: from localhost.localdomain (unknown [10.226.92.247]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id BD82A402E669; Thu, 9 Nov 2023 02:12:07 +0900 (JST) From: Biju Das To: Mark Brown Cc: Biju Das , linux-spi@vger.kernel.org, Miquel Raynal , Michael Walle , Krzysztof Kozlowski , Geert Uytterhoeven , Prabhakar Mahadev Lad , Biju Das , linux-renesas-soc@vger.kernel.org Subject: [PATCH RFC 4/4] spi: rpc-if: Add set_iofv() callback Date: Wed, 8 Nov 2023 17:11:49 +0000 Message-Id: <20231108171149.258656-5-biju.das.jz@bp.renesas.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231108171149.258656-1-biju.das.jz@bp.renesas.com> References: <20231108171149.258656-1-biju.das.jz@bp.renesas.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add set_iofv() callback for configuring IO fixed values to control the pin state. Signed-off-by: Biju Das --- drivers/spi/spi-rpc-if.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/spi/spi-rpc-if.c b/drivers/spi/spi-rpc-if.c index e11146932828..8b5c41de99af 100644 --- a/drivers/spi/spi-rpc-if.c +++ b/drivers/spi/spi-rpc-if.c @@ -75,6 +75,14 @@ static bool rpcif_spi_mem_supports_op(struct spi_mem *mem, return true; } +static int rpcif_spi_mem_set_iofv(struct spi_mem *mem, const u32 val) +{ + struct rpcif *rpc = + spi_controller_get_devdata(mem->spi->controller); + + return rpcif_set_iofv(rpc->dev, val); +} + static ssize_t rpcif_spi_mem_dirmap_read(struct spi_mem_dirmap_desc *desc, u64 offs, size_t len, void *buf) { @@ -121,6 +129,7 @@ static int rpcif_spi_mem_exec_op(struct spi_mem *mem, } static const struct spi_controller_mem_ops rpcif_spi_mem_ops = { + .set_iofv = rpcif_spi_mem_set_iofv, .supports_op = rpcif_spi_mem_supports_op, .exec_op = rpcif_spi_mem_exec_op, .dirmap_create = rpcif_spi_mem_dirmap_create,