Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp621061lqt; Thu, 6 Jun 2024 13:09:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2xRacX9yumBniKSiS6v8Wq37gltRnhQ/M7xpfCmiJs+RZuOnFxtVbeA1GOgwXJvrov2Ib/ZnOBpqx25Eg26AU95WeAdSHf6zcBek4qg== X-Google-Smtp-Source: AGHT+IEkEKM9wamp+q5yr2wrMy1MVZC3OE3ItrflM6pEs5uuEXMhtvLZZ8iEiz/xl6o3jT8rAOCP X-Received: by 2002:a05:6a20:9711:b0:1b1:f7a1:dfa2 with SMTP id adf61e73a8af0-1b2f9cb9b1emr623117637.45.1717704549475; Thu, 06 Jun 2024 13:09:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717704549; cv=pass; d=google.com; s=arc-20160816; b=qsXCfWVFenfVVNBuPTuLwB5qSVDYMTX45NPkyXSA8gtIExOomWQMB16XyIxMMSSeQ/ hQLvzFGG1fBfbj0oYdE6VI4e8e4qYJQugtNPml5HIwWAM8P+o5btfV2MrX5f8mnVNB9P HzGqJqW3klXwUL5FgKjKwhidrCjDPbqyfwqR/RHplnZbo/AuC1G1ATPfS/NkKpBWJTKz mmgjtFeWjw21S1+6VHyuIG1ppsLhNvsoDoL/LH/dPfxFWQJ+FF/Dj4RPoNAIPoZ/dVET rv/ovvnJraIIEVVHuEEE2+jekYDLy0du7v4JtqqH6iUhf+O7cF2F0OHvSdhkPirI3ZHP XDIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=S+u3B6Js2/KhMXGfn/CFs7BVqQR1ZpeRVP/jXRmHIMo=; fh=PUo2SoZF9nv7/5Z8kap552J5rxDvqW9gzcZeccl/Pcg=; b=u5Blstn0FnucX3w0dIeoibrOCwSEn8U00OfTlkKy8tNN4cnTbPWnXlJ4myqShAa7lG zN8esxxygtXFH7e9djCqkfYeDvrwA1SWhVoDqUonsQDt9DvdqZnn5aq2ImkJ3jlbUM5u lgH2DHIL/oPNXJzg87G8Q7UEwUpQQKiBZ4uYFy/N6od2+5cgrfyYJ5CvXAVeKMT2F29A tBuNqKPE1vdjk4AwVi5tNCUm1cowglu8zrD9Cl6vWQhvbMfsrsqfRraoSQp2Q6MSHwhs olABgOR4FhkhztYv0SUEKjf1PScKfd/7MHonbVbaLpe/0u3Ld4YZ2g4jwBo+b7J6xsqx dTSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kSrpsQnN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-204969-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204969-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de262c07f7si1697358a12.388.2024.06.06.13.09.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 13:09:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204969-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=kSrpsQnN; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-204969-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204969-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B4FFCB215A0 for ; Thu, 6 Jun 2024 20:09:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D8C073453; Thu, 6 Jun 2024 20:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kSrpsQnN" Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E7396D1A9; Thu, 6 Jun 2024 20:08:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717704534; cv=none; b=Ee+Q8urXlYNa74SQaHsEOARvooehHn+SBad+oruBcjYvV3neOUAJFIGCua9ZOmksb29yvwG4o3AS248IL6/Z4rdd+vPSAYgkhR11yCxZGmwvN/NSdjoRy7zGCxvrVEriDYgSdIvYUBKkAM1278qH3kaL2U+cbZ2RlIsTKdy3ELs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717704534; c=relaxed/simple; bh=OpNMUkwqhQfJZlVUXGLUpEuMt4+BJxuRA0BScM31vzM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RNda9Zcsg/5jXNr7u8gLLxlA/8cbYtwWaMVxfmxGQZBSB4/DTYdV1cz87ebY2U+BGjbz3rApnwSrcGs19PF+2e1k5G/xHYsjBTv46g+jdyaVV7BeHew/C7wjxFl0VEha1YPFeH3PLXPp96LlTkEFiehMVWQGGHxIu+s5NMQOlP0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kSrpsQnN; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-70249faa853so1157548b3a.3; Thu, 06 Jun 2024 13:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717704533; x=1718309333; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=S+u3B6Js2/KhMXGfn/CFs7BVqQR1ZpeRVP/jXRmHIMo=; b=kSrpsQnNVEDUcssW7DHfha9LWUHv5VR9njQ+nzIq5EhxnZaybKUgwZAViN4qEYyu1i ET+0DLZvWv3lSHL7P2Qt17dhBoX8JSlN4tI+eQZbBlriYHaSnXu3x79FxvsJTCqng7T0 VUtwKxlXp+F0mLOyyNj1wVZ4RW5csz1Kzfe8snPMqLEaQOd4mbA5FieHEO4d8wjWUEt+ Jay1AlsJKgbvXDAywr9bYXBGkyD4oUg9zH2SrWbMEu+ZD/WayUq5rn5nXsoUNy9Shjmn BwDtJHvX8hnfHAn4slEYJ88/k1wFBk65t6zsSBNRmNpvwYISb+PRpKoHCxo5w6D/GqQk 7kgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717704533; x=1718309333; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=S+u3B6Js2/KhMXGfn/CFs7BVqQR1ZpeRVP/jXRmHIMo=; b=e8nvT3C84u+qoKDtcP7PjXWByCPFgMWAEwA2D6nounfVT/3/Gpzcm7H27va+eE8Lae rjjy0ffJhAahC4lM4ogBViIXtIaWvCiNUvnz6SoK9ifWSn7g5DrIdea2EsIDBDQ1HtSz aYvVa2yrYKL2UaAucf/fG5BIl84TxdHkE6anrhTdrFhza4WT6mXMqquq2kiJwVhYFUAN jK4+0bWf6zctIkiPRKbK/9HnHb1P5rmhvV5k+DIFSt3Pqg10ubp+6KSibDcvRiqrR/VP eme+FfBiZExPKP5aSbqwinoC1Lhep/vrvEVtSGBYxivfgVsvWvnkvgBTH9z9yMlnKEOL hERg== X-Forwarded-Encrypted: i=1; AJvYcCU7TE0brBN3WzVBHosu0rhrKw2RJ7keREK0mlqZ+7xHISfuLFr8pq0GJgTiqihPtE981qKFxYMXVoGEsHeLshNGEuN3a7UVx+WMEdBDWqoL7m/Fj3NPcfxAB3m0n07WarIHye949+ahmhfl4SYtCdePD9en79ml5GevAnblTZJGW8n54N/RmL8xl+rvSw6YUj45WTRYzdjp7qohdIDHMg== X-Gm-Message-State: AOJu0YyFeqFSAXhLpRjmw8pgh8KpSb/hNHDonSRqkI7W+s2//YXJii6w IlzyXfCG7//sJnKXhBCXpVJ2+94eO2iqn1otCu43oyl7i3wOccVTudewQTmN X-Received: by 2002:a05:6a21:819f:b0:1b0:2b96:5f9 with SMTP id adf61e73a8af0-1b2f9bc0fccmr586226637.36.1717704532476; Thu, 06 Jun 2024 13:08:52 -0700 (PDT) Received: from localhost ([2804:30c:167a:4100:8407:a7e5:9b87:8081]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-703fd3b303esm1499103b3a.93.2024.06.06.13.08.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 13:08:51 -0700 (PDT) Date: Thu, 6 Jun 2024 17:10:04 -0300 From: Marcelo Schmitt To: Mark Brown Cc: Nuno =?iso-8859-1?Q?S=E1?= , Marcelo Schmitt , lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, nuno.sa@analog.com, dlechner@baylibre.com, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/6] spi: Add SPI mode bit for MOSI idle state configuration Message-ID: References: <21d3314355b43ecd6acc42f9dfedec501418332d.camel@gmail.com> <67f94cfb-6a33-4390-8032-a942f5f7b944@sirena.org.uk> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <67f94cfb-6a33-4390-8032-a942f5f7b944@sirena.org.uk> On 06/05, Mark Brown wrote: > On Wed, Jun 05, 2024 at 11:14:33AM +0200, Nuno S? wrote: > > On Tue, 2024-06-04 at 19:41 -0300, Marcelo Schmitt wrote: > > > > + /* Check against conflicting MOSI idle configuration */ > > > + if ((spi->mode & SPI_MOSI_IDLE_LOW) && (spi->mode & > > > SPI_MOSI_IDLE_HIGH)) { > > > + dev_warn(&spi->dev, > > > + "setup: erratic MOSI idle configuration. Set to idle > > > low\n"); > > > + spi->mode &= ~SPI_MOSI_IDLE_HIGH; > > > + } > > > Should we assume such a thing? IOW, should this be treated as a warning or a > > real error? I would assume this should be a configuration error and return - > > EINVAL but... > > Right, and the error message isn't very clear. Yeah, the message is not all that clear. I'll think of something better. I'm biased towards having this as a warning because I don't see this as a feature of usual SPI protocol but not really sure about either ...