Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp441251imm; Fri, 31 Aug 2018 04:43:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaCB0szpMDa2NKsjBac9B95lkRgq1weKRCkIsizGMbXEOSWDlGbz0BCBKejzE1bU0IuFPDC X-Received: by 2002:a17:902:82c5:: with SMTP id u5-v6mr14847710plz.83.1535715794335; Fri, 31 Aug 2018 04:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535715794; cv=none; d=google.com; s=arc-20160816; b=aGstexcv52QeoaXjxeskp+8KYevjH08V1vkAL0aZj5N2w8VBlZudBQxh7+OGUEkzOB TBJqWwp5rdGy1AIrjldUuDm0TLVKMPCCbKad/V6zqdUOe/1RiNNMow7dF7p+SglzNKDV DeQ88kYlqzxsPiUinSB75lRBL/gToKP6SnCwjmQWtr+vAeo3zb0NQNaZMhA+KZT3s0DE tvcHNoOBrZFxqfTrYhVmwsGv4NGTtNlRicSF8EksutMfFrHs3CmjpEYvqNVZw5pZiIAl 3MwEd/OSUYAyz+WUq9LiWCop2W9XPM91tWijSMrv0rfTnRzHOYcF9TuawIerKJ8znKCl Np3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:arc-authentication-results; bh=eawye49+/LFlCFtFN5QW5gL2jZLvJR/D4lhmVK6hCQ0=; b=V2QZ4YY+MKxMw9gU1QAeIVRQqpkaNdxOTP9DYtt5buknCkT/L8mo+c+OIOkfjjaEwv 6CJUY/9oMvChsKQJzOp3iZ8gW/t/EEbR1QTMidN9p/9GICv1lrGUgcSLfwH1PYuYJ+TO UHYJ+dAN7T4BfYp/P0+EKTBvHINY0DUU3DEp+WDJL4Vjp2ZTUaBh7ecDlh3v+kbqQFeJ hyWiN+xigQeStmkFdYJprcRIhP6fxhor2yMMHeegibakj9sO9rqJXV2ZPGNcmrvdj8YK yToQp522WE88QX0+EluFiKgt0LxKPMkoltoh8r7lKYVmLw0L9IJdy7lGXCsv69lFJHxv 1+zw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5-v6si11085060pls.13.2018.08.31.04.43.00; Fri, 31 Aug 2018 04:43:14 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728163AbeHaPsZ (ORCPT + 99 others); Fri, 31 Aug 2018 11:48:25 -0400 Received: from mail-vk0-f65.google.com ([209.85.213.65]:42562 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727662AbeHaPsZ (ORCPT ); Fri, 31 Aug 2018 11:48:25 -0400 Received: by mail-vk0-f65.google.com with SMTP id t4-v6so5347572vke.9; Fri, 31 Aug 2018 04:41:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eawye49+/LFlCFtFN5QW5gL2jZLvJR/D4lhmVK6hCQ0=; b=KWwmKi+n2zZlxx5B0oSayPeaTjX6qXr754ro4T5fqRvckT8lu8MmDopTbxBKkqUAPx dvX0akT168c+/ETWl4M9olUkj3C8wBsD5nsZlXvGBUOVv+EwbMXV5Nrs1cP8X1DF4azg DF075mh7TN8UDFajotp0LtDrvM14OYz4DyngqZ5yyT8MGDjlSGNcGwXBBaG6AlJX6EqA s17odRUPxl3/ZH42aq1KItfblbdbozX1VhrtX6Vv+fadzggeMcP3YHgkGK2EpBKpMexY xJoZPW2V65XpAHh6OSEe4ZifPEd2vDg/adl3pgLAtkIGehHCmMhEugUPk9uqF88WzXul owLA== X-Gm-Message-State: APzg51BlDNGgEFBtvJyDoHxSXHxRCEmmRrRBFDoLTuVuvmSpH+aRJQJF LyFdVFRxT0cl6NmZzwFzYs2Ap035tpgg+6ONlh9mjA== X-Received: by 2002:a1f:9cc4:: with SMTP id f187-v6mr8649471vke.87.1535715678679; Fri, 31 Aug 2018 04:41:18 -0700 (PDT) MIME-Version: 1.0 References: <1535711404-29528-1-git-send-email-yogeshnarayan.gaur@nxp.com> <1535711404-29528-2-git-send-email-yogeshnarayan.gaur@nxp.com> In-Reply-To: <1535711404-29528-2-git-send-email-yogeshnarayan.gaur@nxp.com> From: Geert Uytterhoeven Date: Fri, 31 Aug 2018 13:41:06 +0200 Message-ID: Subject: Re: [PATCH 1/7] spi: add slave device size in spi_device struct To: Yogesh Gaur Cc: MTD Maling List , Boris Brezillon , Marek Vasut , linux-spi , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Mark Rutland , Rob Herring , Linux Kernel Mailing List , Frieder Schrempf , Brian Norris , Shawn Guo , Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yogesh, Thanks for your patch! On Fri, Aug 31, 2018 at 12:33 PM Yogesh Gaur wrote: > Add 'size' data variable in spi_device struct. > This is to save the size of the connected slave device. What is the "size" of an SPI slave device? > After slave device scan, spi_nor_scan, size being assigned to this > from MTD layer. Ah, this is MTD specific? > SFDP read is being requested before completion of spi_nor_scan() > routine, thus populate device size before making read request > to the SPI controller. > > Signed-off-by: Yogesh Gaur > --- a/include/linux/spi/spi.h > +++ b/include/linux/spi/spi.h > @@ -127,6 +127,7 @@ void spi_statistics_add_transfer_stats(struct spi_statistics *stats, > * for driver coldplugging, and in uevents used for hotplugging > * @cs_gpio: gpio number of the chipselect line (optional, -ENOENT when > * not using a GPIO line) > + * @size: size of the connected slave device Please document what is the meaning of "size". > * > * @statistics: statistics for the spi_device > * > @@ -168,6 +169,7 @@ struct spi_device { > void *controller_data; > char modalias[SPI_NAME_SIZE]; > int cs_gpio; /* chip select gpio */ > + u32 size; /* size of slave device */ > > /* the statistics */ > struct spi_statistics statistics; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds