+
     vi2  c                   s|    R t ^ RIt^ RIt^ RIHt ]P
                  ! ]4      t]P                  R8H  t	 ! R R4      t
R# )zoAccess to Linux HWMON data.

Copyright Jonas Malaco and contributors
SPDX-License-Identifier: GPL-3.0-or-later
N)PathZlinuxc                   sj   a  ] tR t^t o RtRR.tR t]R 4       tR t	R t
R tR	 t]R
 4       tRtV tR# )HwmonDevicezUnstable API.driverpathc                s    Wn         W n        R # Nr   r   )selfr   r      &&&;/usr/lib/python3.14/site-packages/liquidctl/driver/hwmon.py__init__ZHwmonDevice.__init__   s    	    c                s.    V P                   P                  # r   )r   name)r   s   &r   r   ZHwmonDevice.name   s    yy~~r
   c                sD    V P                   V,          P                  4       # r   )r   Zis_filer   r      &&r   has_attributeZHwmonDevice.has_attribute!   s    		D ))++r
   c                s    V P                   V,          P                  4       P                  4       p\        P	                  R W4       V# )zread %s: %s)r   Z	read_textZrstrip_LOGGERdebugr   r   Zvalues   && r   
get_stringZHwmonDevice.get_string$   s5    T!,,.557mT1r
   c                s6    \        V P                  V4      4      # r   )Zintr   r   r   r   read_intZHwmonDevice.read_int)   s    4??4())r
   c                s\    V P                   V,          P                  \        V4      4       R # r   )r   Z
write_textZstrr   r   r   	write_intZHwmonDevice.write_int,   s    	T	%%c%j1r
   c                s   \         '       g   R# VP                  R4      '       g   \        P                  RV4       R# VP	                  4       pVR,          p\        RV4      pVR,          pVR,          pVP                  4       '       g   R# VP                  4       p\        V4      p\        VR4      '       d   \        P                  RV4       R# VR	,          P                  4       P                  p\        Wq4      # )
z"Find the `HwmonDevice` for `path`.Ns   /dev/hidrawz3cannot search hwmon device for %s: unsupported path:i   NNz/sys/class/hidrawZdeviceZhwmonz:cannot pick hwmon device for %s: more than one alternativer   )	_IS_LINUXZ
startswithr   r   Zdecoder    ZexistsZiterdirZnextZreadlinkr   r   )Zclsr   r   Z
class_pathZ
sys_deviceZhwmon_devicesZhwmon_pathsr   s   &&      r   from_hidrawZHwmonDevice.from_hidraw/   s     y~..MMOQUV{{}Bx-t4
(*
"W,##%%#++-K T""MMVX\]x'113886((r
   r   N)__name__Z
__module__Z__qualname__Z__firstlineno____doc__Z	__slots__r	   Zpropertyr   r   r   r   r   Zclassmethodr   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r   r   r      sX      	I
  ,
*2 ) )r
   r   )r   ZloggingZsysZpathlibr    Z	getLoggerr   r   Zplatformr   r   ) r
   r   <module>r      s=     
 


H
%LLG#	<) <)r
   