Re: [PATCH] ufs: sysfs: Add WB partial flush mode support
From: Bart Van Assche
Date: Fri Jun 05 2026 - 12:05:20 EST
On 6/5/26 2:31 AM, Daniel Lee wrote:
+What: /sys/bus/platform/drivers/ufshcd/*/attributes/wb_partial_flush_mode
+What: /sys/bus/platform/devices/*.ufs/attributes/wb_partial_flush_mode
+Date: June 2026
+Contact: Daniel Lee <chullee@xxxxxxxxxx>
+Description: This entry controls Extended WriteBooster partial flush modes.
+
+ ====== ==============================
+ 0 No partial flush
+ 1 FIFO (first-in-first-out) mode
+ 2 Pinned mode
+ Others Reserved
+ ====== ==============================
+
+ The attribute is read-write.
Please change this attribute such that it accepts and reports strings
instead of numbers. This is more user-friendly and also will make shell
scripts that read from or write into this sysfs attribute much easier to
read. This will make this attribute follow the design philosophy of
self-documenting interfaces.
+static ssize_t ufs_sysfs_flag_show(struct device *dev,
+ struct device_attribute *attr, char *buf, enum flag_idn idn)
+{
+ bool flag;
+ u8 index = 0;
+ int ret;
+ struct ufs_hba *hba = dev_get_drvdata(dev);
In new code, please order declarations from longest to shortest.
+static ssize_t ufs_sysfs_flag_store(struct device *dev,
+ struct device_attribute *attr, const char *buf, size_t count,
+ enum flag_idn idn)
+{
+ bool value;
+ u8 index = 0;
+ int ret;
+ struct ufs_hba *hba = dev_get_drvdata(dev);
Also here, please order declarations from longest to shortest.
Thanks,
Bart.