Commit 3f0f867
Linus Walleij
gpiolib: let gpiochip_add_pin_range() specify offset
Like with commit 3c739ad
it is not always enough to specify all the pins of a gpio_chip
from offset zero to be added to a pin map range, since the
mapping from GPIO to pin controller may not be linear at all,
but need to be broken into a few consecutive sub-ranges or
1-pin entries for complicated cases. The ranges may also be
sparse.
This alters the signature of the function to accept offsets
into both the GPIO-chip local pinspace and the pin controller
local pinspace.
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>1 parent 5212d09 commit 3f0f867
4 files changed
Lines changed: 47 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
241 | 252 | | |
242 | 253 | | |
| 254 | + | |
243 | 255 | | |
244 | 256 | | |
245 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1187 | 1187 | | |
1188 | 1188 | | |
1189 | 1189 | | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
1190 | 1199 | | |
1191 | | - | |
| 1200 | + | |
| 1201 | + | |
1192 | 1202 | | |
1193 | 1203 | | |
1194 | 1204 | | |
1195 | | - | |
| 1205 | + | |
1196 | 1206 | | |
1197 | 1207 | | |
1198 | 1208 | | |
1199 | 1209 | | |
1200 | 1210 | | |
1201 | 1211 | | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
1202 | 1215 | | |
1203 | | - | |
| 1216 | + | |
1204 | 1217 | | |
1205 | 1218 | | |
1206 | 1219 | | |
1207 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
1208 | 1229 | | |
1209 | 1230 | | |
1210 | 1231 | | |
1211 | 1232 | | |
1212 | 1233 | | |
1213 | 1234 | | |
1214 | 1235 | | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1215 | 1240 | | |
1216 | 1241 | | |
1217 | 1242 | | |
| |||
1220 | 1245 | | |
1221 | 1246 | | |
1222 | 1247 | | |
| 1248 | + | |
1223 | 1249 | | |
1224 | 1250 | | |
1225 | 1251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
| 287 | + | |
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
293 | | - | |
| 294 | + | |
| 295 | + | |
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
| 236 | + | |
| 237 | + | |
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
| |||
0 commit comments