net: phy: spi_ks8995: generalize creation of SPI commands
authorHelmut Buchsbaum <helmut.buchsbaum@gmail.com>
Tue, 9 Feb 2016 19:47:16 +0000 (20:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2016 16:34:24 +0000 (11:34 -0500)
commit6665e62387c64054493411d00c7b0a5a37af88a5
tree19cbc7ff8bae8ce95bdc9e8e4b410c76b5dc8574
parentcd6f288cbaab656cebd524c5ef2388c11378c827
net: phy: spi_ks8995: generalize creation of SPI commands

Prepare creating SPI reads and writes for other switch families.
The KS8995 family uses the straight forward
<8bit CMD><8bit ADDR>
sequence.
To be able to support KSZ8795 family, which uses
<3bit CMD><12bit ADDR><1 bit TR>
make the SPI command creation chip variant dependent.

Signed-off-by: Helmut Buchsbaum <helmut.buchsbaum@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/spi_ks8995.c