Commit Graph

23 Commits

Author SHA1 Message Date
Mark Brown 907e26b6f5 Merge remote-tracking branches 'spi/topic/fsl-espi', 'spi/topic/gpio', 'spi/topic/hspi', 'spi/topic/mpc512x', 'spi/topic/msiof', 'spi/topic/nuc900', 'spi/topic/oc-tiny', 'spi/topic/omap', 'spi/topic/orion' and 'spi/topic/pci' into spi-linus 2014-01-23 13:07:09 +00:00
Geert Uytterhoeven c6c07b4f6d spi: sh-hspi: Spelling s/recive/receive/
Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-13 11:21:45 +00:00
Axel Lin caedb997a4 spi: sh-hspi: Fix modalias for sh-hspi
Make the modalias matches the driver name.
Seems the MODULE_ALIAS is copied from drivers/spi/spi-sh-spi.c.
So both spi-sh.ko and spi-sh-hspi.ko have the same alias. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-01-08 12:14:22 +00:00
Mark Brown ffd6dd3eaa Merge remote-tracking branch 'spi/topic/hspi' into spi-next 2013-10-25 09:51:28 +01:00
Mark Brown 52d85ebb7b Merge remote-tracking branch 'spi/topic/bfin' into spi-next 2013-10-25 09:51:21 +01:00
Kuninori Morimoto e5f7825cda spi/hspi: add device tree support
Support for loading the Renesas HSPI driver via devicetree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25 09:49:56 +01:00
Jingoo Han a29c8ae718 spi: sh-hspi: Fix checkpatch issue
Fix the following checkpatch warning.

  WARNING: space prohibited before semicolon

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-15 13:13:21 +01:00
Kuninori Morimoto 268d76430d spi/hspi: fixup Runtime PM enable timing
3e00a09d2f
(spi/hspi: Convert to core runtime PM)
enabled master->auto_runtime_pm.
Then, pm_runtime_enable() is required *before*
spi_register_master() calling.
This patch fixed it up.
Kernel will hang up with "spi_master spi0: Failed to power device: -13"
message without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-03 14:08:06 +01:00
Jingoo Han 1c43f2ae1e spi: sh-hspi: use devm_spi_register_master()
Use devm_spi_register_master() to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-26 11:42:53 +01:00
Mark Brown 874915ed4b Merge remote-tracking branch 'spi/topic/sh-hspi' into spi-next 2013-09-01 13:49:10 +01:00
Mark Brown 3e00a09d2f spi/hspi: Convert to core runtime PM
Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-29 18:00:21 +01:00
Mark Brown 8e76fda3e1 spi/sh-hspi: Remove noisy print
This adds no meaningful value.

Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-28 19:14:59 +01:00
Mark Brown 3d09da11b5 Merge remote-tracking branch 'spi/topic/pdata' into spi-next 2013-06-26 16:21:02 +01:00
Kuninori Morimoto bc2bfffc38 spi: hspi: fixup long delay time
Current HSPI driver is using msleep(20) on hspi_status_check_timeout(),
but it was too long delay for SPI device.
Bock-W board SPI access was too slow without this patch.
This patch uses udelay(10) for it.

Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-06-04 18:51:40 +01:00
Jingoo Han 24b5a82cf5 spi: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-05-23 09:09:55 -05:00
Cyril Roelandt d3601e56cf spi/sh-hspi: fix return value check in hspi_probe().
According to its documentation, clk_get() returns a "valid IS_ERR() condition
containing errno", so we should call IS_ERR() rather than a NULL check.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-12-19 15:11:41 +00:00
Grant Likely fd4a319bc9 spi: Remove HOTPLUG section attributes
CONFIG_HOTPLUG is going away as an option.  As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Bill Pemberton has done most of the legwork on this series. I've used
his script to purge the attributes from the drivers/gpio tree.

Reported-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-12-07 17:06:43 +00:00
Phil Edworthy ce32930586 spi/sh-hspi: add CS manual control support
The current HSPI driver used automatic CS control, leading to CS
active for each byte transmitted. This patch changes the driver
to manual CS control, and ensures CS is active thoughout a whole
message. Additionally, it uses the cs_change field to determine
if CS is disabled between transfers in the message.

Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-11-23 09:52:43 +00:00
Julia Lawall 78bfee0e1e spi: spi-sh-hspi: drop frees of devm_ alloc'd data
devm free functions should not have to be explicitly used.

A semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

(
* devm_kfree(...);
|
* devm_free_irq(...);
|
* devm_iounmap(...);
|
* devm_release_region(...);
|
* devm_release_mem_region(...);
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-06 07:44:19 +08:00
Kuninori Morimoto bb9c5687e8 spi: sh-hspi: modify write/read method
Current sh-hspi had wrong write/read method which was not linux standard.
If spi_transfer requests tx[2], rx[2] len=2,
then, driver should run tx[0], rx[0], tx[1], rx[1].
But current sh-hspi runs tx[0], tx[1], rx[0], rx[1].
This patch fixes it up.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-03-15 03:41:50 -06:00
Kuninori Morimoto 49e599b859 spi: sh-hspi: control spi clock more correctly
Current sh-hspi had used platform-specific speed.
This patch remove it, and use spi_transfer specific speed.
It removes unnecessary flags from struct sh_hspi_info,
but struct sh_hspi_info is still exist, since sh-hspi needs
platform info in the future.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-03-15 03:41:01 -06:00
Kuninori Morimoto ec139b67ad spi: sh-hspi: convert to using core message queue
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-03-15 03:40:44 -06:00
Kuninori Morimoto d1c8bbd793 spi: Add SuperH HSPI prototype driver
This patch adds SuperH HSPI driver.
It is still prototype driver, but has enough function at this point.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2012-03-09 09:50:09 -07:00