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