]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/spi/spi-mt65xx.c
spi: mediatek: mt8173 spi multiple devices support
authorLeilk Liu <leilk.liu@mediatek.com>
Mon, 26 Oct 2015 08:09:44 +0000 (16:09 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 27 Oct 2015 04:33:42 +0000 (13:33 +0900)
commit37457607ecaffe56718a0e423548edeb3d4a11b7
treee37b60c5ff7f4e83cd76eaaf05640c146088669f
parent58a984c79a68d508ccfccf4b82c0eaf7f487c399
spi: mediatek: mt8173 spi multiple devices support

mt8173 IC spi HW has 4 gpio group, it's possible to support
max <= 4 slave devices, even mtk spi HW is not congruent to spi core.
1. When a device do a spi_message transfer, spi HW should know
   which pad-group this device is on, and then writes pad-select
   register.
2. Mtk pad-select register just selects which MISO pin HW will
   receive data. For example, pad-select=1(select spi1 pins), HW just
   receives data from spi1 MISO, but it still send waveform to all 4
   group cs/clk/mosi. If cs pin in other groups is still spi mode,
   after spi1 is selected(by active cs pin), devices on other group
   will also be selected.

Signed-off-by: Leilk Liu <leilk.liu@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-mt65xx.c