Skip to contentSkip to conversation

spi: imx: Implement set_speed

PATCH Superseded Marek Vasut 3 participants 4 messages Feb 3, 2021 – Feb 26, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 spi: imx: Implement set_speed

The set_speed() callback should configure the bus speed, make it so.

Cc Jagan Teki <[email protected]>
Cc Stefano Babic <[email protected]>

---
V2: Rename dev_get_platdata() to dev_get_plat()

---
 drivers/spi/mxc_spi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/spi/mxc_spi.c +4 -1
index 553a0315df5..7449d9c72cc 100644
@@ -661,7 +661,10 @@ static int mxc_spi_release_bus(struct udevice *dev)
 
 static int mxc_spi_set_speed(struct udevice *bus, uint speed)
 {
-	/* Nothing to do */
+	struct mxc_spi_slave *mxcs = dev_get_plat(bus);
+
+	mxcs->max_hz = speed;
+
 	return 0;
 }
 
Signature · 1 line
2.29.2
#2 lore raw

PATCH v2 1/1 spi: imx: Implement set_speed

Quoted 14 lines · Bin Meng
Quoted 12 lines · Marek Vasut

The set_speed() callback should configure the bus speed, make it so.

Cc Jagan Teki <[email protected]>
Cc Stefano Babic <[email protected]>

---
V2: Rename dev_get_platdata() to dev_get_plat()

---
  drivers/spi/mxc_spi.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
Quoted 1 line

Jagan, any news on this patch ?