search for: nvkm_iccsense_sensor

Displaying 5 results from an estimated 5 matches for "nvkm_iccsense_sensor".

2016 Mar 25
7
[PATCH 0/4] Configure Power Sensors
The power sensors can be configured to sample the readout values over time. Nvidia does this too, so nouveau should probably do that too. Karol Herbst (4): iccsense: remove read function iccsense: convert to linked list iccsense: split sensor into own struct iccsense: configure sensors like nvidia does drm/nouveau/include/nvkm/subdev/iccsense.h | 6 +- drm/nouveau/nouveau_hwmon.c
2016 Mar 25
0
[PATCH 3/4] iccsense: split sensor into own struct
...(rail->idx * 2), 3, + 2 + (rail->idx * 2), 3, rail->mohm, 40 * 8); } @@ -121,81 +121,137 @@ static void * nvkm_iccsense_dtor(struct nvkm_subdev *subdev) { struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev); - struct nvkm_iccsense_rail *rail, *tmp; + struct nvkm_iccsense_sensor *sensor, *tmps; + struct nvkm_iccsense_rail *rail, *tmpr; - list_for_each_entry_safe(rail, tmp, &iccsense->rails, head) + list_for_each_entry_safe(sensor, tmps, &iccsense->sensors, head) + kfree(sensor); + list_for_each_entry_safe(rail, tmpr, &iccsense->rails, head) kfree...
2016 Mar 28
4
[PATCH v2 0/4] Configure Power Sensors
The power sensors can be configured to sample the readout values over time. Nvidia does this too, so nouveau should probably do that too. v2: use list_del and rework an error message Karol Herbst (4): iccsense: remove read function iccsense: convert to linked list iccsense: split sensor into own struct iccsense: configure sensors like nvidia does
2016 Mar 25
0
[PATCH 4/4] iccsense: configure sensors like nvidia does
...6f3709e 100644 --- a/drm/nouveau/nvkm/subdev/iccsense/base.c +++ b/drm/nouveau/nvkm/subdev/iccsense/base.c @@ -95,6 +95,63 @@ nvkm_iccsense_ina3221_read(struct nvkm_iccsense *iccsense, 40 * 8); } +static void +nvkm_iccsense_ina2x9_config(struct nvkm_iccsense *iccsense, + struct nvkm_iccsense_sensor *sensor) +{ + struct nvkm_subdev *subdev = &iccsense->subdev; + /* configuration: + * 0x0007: 0x0007 shunt and bus continous + * 0x0078: 0x0078 128 samples shunt + * 0x0780: 0x0780 128 samples bus + * 0x1800: 0x0000 +-40 mV shunt range + * 0x2000: 0x0000 16V FSR + */ + u16 value...
2016 Jul 27
0
[PATCH] nvkm/iccsense: Parse the resistors and config the right way
...se.c index 41bd5d0..658355f 100644 --- a/drm/nouveau/nvkm/subdev/iccsense/base.c +++ b/drm/nouveau/nvkm/subdev/iccsense/base.c @@ -96,60 +96,12 @@ nvkm_iccsense_ina3221_read(struct nvkm_iccsense *iccsense, } static void -nvkm_iccsense_ina209_config(struct nvkm_iccsense *iccsense, - struct nvkm_iccsense_sensor *sensor) -{ - struct nvkm_subdev *subdev = &iccsense->subdev; - /* configuration: - * 0x0007: 0x0007 shunt and bus continous - * 0x0078: 0x0078 128 samples shunt - * 0x0780: 0x0780 128 samples bus - * 0x1800: 0x0000 +-40 mV shunt range - * 0x2000: 0x0000 16V FSR - */ - u16 value...