openwrt/target/linux/starfive/patches-6.18/0005-i2c-designware-Delete-SMBus-functionalities.patch
Zhihao Xu 6a7cb7b65d kernel/starfive: create files for v6.18 (from v6.12)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Zhihao Xu <ngc7331@outlook.com>
2026-04-21 14:49:35 +02:00

34 lines
1.1 KiB
Diff

From a37f1f4370af69644c512e5e296a10357338c310 Mon Sep 17 00:00:00 2001
From: Hal Feng <hal.feng@starfivetech.com>
Date: Fri, 12 May 2023 17:33:20 +0800
Subject: [PATCH 05/55] i2c: designware: Delete SMBus functionalities
The driver didn't implement the smbus interface,
so replace the SMBus functionalities with
I2C_FUNC_SMBUS_EMUL.
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
---
drivers/i2c/busses/i2c-designware-core.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -17,12 +17,10 @@
#include <linux/regmap.h>
#include <linux/types.h>
-#define DW_IC_DEFAULT_FUNCTIONALITY (I2C_FUNC_I2C | \
- I2C_FUNC_SMBUS_BYTE | \
- I2C_FUNC_SMBUS_BYTE_DATA | \
- I2C_FUNC_SMBUS_WORD_DATA | \
- I2C_FUNC_SMBUS_BLOCK_DATA | \
- I2C_FUNC_SMBUS_I2C_BLOCK)
+#define DW_IC_DEFAULT_FUNCTIONALITY (I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL \
+ & ~I2C_FUNC_SMBUS_QUICK \
+ & ~I2C_FUNC_SMBUS_PROC_CALL \
+ & ~I2C_FUNC_SMBUS_PEC))
#define DW_IC_CON_MASTER BIT(0)
#define DW_IC_CON_SPEED_STD (1 << 1)