public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* Empty Intel ISH HID custom sensor feature attributes on Linux 6.6
@ 2023-11-25 23:51 Philipp Jungkamp
  2023-11-26  0:40 ` Bagas Sanjaya
  0 siblings, 1 reply; 2+ messages in thread
From: Philipp Jungkamp @ 2023-11-25 23:51 UTC (permalink / raw)
  Cc: linux-iio, linux-input

Hello,

it seems like the query of custom sensor feature information is not
working in for kernels in the 6.6 series. I've been using a simple
shell script to see what custom sensors are present on my system.

This is now failing to output any information. All bytes in the
feature-*-value file of an HID-SENSOR-2000e1.* sensor in the sysfs are
filled with zeroes. It seems like the underlying call to
hid_sensor_hub_get_feature does only write zeroes into the given
buffer.

The hid-sensor-custom logic that checks for the presence of my ambient
light sensor using that logic is also not working, the HID-SENSOR-LISS-
* device is not showing up. The hid-sensor-hub in question is the Intel
ISH of my Lenovo Yoga 9 14IAP7.

Is this a known problem with the 6.6 series?
Where there related changes in the modules in the stack? E.g.:
- hid-sensor-custom
- hid-sensor-hub
- ishtp-hid

I've not found anything immediatly obvious while checking the git logs.
I'll try to bisect the issue between 6.5 and 6.6 and report back.

Regards,
Philipp Jungkamp



This is the fish script to parse the sysfs feature attributes:

  set -a properties property-friendly-name:'Friendly Name'
  set -a properties property-sensor-model:'Sensor Model'
  set -a properties property-sensor-manufacturer:'Manufacturer'
  set -a properties property-sensor-serial-number:'Serial Number'

  function get_value -a file
    set_color blue
    for letter in (string split -n ' ' < $file)
      test ! $letter -eq 0
      and printf \\(printf %o $letter)
    end
    set_color normal
  end

  function check_property -a property feature
    if string match -q (string split -f1 ':' $property) -- (cat
feature/*-name)
      echo \t(string split -f2 ':' $property): (get_value $feature/*-
value)
    end
  end

  for sensor in /sys/bus/hid/devices/*/HID-SENSOR-2000e1*
    echo Sensor: (set_color green; realpath $sensor; set_color normal)
    for feature in $sensor/feature-*
      for property in $properties
        check_property $property $feature
      end
    end
    echo
  end


Example output from Linux 6.5:

  Sensor: /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-
9BD9-A04D34F0C226}/001F:8087:0AC2.0003/HID-SENSOR-2000e1.7.auto 
	Serial Number: LUID:00E1001A270E0080
	Sensor Model: LENOVO_ST_HUMANSENSE S
	Manufacturer: LENOVO
	Friendly Name: Lenovo ST HPD v201 Sensor


Example output from Linux 6.6:

  Sensor: /sys/devices/pci0000:00/0000:00:12.0/{33AECD58-B679-4E54-
9BD9-A04D34F0C226}/001F:8087:0AC2.0003/HID-SENSOR-2000e1.7.auto 
	Serial Number: 
	Sensor Model:
	Manufacturer:
	Friendly Name:



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-26  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-25 23:51 Empty Intel ISH HID custom sensor feature attributes on Linux 6.6 Philipp Jungkamp
2023-11-26  0:40 ` Bagas Sanjaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox