Received: by 10.213.65.68 with SMTP id h4csp1806664imn; Mon, 19 Mar 2018 13:49:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELue87HYI9gpVONMjNkkGsF59X9+BMUfXg0cbwAoYY1DiLn1iGQ6SPAOceL5kgFZf5Lw4Rdk X-Received: by 2002:a17:902:2884:: with SMTP id f4-v6mr13700302plb.153.1521492578347; Mon, 19 Mar 2018 13:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521492578; cv=none; d=google.com; s=arc-20160816; b=kFTjmfRYIoe6rIP9BNKbZlrAAAlHcw1Y8AkrXrsv3ytO+bDGKIea4shaalsWDcvpwy SqSxnSjQqTyLPeZzrrrd3wJvhqLU5zDZmGow/Rfxk0dTEjx2/WgXrovYwdXXANCkRf+p nqWkKIuPRIvpmlf5oFXW18zG4gFjnONE3PxG+YTuPWwES0R9yh4wf7YtFjHuEsARqWio dkYxkBEqKDJtRsB6H41quwBDdss/+3oNU3qGxZnWvVlyV8naqBuIRMKfZsr4Q+bRNvRw yPqDBucmC7dIe3NsSwH2oO9YGeX2vuiSkDnNz+kAwv/GkuuoC0cYZQFlY+0pfRTvpzMY QeQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=toZl0A+Z8uHLSU7O0X1T4zjcdUfaDdq1R/WXWM3cpYs=; b=GCpMcRjURMYEIKVIj3kpF0lFVO5ShlQNhb+O3qhLG2nR1Y1a7fnDUj5T9am4D/rh80 xFRSIkzmWeEPdryCp9MV2VoMKsXlKwKUvg0JrqdRt5OmjqFOEaMSj4oCe561/kTL2POm RPhFLsrPba3Xry3Gxy02oV6teH00CWvUIdwY5NhCKK557Y173i7Sa+hrEBXJk/dksb0y ODmrF2SunUu5nI6ZAAA68U+9GFE2h1DwQjQQoWEJTdcGTibSpRm3s58fFGF5VeH8+pAv wd1fReMnfzTQynyCfOHlezfWddPvqPDZESjcMRtOD7e/IrtChattJxvHqXW6spr4hwz9 cIgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J+KPb1mA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91-v6si46582ply.646.2018.03.19.13.49.24; Mon, 19 Mar 2018 13:49:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=J+KPb1mA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968905AbeCSUrc (ORCPT + 99 others); Mon, 19 Mar 2018 16:47:32 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:35628 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968664AbeCSSJx (ORCPT ); Mon, 19 Mar 2018 14:09:53 -0400 Received: by mail-wm0-f52.google.com with SMTP id r82so6940150wme.0; Mon, 19 Mar 2018 11:09:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=toZl0A+Z8uHLSU7O0X1T4zjcdUfaDdq1R/WXWM3cpYs=; b=J+KPb1mA866pDRmKoiojlQx7x0mfqnK7MeaSuJRynl7jZ5FKWe9gd/Kne4rgdyEk24 VM/fmxobQZkoR2pYVLGKi9/3rd+gDsIgb4IX5nBFjFo7rxVtggg98yyhV/no/x/njUXq Md6jqN85aYiXgxDcLUPJLbgss4Fo30Yr5tonfZKHYj1Ssj2P/oNOPLMq5qmHgBrxgnzL de+tJfu4doIsRed401IS+mjviES77a27DBE1eTH+gxtGpjmtUG06LWIRG1wRT+HpPEvh Fljh5cJqVbDFKKjAKwQ+MYzyo+bp+A7s/TgAHpwEOmAgejorhIs8GBxAiMokqFqWl41+ AD9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=toZl0A+Z8uHLSU7O0X1T4zjcdUfaDdq1R/WXWM3cpYs=; b=L8AdDaWY+GRC/DniVVH2Wt/5TMvWGb2SNHF6IXaPtxeQ+b4Irep14Cc748ywicLEPw PJtFjKRZSgwD9IrTyWagdU6+Aa/y6YxpjwAbhYGUF5xq+fzbXI9yCleZzqsKvO7zilJ3 DeDOs4XNIbM8reD4BibEOkqdokM+2c4GGr8T4mrMwPvaJzyEqnifHl0O/biDTjWiKbmW jMnGkDl2/9cGbh0TMT/ez5eXxjnoP/Ok0jSrcDBj8w0xVww5XXVsYpC8gYRgz8ObN/sB KDKPgdHxFa0f/LCFE0PPUO0DaDFiLhSVG7OAfEEohtu8qS0vpe3l3vXr5z2RNNgaiwzF J5jw== X-Gm-Message-State: AElRT7G1WkNufK3lQ++CmwyfohO+zI6mWSwbYi/8Lm9MCcPxZ2j+9E69 o3rmGBrNVfb2HEe4uW27p/s= X-Received: by 10.80.138.213 with SMTP id k21mr6684377edk.181.1521482991987; Mon, 19 Mar 2018 11:09:51 -0700 (PDT) Received: from gmail.com (net-93-144-128-215.cust.dsl.teletu.it. [93.144.128.215]) by smtp.gmail.com with ESMTPSA id d89sm490912edc.75.2018.03.19.11.09.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Mar 2018 11:09:50 -0700 (PDT) Date: Mon, 19 Mar 2018 19:09:50 +0100 From: Paolo Pisati To: Moritz Fischer Cc: Paolo Pisati , Alan Tull , Rob Herring , Mark Rutland , linux-fpga@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] fpga: lattice machxo2: Add Lattice MachXO2 support Message-ID: <20180319180950.GA15921@harukaze> References: <1521215669-23874-1-git-send-email-p.pisati@gmail.com> <1521215669-23874-3-git-send-email-p.pisati@gmail.com> <20180316162654.bcr7d46om2tnhm7l@us-sjc-wireless-10-16-34-48.amer.corp.natinst.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180316162654.bcr7d46om2tnhm7l@us-sjc-wireless-10-16-34-48.amer.corp.natinst.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 16, 2018 at 09:26:54AM -0700, Moritz Fischer wrote: > > > > +static enum fpga_mgr_states machxo2_spi_state(struct fpga_manager *mgr) > > +{ > > + return FPGA_MGR_STATE_UNKNOWN; > > +} > > To understand this correctly: Further up you have a way to determine the > state you're in, but then you only use that for debug printout, while > here where you should provide the status you say FPGA_MGR_STATE_UNKNOWN? > > Am I missing something here? This is more of a generic function ('What's the state of the FPGA now?') while dump_status_reg() is invoked after a specific SPI command is sent to the FPGA to keep track of the status of the chip and check that it adhere to the state machine. I'll send a v7. -- bye, p.