Commit 34ad74914140dc6060b56a27641c686e86d7a9a4
Committed by
Jagan Teki
1 parent
618e8e20c2
Exists in
smarc_8mq_lf_v2020.04
and in
12 other branches
spi: mxc_spi: Fix chipselect on DM_SPI driver uclass
CS GPIO activation low/high is determinated by the device tree so we don't need to take in accoung in cs_activate and cs_deactivate Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
drivers/spi/mxc_spi.c
... | ... | @@ -60,7 +60,7 @@ |
60 | 60 | static void mxc_spi_cs_activate(struct mxc_spi_slave *mxcs) |
61 | 61 | { |
62 | 62 | if (CONFIG_IS_ENABLED(DM_SPI)) { |
63 | - dm_gpio_set_value(&mxcs->ss, mxcs->ss_pol); | |
63 | + dm_gpio_set_value(&mxcs->ss, 1); | |
64 | 64 | } else { |
65 | 65 | if (mxcs->gpio > 0) |
66 | 66 | gpio_set_value(mxcs->gpio, mxcs->ss_pol); |
... | ... | @@ -70,7 +70,7 @@ |
70 | 70 | static void mxc_spi_cs_deactivate(struct mxc_spi_slave *mxcs) |
71 | 71 | { |
72 | 72 | if (CONFIG_IS_ENABLED(DM_SPI)) { |
73 | - dm_gpio_set_value(&mxcs->ss, !(mxcs->ss_pol)); | |
73 | + dm_gpio_set_value(&mxcs->ss, 0); | |
74 | 74 | } else { |
75 | 75 | if (mxcs->gpio > 0) |
76 | 76 | gpio_set_value(mxcs->gpio, !(mxcs->ss_pol)); |
... | ... | @@ -508,7 +508,7 @@ |
508 | 508 | if (plat->base == FDT_ADDR_T_NONE) |
509 | 509 | return -ENODEV; |
510 | 510 | |
511 | - ret = dm_gpio_set_value(&plat->ss, !(mxcs->ss_pol)); | |
511 | + ret = dm_gpio_set_value(&plat->ss, 0); | |
512 | 512 | if (ret) { |
513 | 513 | dev_err(bus, "Setting cs error\n"); |
514 | 514 | return ret; |