From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH 1/2] spi: spi-mpc512x-psc: init mode bits supported by the driver Date: Tue, 05 Feb 2013 14:16:47 +0000 Message-ID: <20130205141647.2381F3E1265@localhost> References: <1358195221-18488-1-git-send-email-agust@denx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Anatolij Gustschin , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: In-Reply-To: <1358195221-18488-1-git-send-email-agust-ynQEQJNshbs@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Mon, 14 Jan 2013 21:27:00 +0100, Anatolij Gustschin wrote: > The driver should setup mode bits it supports, otherwise > adding an SPI device might fail even if the driver supports > the requested SPI mode. > > Signed-off-by: Anatolij Gustschin Applied, thanks. g. > --- > drivers/spi/spi-mpc512x-psc.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c > index 88e5441..89480b2 100644 > --- a/drivers/spi/spi-mpc512x-psc.c > +++ b/drivers/spi/spi-mpc512x-psc.c > @@ -438,6 +438,7 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr, > master->num_chipselect = pdata->max_chipselect; > } > > + master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LSB_FIRST; > master->setup = mpc512x_psc_spi_setup; > master->transfer = mpc512x_psc_spi_transfer; > master->cleanup = mpc512x_psc_spi_cleanup; > -- > 1.7.5.4 > -- Grant Likely, B.Sc, P.Eng. Secret Lab Technologies, Ltd. ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb