mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 01:09:33 -04:00
spi: pl022: User more sensible defaults
When using the device tree, which must be considered normal
these days, in order to get some kind of normal functionality
out of the PL022 users have to actively go into the device
tree and edit the SPI clients like this:
spi {
compatible = "arm,pl022";
num-cs = <1>;
cs-gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
foo@0 {
compatible = "foo";
reg = <0>;
pl022,interface = <0>;
pl022,com-mode = <0>;
};
};
Otherwise the PL022 will come up as a client (slave) and
using polling mode. This is quite unintuitive and many users
will get their device trees wrong.
Alter the defaults such that we come up in host mode
(master) and use interrupt mode.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20210328121530.1983081-1-linus.walleij@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
85c0ed12f7
commit
413c601e8f
@@ -1820,9 +1820,9 @@ static int calculate_effective_freq(struct pl022 *pl022, int freq, struct
|
||||
* supplies it.
|
||||
*/
|
||||
static const struct pl022_config_chip pl022_default_chip_info = {
|
||||
.com_mode = POLLING_TRANSFER,
|
||||
.com_mode = INTERRUPT_TRANSFER,
|
||||
.iface = SSP_INTERFACE_MOTOROLA_SPI,
|
||||
.hierarchy = SSP_SLAVE,
|
||||
.hierarchy = SSP_MASTER,
|
||||
.slave_tx_disable = DO_NOT_DRIVE_TX,
|
||||
.rx_lev_trig = SSP_RX_1_OR_MORE_ELEM,
|
||||
.tx_lev_trig = SSP_TX_1_OR_MORE_EMPTY_LOC,
|
||||
|
||||
Reference in New Issue
Block a user