Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1118661rwd; Sat, 20 May 2023 12:58:01 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LDR3pQk12nlNv+kDZCFJ2z1IVSUVb8Iy3FDc8/UX5R7wgSah7+q4O93yJGvCNf8ABanb9 X-Received: by 2002:a17:902:f551:b0:1ae:5c72:d63c with SMTP id h17-20020a170902f55100b001ae5c72d63cmr7931910plf.11.1684612681151; Sat, 20 May 2023 12:58:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684612681; cv=none; d=google.com; s=arc-20160816; b=QsYYy2OuHcjPIV+xsiYCF1WkgarhUjM5nLCV0URyF2Am/TwmqCTQddY19ejOAQSl/B VzqgHxxlNKYvQAiVyaG6N0jV9AXo9CYx1mqoG+xJAe6t7ClTCSIT1Vh5RarGze3IXPUR 4BTfGEZEYBOzbCgE+JDmuVicwnCezVgTEjuP2VqAz3RjEFpIIRcB9ViNFa2g2RodYdV9 Ux4L3+ps9sSD/ApboP2iqcwXOaoKo4nG7RXtgvwv5dVANhYqEFkyjLQ3ltg/JPiSrD/P duiJMY34aiONH3pav9wyVTHtT4vk7lE6y26acHu25iZINbqkJ55KG9pTIjxXfMwvztnT R1DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=Liz5Dg4FexydxAHAog0MQJzFgR4/1Nt82myf27DAU2g=; b=ZXHI5PcC1QD6OSWEVPc0i8JvfOUoO10z4mNJ6Yvwv4wNkjfG/Hv3xw3g5XY1jaEGAF +SUzLEau3Thnn8TfnHm/LjFJBNKqd+WWdgcQli/etBBn94Yjv8NEFHgYqldejgcSFPWD hNbMF9zrthPwrQul3dBGRiSAuY6thpLeX6aZD8jF0JKNI+sh7jWqlajqoLQT6GUKI7A1 AmDHSt4rZMlGh1OhM20yyamP0BTZQS8thnML37dUnUe2KrSWnAhUqSVLjpO7u/26aPyK qY6c3cccLMviS/GKL+InlmzvnNox9hleTDUR9jcfUCGao+iYb1SndRrGJOtRKi1aO3KD vwGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20221208 header.b=R0CfSQu+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b24-20020a170902d89800b001ac9d63028esi1823399plz.575.2023.05.20.12.57.47; Sat, 20 May 2023 12:58:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20221208 header.b=R0CfSQu+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231867AbjETTJd (ORCPT + 99 others); Sat, 20 May 2023 15:09:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231320AbjETTJZ (ORCPT ); Sat, 20 May 2023 15:09:25 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFB2BFD; Sat, 20 May 2023 12:09:24 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-510f3db1cd8so4176870a12.1; Sat, 20 May 2023 12:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684609763; x=1687201763; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Liz5Dg4FexydxAHAog0MQJzFgR4/1Nt82myf27DAU2g=; b=R0CfSQu+hMLrhno/D5JAHpmhdZi05gFJbZSlR3tuNEydH5yJx+OKYM/CKoiJ+n7VZN 7RS7tOqVM35ccT7fOAYCTmJyW3wY3h1lV8Ph/KIZpRfIwx8fnXtSq9HTfpcJCXdI4srg lpFCoTSks5KQnVydSwzDsMEk3hv4Xqz3NBOkRmcpiPUQHnN5NmFyinDZFo1tAt4vaDmH n/SGNffJlJAwisPiQfznL1wMQo36Le+E6q6/4VLZVThnroLErFPRhAzc70RZIvAI6v6K M222L2yOUeT43XApFvqfsnCxLGsvZ3QhG8h+zbOSEFfL/SKIfFMtwZy8cVRdc7WhLyb/ tOYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684609763; x=1687201763; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Liz5Dg4FexydxAHAog0MQJzFgR4/1Nt82myf27DAU2g=; b=OvXOEuYDEY8+EnP7j9dqALhLoltNStJSScSALYis/3xQmtBsay/vB1m//uE18Pyzym k9raygnb28paokWH+XEjndxj/m/w0r2QBcAjw1iqc/7tmZ0XID6DyqDUS81WsEzY6djb 6FeQeg6wzZlJlHFvZAYmxyfO7YPxzQJD9aIUT/Z6hVcQOXLmREDR11PAzAQ2wmV7FfH0 2DxRIMrlAVJ9lwo/ubOFFlRBPLK5LJjWg/AN/H0fa+Q+XKAPlI0DLQsIrYUfkqb4HyC9 jbBVJboA8WMz4XhV3+PYULnaUPG9uPYhVPjDp0KAJM7XrrrtUBeCoFv5leYNo/AEQaRF UiWw== X-Gm-Message-State: AC+VfDzTqvhKmFO/V9qaFOXoAca5DF/ytZigTJuLFnpM4Bd0DqX+e4+7 kDnFhzUUZcV+vHkWJnsa0ak= X-Received: by 2002:aa7:cb51:0:b0:50d:1e11:eb9 with SMTP id w17-20020aa7cb51000000b0050d1e110eb9mr4953165edt.1.1684609763205; Sat, 20 May 2023 12:09:23 -0700 (PDT) Received: from wslxew193.fritz.box (p200300c78700c900cb504b662390cd6b.dip0.t-ipconnect.de. [2003:c7:8700:c900:cb50:4b66:2390:cd6b]) by smtp.gmail.com with ESMTPSA id ba7-20020a0564021ac700b0050daa883545sm1065889edb.64.2023.05.20.12.09.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 May 2023 12:09:22 -0700 (PDT) From: Boerge Struempfel Cc: boerge.struempfel@gmail.com, bstruempfel@ultratronik.de, andy.shevchenko@gmail.com, festevam@gmail.com, amit.kumar-mahapatra@amd.com, broonie@kernel.org, Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , NXP Linux Team , linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 3/4] spi: spidev: add two new spi mode bits Date: Sat, 20 May 2023 21:08:54 +0200 Message-Id: <20230520190856.34720-4-boerge.struempfel@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230520190856.34720-1-boerge.struempfel@gmail.com> References: <20230520190856.34720-1-boerge.struempfel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow userspace to set SPI_MOSI_IDLE_LOW and the SPI_3WIRE_HIZ mode bit using the SPI_IOC_WR_MODE32 ioctl. Signed-off-by: Boerge Struempfel --- drivers/spi/spidev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 39d94c850839..c8b938e0f342 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -64,7 +64,8 @@ static_assert(N_SPI_MINORS > 0 && N_SPI_MINORS <= 256); | SPI_NO_CS | SPI_READY | SPI_TX_DUAL \ | SPI_TX_QUAD | SPI_TX_OCTAL | SPI_RX_DUAL \ | SPI_RX_QUAD | SPI_RX_OCTAL \ - | SPI_RX_CPHA_FLIP) + | SPI_RX_CPHA_FLIP | SPI_3WIRE_HIZ \ + | SPI_MOSI_IDLE_LOW) struct spidev_data { dev_t devt; -- 2.25.1