[PATCH 4/5] soc: hisilicon: kunpeng_hccs: support low power feature for specified HCCS

Krzysztof Kozlowski krzk at kernel.org
Sun Jul 28 04:55:06 PDT 2024


On 18/07/2024 09:11, Huisong Li wrote:
> This patch add the low power feature for specified HCCS by increasing

Please 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

> and decrasing the lane number of these HCCS ports on platform.
> 
> Signed-off-by: Huisong Li <lihuisong at huawei.com>
> ---
>  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 =
> +		__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);

Where is the ABI documentation?

Best regards,
Krzysztof




More information about the linux-arm-kernel mailing list