On 18/07/2024 09:11, Huisong Li wrote:got it. many thanks.
This patch add the low power feature for specified HCCS by increasingPlease do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
Ok, will split the doc patch and add doc with code patch.
and decrasing the lane number of these HCCS ports on platform....
Signed-off-by: Huisong Li <lihuisong@xxxxxxxxxx>
---
drivers/soc/hisilicon/Kconfig | 7 +-
drivers/soc/hisilicon/kunpeng_hccs.c | 377 ++++++++++++++++++++++++++-
drivers/soc/hisilicon/kunpeng_hccs.h | 14 +
3 files changed, 394 insertions(+), 4 deletions(-)
+static struct kobj_attribute pm_types_attr =Where is the ABI documentation?
+ __ATTR(support_pm_types, 0444, support_pm_types_show, NULL);
static ssize_t used_types_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
@@ -1213,11 +1551,46 @@ static struct kobj_attribute used_types_attr =
static void hccs_remove_misc_sysfs(struct hccs_dev *hdev)
{
sysfs_remove_file(&hdev->dev->kobj, &used_types_attr.attr);
+ sysfs_remove_file(&hdev->dev->kobj, &pm_types_attr.attr);
+
+ if (!(hdev->caps & HCCS_CAPS_HCCS_V2_PM))
+ return;
+
+ sysfs_remove_file(&hdev->dev->kobj, &dec_lane_attr.attr);
+ sysfs_remove_file(&hdev->dev->kobj, &inc_lane_attr.attr);
}
static int hccs_add_misc_sysfs(struct hccs_dev *hdev)
{
- return sysfs_create_file(&hdev->dev->kobj, &used_types_attr.attr);
+ int ret;
+
+ ret = sysfs_create_file(&hdev->dev->kobj, &used_types_attr.attr);
+ if (ret)
+ return ret;
+
+ ret = sysfs_create_file(&hdev->dev->kobj, &pm_types_attr.attr);
Best regards,
Krzysztof
.