|
46 | 46 | ODROID_C2 = "ODROID_C2"
|
47 | 47 |
|
48 | 48 | FTDI_FT232H = "FT232H"
|
49 |
| -# XXX: naming |
50 |
| -_96BOARDS = "96BOARDS" |
| 49 | +LINARO_96BOARDS = "LINARO_96BOARDS" |
51 | 50 | # pylint: enable=bad-whitespace
|
52 | 51 |
|
53 | 52 | _RASPBERRY_PI_40_PIN_IDS = (
|
@@ -255,8 +254,10 @@ def id(self):
|
255 | 254 | board_id = ODROID_C2
|
256 | 255 | elif chip_id == ap_chip.FT232H:
|
257 | 256 | board_id = FTDI_FT232H
|
258 |
| - else: |
259 |
| - board_id = self._is_96boards() |
| 257 | + # TODO do we want to check chip ID at all for 96Boards? |
| 258 | + # elif chip_id == APQ8016: |
| 259 | + elif self.any_96boards: |
| 260 | + board_id = LINARO_96BOARDS |
260 | 261 |
|
261 | 262 | return board_id
|
262 | 263 | # pylint: enable=invalid-name
|
@@ -303,18 +304,22 @@ def _beaglebone_id(self):
|
303 | 304 | return None
|
304 | 305 | # pylint: enable=no-self-use
|
305 | 306 |
|
306 |
| - def _is_96Boards(self): |
307 |
| - if self.detector.get_dt_compatible_field("qcom,apq8016-sbc") or self.detector.get_dt_compatible_field("hisilicon,hi3660-hikey960") or self.detector.get_dt_compatible_field("hisilicon,hi6220-hikey"): |
308 |
| - return _96BOARDS |
309 |
| - return None |
310 |
| - |
311 | 307 | def _armbian_id(self):
|
312 |
| - """Check whether the current board is an OrangePi PC.""" |
| 308 | + """Find a board id for an OrangePi PC.""" |
313 | 309 | board_value = self.detector.get_armbian_release_field('BOARD')
|
314 | 310 | if board_value == "orangepipc":
|
315 | 311 | return ORANGE_PI_PC
|
316 | 312 | return None
|
317 | 313 |
|
| 314 | + @property |
| 315 | + def any_96boards(self): |
| 316 | + """Check if the current board is any 96Boards-family board.""" |
| 317 | + return ( |
| 318 | + self.detector.check_dt_compatible_value("qcom,apq8016-sbc") |
| 319 | + or self.detector.check_dt_compatible_value("hisilicon,hi3660-hikey960") |
| 320 | + or self.detector.check_dt_compatible_value("hisilicon,hi6220-hikey") |
| 321 | + ) |
| 322 | + |
318 | 323 | @property
|
319 | 324 | def any_raspberry_pi(self):
|
320 | 325 | """Check whether the current board is any Raspberry Pi."""
|
|
0 commit comments