Commit 8799dbf
leds: turris-omnia: Do not use SMBUS calls
[ Upstream commit 6de283b ]
The leds-turris-omnia driver uses three function for I2C access:
- i2c_smbus_write_byte_data() and i2c_smbus_read_byte_data(), which
cause an emulated SMBUS transfer,
- i2c_master_send(), which causes an ordinary I2C transfer.
The Turris Omnia MCU LED controller is not semantically SMBUS, it
operates as a simple I2C bus. It does not implement any of the SMBUS
specific features, like PEC, or procedure calls, or anything. Moreover
the I2C controller driver also does not implement SMBUS, and so the
emulated SMBUS procedure from drivers/i2c/i2c-core-smbus.c is used for
the SMBUS calls, which gives an unnecessary overhead.
When I first wrote the driver, I was unaware of these facts, and I
simply used the first function that worked.
Drop the I2C SMBUS calls and instead use simple I2C transfers.
Fixes: 089381b ("leds: initial support for Turris Omnia LEDs")
Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20230918161104.20860-2-kabel@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 1815d40 commit 8799dbf
1 file changed
Lines changed: 42 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
44 | 75 | | |
45 | 76 | | |
46 | 77 | | |
| |||
64 | 95 | | |
65 | 96 | | |
66 | 97 | | |
67 | | - | |
| 98 | + | |
68 | 99 | | |
69 | 100 | | |
70 | 101 | | |
| |||
114 | 145 | | |
115 | 146 | | |
116 | 147 | | |
117 | | - | |
118 | | - | |
119 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
120 | 151 | | |
121 | 152 | | |
122 | 153 | | |
123 | 154 | | |
124 | 155 | | |
125 | 156 | | |
126 | 157 | | |
127 | | - | |
128 | | - | |
| 158 | + | |
| 159 | + | |
129 | 160 | | |
130 | 161 | | |
131 | 162 | | |
| |||
158 | 189 | | |
159 | 190 | | |
160 | 191 | | |
161 | | - | |
| 192 | + | |
162 | 193 | | |
163 | 194 | | |
164 | 195 | | |
| |||
179 | 210 | | |
180 | 211 | | |
181 | 212 | | |
182 | | - | |
183 | | - | |
| 213 | + | |
184 | 214 | | |
185 | 215 | | |
186 | 216 | | |
| |||
237 | 267 | | |
238 | 268 | | |
239 | 269 | | |
240 | | - | |
241 | | - | |
| 270 | + | |
| 271 | + | |
242 | 272 | | |
243 | 273 | | |
244 | 274 | | |
| |||
0 commit comments