Home
last modified time | relevance | path

Searched hist:"2 ff86f603222e5cbc428660130d9896d89a88f59" (Results 1 – 4 of 4) sorted by relevance

/optee_os/core/include/
H A Dspi.h2ff86f603222e5cbc428660130d9896d89a88f59 Wed Dec 28 02:40:05 UTC 2016 Victor Chong <victor.chong@linaro.org> drivers: spi: simplify code

1. SPI mandates that sizes of transmitted and received packet are of same
size [1]. As discussed in [2], this means that *num_rxpkts != num_txpkts
is not a valid use case so there's no need for both and we can just merge
them and use num_pkts.

2. Remove tx{8,16} and rx{8,16} only functions as these are not
commonly used. If necessary, users can call just txrx{8,16} with
rdat or wdat as NULL for tx{8,16} and rx{8,16} respectively as
replacements. E.g.:

tx8:
txrx8(chip, wdat, NULL, num_pkts);

rx16:
txrx16(chip, NULL, rdat, num_pkts);

3. Remove unnecessary or repetitive enums and headers and line feeds

[1] http://www.quanser.com/products/quarc/documentation/spi_protocol.html
[2] https://github.com/OP-TEE/optee_os/pull/1215

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
[jf: rebase on top of master]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
/optee_os/core/include/drivers/
H A Dpl022_spi.h2ff86f603222e5cbc428660130d9896d89a88f59 Wed Dec 28 02:40:05 UTC 2016 Victor Chong <victor.chong@linaro.org> drivers: spi: simplify code

1. SPI mandates that sizes of transmitted and received packet are of same
size [1]. As discussed in [2], this means that *num_rxpkts != num_txpkts
is not a valid use case so there's no need for both and we can just merge
them and use num_pkts.

2. Remove tx{8,16} and rx{8,16} only functions as these are not
commonly used. If necessary, users can call just txrx{8,16} with
rdat or wdat as NULL for tx{8,16} and rx{8,16} respectively as
replacements. E.g.:

tx8:
txrx8(chip, wdat, NULL, num_pkts);

rx16:
txrx16(chip, NULL, rdat, num_pkts);

3. Remove unnecessary or repetitive enums and headers and line feeds

[1] http://www.quanser.com/products/quarc/documentation/spi_protocol.html
[2] https://github.com/OP-TEE/optee_os/pull/1215

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
[jf: rebase on top of master]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
/optee_os/core/arch/arm/plat-hikey/
H A Dspi_test.c2ff86f603222e5cbc428660130d9896d89a88f59 Wed Dec 28 02:40:05 UTC 2016 Victor Chong <victor.chong@linaro.org> drivers: spi: simplify code

1. SPI mandates that sizes of transmitted and received packet are of same
size [1]. As discussed in [2], this means that *num_rxpkts != num_txpkts
is not a valid use case so there's no need for both and we can just merge
them and use num_pkts.

2. Remove tx{8,16} and rx{8,16} only functions as these are not
commonly used. If necessary, users can call just txrx{8,16} with
rdat or wdat as NULL for tx{8,16} and rx{8,16} respectively as
replacements. E.g.:

tx8:
txrx8(chip, wdat, NULL, num_pkts);

rx16:
txrx16(chip, NULL, rdat, num_pkts);

3. Remove unnecessary or repetitive enums and headers and line feeds

[1] http://www.quanser.com/products/quarc/documentation/spi_protocol.html
[2] https://github.com/OP-TEE/optee_os/pull/1215

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
[jf: rebase on top of master]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
/optee_os/core/drivers/
H A Dpl022_spi.c2ff86f603222e5cbc428660130d9896d89a88f59 Wed Dec 28 02:40:05 UTC 2016 Victor Chong <victor.chong@linaro.org> drivers: spi: simplify code

1. SPI mandates that sizes of transmitted and received packet are of same
size [1]. As discussed in [2], this means that *num_rxpkts != num_txpkts
is not a valid use case so there's no need for both and we can just merge
them and use num_pkts.

2. Remove tx{8,16} and rx{8,16} only functions as these are not
commonly used. If necessary, users can call just txrx{8,16} with
rdat or wdat as NULL for tx{8,16} and rx{8,16} respectively as
replacements. E.g.:

tx8:
txrx8(chip, wdat, NULL, num_pkts);

rx16:
txrx16(chip, NULL, rdat, num_pkts);

3. Remove unnecessary or repetitive enums and headers and line feeds

[1] http://www.quanser.com/products/quarc/documentation/spi_protocol.html
[2] https://github.com/OP-TEE/optee_os/pull/1215

Signed-off-by: Victor Chong <victor.chong@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
[jf: rebase on top of master]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>