History log of /drivers/spi/spi-sc18is602.c
Revision Date Author Comments
09e99bca8324c3335794b86802486bb5191861d5 28-Feb-2014 Axel Lin <axel.lin@ingics.com> spi: sc18is602: Convert to let spi core validate transfer speed

Set master->max_speed_hz and master->min_speed_hz then spi core will handle
checking transfer speed. So we can remove the same checking in this driver.

This patch also remove testing if hz is 0 because spi->max_speed_hz will be
default set to master->min_speed_hz if it was not set. So the transfer speed
will never set to 0.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
c5c67e31bc1b96658169b5b553b9be42e2ca6368 11-Feb-2014 Axel Lin <axel.lin@ingics.com> spi: sc18is602: Move checking chip_select for SC18IS602 to sc18is602_setup

So it will be checked when spi device is added onto the spi bus.
spi_add_device() calls spi_setup() which then calls spi->master->setup().
No need to check it every time sc18is602_transfer_one() is called.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
589f6a90e6c5cda51ecb89799c5bff4074e9ef77 20-Jan-2014 Axel Lin <axel.lin@ingics.com> spi: sc18is602: Remove sc18is602_setup() because it is done by spi core

The checking for spi->mode is done in the implementation of spi_setup().
Calling sc18is602_check_transfer(spi, NULL, 0) is pointless because
the code is equivent to checking if spi->max_speed_hz is 0.
Note, sc18is602_check_transfer actually allows spi->max_speed_hz is 0
if t->speed_hz is set. So return error in sc18is602_setup() when
spi->max_speed_hz is 0 does not make sense.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
463654cec26466a03615974444d6900f1cd0eeb9 17-Jan-2014 Axel Lin <axel.lin@ingics.com> spi: sc18is602: Convert to use bits_per_word_mask

Since commit 543bb25 "spi: add ability to validate xfer->bits_per_word in SPI
core", the driver can set bits_per_word_mask for the master then the SPI core
will reject transfers that attempt to use an unsupported bits_per_word value.
So we can remove the bits_per_word checking in sc18is602_check_transfer() and
let SPI core handle the checking.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
23061f1eb844edd349c3a0f5f40e244c9d2abfde 17-Jan-2014 Axel Lin <axel.lin@ingics.com> spi: Remove duplicate code to set default bits_per_word setting

The implementation in spi_setup() already set spi->bits_per_word = 8 when
spi->bits_per_word is 0 before calling spi->master->setup.
So we don't need to do it again in setup() callback.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Barry Song <Baohua.Song@csr.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
15e0964dc2a097de3cf518badf2237b6b6adf7fe 04-Dec-2013 Jingoo Han <jg1.han@samsung.com> spi: sc18is602: Use devm_spi_register_master()

Use devm_spi_register_master() to make cleanup paths simpler,
and remove unnecessary remove().

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@linaro.org>
58ed90de3ef58a19c035355a4a0cd6dfef6d6b0c 23-Aug-2012 Guenter Roeck <linux@roeck-us.net> spi/sc18is602: Return -EINVAL for probe failures due to I2C function mismatch

If the I2C bus master driver does not support the required functionality,
the driver returns -ENODEV. This causes a silent probe failure without error
message. Since the device has to be explicitly instantiated, and the user
should know the correct bus, this event really reflects an error condition.
Replace error return value with -EINVAL to trigger an error message showing
that the probe function failed.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
3ce8859e2e72713d3619285cab609d05c3591fc4 18-Aug-2012 Guenter Roeck <linux@roeck-us.net> spi: Master driver for NXP SC18IS602/603

This driver adds support for NXP SC18IS602/603 I2C to SPI bus bridge.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>