[Skiboot] [PATCH] sensors: occ: Skip counter type of sensors

Oliver oohall at gmail.com
Fri Nov 24 16:12:57 AEDT 2017


On Thu, Oct 19, 2017 at 6:08 PM, Shilpasri G Bhat
<shilpa.bhat at linux.vnet.ibm.com> wrote:
> Don't add counter type of sensors to device-tree as they don't
> fit into hwmon sensor interface.
>
> Signed-off-by: Shilpasri G Bhat <shilpa.bhat at linux.vnet.ibm.com>
> ---
>  hw/occ-sensor.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/hw/occ-sensor.c b/hw/occ-sensor.c
> index 1042c11..3de91a0 100644
> --- a/hw/occ-sensor.c
> +++ b/hw/occ-sensor.c
> @@ -591,6 +591,9 @@ void occ_sensors_init(void)
>                         struct cpu_thread *c = NULL;
>                         u32 handler;
>
> +                       if (md[i].structure_type != OCC_SENSOR_READING_FULL)
> +                               continue;
> +
>                         if (!(md[i].type & HWMON_SENSORS_MASK))
>                                 continue;

You might be better off filtering these based on the unit in the name
block rather than the type.

>
> --
> 1.8.3.1
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot


More information about the Skiboot mailing list