From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Date: Mon, 02 Dec 2013 10:59:25 +0000 Subject: Re: [PATCH 03/11] spi: spi-sh-msiof: let it run even without GPIO Message-Id: <529C680D.4050604@cogentembedded.com> List-Id: References: <20131202031557.162e78d407d82effdee627ac@ops.dti.ne.jp> <1385921962-19843-1-git-send-email-takasi-y@ops.dti.ne.jp> <1385921962-19843-3-git-send-email-takasi-y@ops.dti.ne.jp> In-Reply-To: <1385921962-19843-3-git-send-email-takasi-y@ops.dti.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: takasi-y@ops.dti.ne.jp, linux-sh@vger.kernel.org Cc: Simon Horman , Magnus Damm , Linus Walleij , Mark Brown , linux-spi@vger.kernel.org Hello. On 01-12-2013 22:19, takasi-y@ops.dti.ne.jp wrote: > From: Takashi Yoshii > In current implementation, CS is controlled by GPIO, which is passed > through spi->controller_data. But because sh-msiof HW module has a > function to output CS by itself, which is already enabled and actual > switch will be done by pinmux, we can silently ignore if GPIO is null. > Signed-off-by: Takashi Yoshii > --- > drivers/spi/spi-sh-msiof.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c > index ac8795f..2a2b0dd 100644 > --- a/drivers/spi/spi-sh-msiof.c > +++ b/drivers/spi/spi-sh-msiof.c > @@ -420,8 +420,10 @@ static void sh_msiof_spi_chipselect(struct spi_device *spi, int is_on) > !!(spi->mode & SPI_LSB_FIRST)); > } > > - /* use spi->controller data for CS (same strategy as spi_gpio) */ > - gpio_set_value((unsigned)spi->controller_data, value); > + /* use spi->controller data for CS (same strategy as spi_gpio), > + * if any. otherwise let HW controll CS */ The preferred style of multi-line comments is this: /* * bla * bla */ WBR, Sergei