mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 10:08:59 +00:00
659f4a13dd
With Linux 6.1 many of our downstream patches and out-of-tree files can be removed or at least replaced by backported upstream commits. Signed-off-by: Daniel Golle <daniel@makrotopia.org> [fix CMDLINE_OVERRIDE for arm64] Signed-off-by: Bjørn Mork <bjorn@mork.no>
42 lines
1.3 KiB
Diff
42 lines
1.3 KiB
Diff
From 06640a5da2973318c06e516da16a5b579622e7c5 Mon Sep 17 00:00:00 2001
|
|
From: "SkyLake.Huang" <skylake.huang@mediatek.com>
|
|
Date: Thu, 23 Jun 2022 18:37:55 +0800
|
|
Subject: [PATCH 3/6] drivers: spi-mem: Add spi calibration hook
|
|
|
|
Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
|
|
---
|
|
drivers/spi/spi-mem.c | 8 ++++++++
|
|
include/linux/spi/spi-mem.h | 4 ++++
|
|
2 files changed, 12 insertions(+)
|
|
|
|
--- a/drivers/spi/spi-mem.c
|
|
+++ b/drivers/spi/spi-mem.c
|
|
@@ -419,6 +419,14 @@ int spi_mem_exec_op(struct spi_mem *mem,
|
|
}
|
|
EXPORT_SYMBOL_GPL(spi_mem_exec_op);
|
|
|
|
+int spi_mem_do_calibration(struct spi_mem *mem,
|
|
+ int (*cal_read)(void *priv, u32 *addr, int addrlen, u8 *buf, int readlen),
|
|
+ void *priv)
|
|
+{
|
|
+ return spi_do_calibration(mem->spi->controller, mem->spi, cal_read, priv);
|
|
+}
|
|
+EXPORT_SYMBOL_GPL(spi_mem_do_calibration);
|
|
+
|
|
/**
|
|
* spi_mem_get_name() - Return the SPI mem device name to be used by the
|
|
* upper layer if necessary
|
|
--- a/include/linux/spi/spi-mem.h
|
|
+++ b/include/linux/spi/spi-mem.h
|
|
@@ -366,6 +366,10 @@ bool spi_mem_supports_op(struct spi_mem
|
|
int spi_mem_exec_op(struct spi_mem *mem,
|
|
const struct spi_mem_op *op);
|
|
|
|
+int spi_mem_do_calibration(struct spi_mem *mem,
|
|
+ int (*cal_read)(void *, u32 *, int, u8 *, int),
|
|
+ void *priv);
|
|
+
|
|
const char *spi_mem_get_name(struct spi_mem *mem);
|
|
|
|
struct spi_mem_dirmap_desc *
|