Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) Kernel driver ntc_thermistor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) ============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) Supported thermistors from Murata:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) * Murata NTC Thermistors NCP15WB473, NCP18WB473, NCP21WB473, NCP03WB473,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)   NCP15WL333, NCP03WF104, NCP15XH103
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)   Prefixes: 'ncp15wb473', 'ncp18wb473', 'ncp21wb473', 'ncp03wb473',
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)   'ncp15wl333', 'ncp03wf104', 'ncp15xh103'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)   Datasheet: Publicly available at Murata
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) Supported thermistors from EPCOS:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) * EPCOS NTC Thermistors B57330V2103
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)   Prefixes: b57330v2103
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)   Datasheet: Publicly available at EPCOS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) Other NTC thermistors can be supported simply by adding compensation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) tables; e.g., NCP15WL333 support is added by the table ncpXXwl333.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) Authors:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 	MyungJoo Ham <myungjoo.ham@samsung.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) Description
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) The NTC (Negative Temperature Coefficient) thermistor is a simple thermistor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) that requires users to provide the resistance and lookup the corresponding
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) compensation table to get the temperature input.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) The NTC driver provides lookup tables with a linear approximation function
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) and four circuit models with an option not to use any of the four models.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) Using the following convention::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41)    $	resistor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)    [TH]	the thermistor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) The four circuit models provided are:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 1. connect = NTC_CONNECTED_POSITIVE, pullup_ohm > 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)      [pullup_uV]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	 |    |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	[TH]  $ (pullup_ohm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	 |    |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	 +----+-----------------------[read_uV]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 	 $ (pulldown_ohm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	-+- (ground)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 2. connect = NTC_CONNECTED_POSITIVE, pullup_ohm = 0 (not-connected)::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)      [pullup_uV]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 	[TH]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) 	 +----------------------------[read_uV]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	 $ (pulldown_ohm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	-+- (ground)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 3. connect = NTC_CONNECTED_GROUND, pulldown_ohm > 0::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)      [pullup_uV]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	 $ (pullup_ohm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	 +----+-----------------------[read_uV]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	 |    |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 	[TH]  $ (pulldown_ohm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	 |    |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	-+----+- (ground)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 4. connect = NTC_CONNECTED_GROUND, pulldown_ohm = 0 (not-connected)::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84)      [pullup_uV]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 	 $ (pullup_ohm)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	 +----------------------------[read_uV]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	[TH]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 	 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) 	-+- (ground)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) When one of the four circuit models is used, read_uV, pullup_uV, pullup_ohm,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) pulldown_ohm, and connect should be provided. When none of the four models
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) are suitable or the user can get the resistance directly, the user should
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) provide read_ohm and _not_ provide the others.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) Sysfs Interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) ---------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) =============== == =============================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) name		   the mandatory global attribute, the thermistor name.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) =============== == =============================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) temp1_type	RO always 4 (thermistor)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) temp1_input	RO measure the temperature and provide the measured value.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 		   (reading this file initiates the reading procedure.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) =============== == =============================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) Note that each NTC thermistor has only _one_ thermistor; thus, only temp1 exists.