thermal/drivers/int340x: Add missing attribute for data rate base

Message ID 20221228001005.2690278-1-srinivas.pandruvada@linux.intel.com
State New
Headers
Series thermal/drivers/int340x: Add missing attribute for data rate base |

Commit Message

srinivas pandruvada Dec. 28, 2022, 12:10 a.m. UTC
  commit 473be51142ad ("thermal: int340x: processor_thermal: Add RFIM
driver")'
added rfi_restriction_data_rate_base string, mmio details and
documentation, but missed adding attribute to sysfs.

Add missing sysfs attribute.

Fixes: 473be51142ad ("thermal: int340x: processor_thermal: Add RFIM driver")
Cc: stable@vger.kernel.org # v5.11+
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 .../thermal/intel/int340x_thermal/processor_thermal_rfim.c    | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Rafael J. Wysocki Dec. 30, 2022, 6:49 p.m. UTC | #1
On Wed, Dec 28, 2022 at 1:10 AM Srinivas Pandruvada
<srinivas.pandruvada@linux.intel.com> wrote:
>
> commit 473be51142ad ("thermal: int340x: processor_thermal: Add RFIM
> driver")'
> added rfi_restriction_data_rate_base string, mmio details and
> documentation, but missed adding attribute to sysfs.
>
> Add missing sysfs attribute.
>
> Fixes: 473be51142ad ("thermal: int340x: processor_thermal: Add RFIM driver")
> Cc: stable@vger.kernel.org # v5.11+
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
>  .../thermal/intel/int340x_thermal/processor_thermal_rfim.c    | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> index 8c42e7662033..92ed1213fe37 100644
> --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> @@ -172,6 +172,7 @@ static const struct attribute_group fivr_attribute_group = {
>  RFIM_SHOW(rfi_restriction_run_busy, 1)
>  RFIM_SHOW(rfi_restriction_err_code, 1)
>  RFIM_SHOW(rfi_restriction_data_rate, 1)
> +RFIM_SHOW(rfi_restriction_data_rate_base, 1)
>  RFIM_SHOW(ddr_data_rate_point_0, 1)
>  RFIM_SHOW(ddr_data_rate_point_1, 1)
>  RFIM_SHOW(ddr_data_rate_point_2, 1)
> @@ -181,11 +182,13 @@ RFIM_SHOW(rfi_disable, 1)
>  RFIM_STORE(rfi_restriction_run_busy, 1)
>  RFIM_STORE(rfi_restriction_err_code, 1)
>  RFIM_STORE(rfi_restriction_data_rate, 1)
> +RFIM_STORE(rfi_restriction_data_rate_base, 1)
>  RFIM_STORE(rfi_disable, 1)
>
>  static DEVICE_ATTR_RW(rfi_restriction_run_busy);
>  static DEVICE_ATTR_RW(rfi_restriction_err_code);
>  static DEVICE_ATTR_RW(rfi_restriction_data_rate);
> +static DEVICE_ATTR_RW(rfi_restriction_data_rate_base);
>  static DEVICE_ATTR_RO(ddr_data_rate_point_0);
>  static DEVICE_ATTR_RO(ddr_data_rate_point_1);
>  static DEVICE_ATTR_RO(ddr_data_rate_point_2);
> @@ -248,6 +251,7 @@ static struct attribute *dvfs_attrs[] = {
>         &dev_attr_rfi_restriction_run_busy.attr,
>         &dev_attr_rfi_restriction_err_code.attr,
>         &dev_attr_rfi_restriction_data_rate.attr,
> +       &dev_attr_rfi_restriction_data_rate_base.attr,
>         &dev_attr_ddr_data_rate_point_0.attr,
>         &dev_attr_ddr_data_rate_point_1.attr,
>         &dev_attr_ddr_data_rate_point_2.attr,
> --

Applied as 6.2-rc material, thanks!
  

Patch

diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
index 8c42e7662033..92ed1213fe37 100644
--- a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
+++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
@@ -172,6 +172,7 @@  static const struct attribute_group fivr_attribute_group = {
 RFIM_SHOW(rfi_restriction_run_busy, 1)
 RFIM_SHOW(rfi_restriction_err_code, 1)
 RFIM_SHOW(rfi_restriction_data_rate, 1)
+RFIM_SHOW(rfi_restriction_data_rate_base, 1)
 RFIM_SHOW(ddr_data_rate_point_0, 1)
 RFIM_SHOW(ddr_data_rate_point_1, 1)
 RFIM_SHOW(ddr_data_rate_point_2, 1)
@@ -181,11 +182,13 @@  RFIM_SHOW(rfi_disable, 1)
 RFIM_STORE(rfi_restriction_run_busy, 1)
 RFIM_STORE(rfi_restriction_err_code, 1)
 RFIM_STORE(rfi_restriction_data_rate, 1)
+RFIM_STORE(rfi_restriction_data_rate_base, 1)
 RFIM_STORE(rfi_disable, 1)
 
 static DEVICE_ATTR_RW(rfi_restriction_run_busy);
 static DEVICE_ATTR_RW(rfi_restriction_err_code);
 static DEVICE_ATTR_RW(rfi_restriction_data_rate);
+static DEVICE_ATTR_RW(rfi_restriction_data_rate_base);
 static DEVICE_ATTR_RO(ddr_data_rate_point_0);
 static DEVICE_ATTR_RO(ddr_data_rate_point_1);
 static DEVICE_ATTR_RO(ddr_data_rate_point_2);
@@ -248,6 +251,7 @@  static struct attribute *dvfs_attrs[] = {
 	&dev_attr_rfi_restriction_run_busy.attr,
 	&dev_attr_rfi_restriction_err_code.attr,
 	&dev_attr_rfi_restriction_data_rate.attr,
+	&dev_attr_rfi_restriction_data_rate_base.attr,
 	&dev_attr_ddr_data_rate_point_0.attr,
 	&dev_attr_ddr_data_rate_point_1.attr,
 	&dev_attr_ddr_data_rate_point_2.attr,