hal: microchip: pic32c: add the two SPI aliases the JH pack lacks #74
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 323 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.346
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #74"
general
weight: 0.35
Madhan-Kurukondar
The SPI driver's four SERCOM_SPIM_ references only compile on packs that spell that prefix; making the driver use the generic SERCOM_SPI_ names (the Zephyr side of this pair) needs three aliases the JH pack never defined.
Two names missing from forty
sercom_pic32cm_jh.hmaps the genericSERCOM_SPI_names onto this pack'sSERCOM_SPIM_ones - some forty definitions - and two of them are absent:CTRLA_SWRSTandSYNCBUSY_SWRST.Nothing noticed, because
spi_mchp_sercom_g1.creached past the mapping andused the
SPIMspelling directly in exactly those places. That direct use iswhat stops the driver building on PIC32CM SG/GC, which has one
SPIblockand no
SPIMprefix at all.The third name is deliberately not here
The driver's fourth direct use is
SERCOM_SPIM_CTRLC_ICSPACE, and this packhas no
SPIMCTRLCregister at all - aliasing it would point a definitionat a name that does not exist. It is also unreachable:
SPI_MCHP_INTER_CHARACTER_SPACEisdepends on, so on a JH build the symbol is not inSOC_FAMILY_MICROCHIP_SAM_D5X_E5X
autoconf.hand the#ifdefaround that line is false. That name belongsin
sercom-d5x-e5x-spi-aliases, where the register and the Kconfig bothexist.
Scope
Two lines, of the same one-line form as the forty already in the file. No
pack header other than this one is touched, and nothing that compiles today
changes meaning.
Testing
With this branch applied to the workspace's
hal/microchipmodule, and theZephyr change that moves the driver onto the generic names,
samples/hello_worldwithCONFIG_SPI=ycompilesspi_mchp_sercom_g1.cfor
pic32cm_jh01_cpro.CONFIG_SPI_MCHP_INTER_CHARACTER_SPACE=1is not part of that build andcannot be: the symbol's
depends onexcludes this family, so passing it onthe command line is dropped and it never reaches
autoconf.h. An earlierrecord of this rung claimed otherwise; the
CTRLCline is compiled onsam_e54_xpro, undersercom-d5x-e5x-spi-aliases, and nowhere else.Verification
Built in a west workspace at Zephyr
mainwith this module substituted in.This is the JH half of
zephyrproject-rtos/zephyr'sspi-mchp-sercom-g1-generic-names. The Zephyr change stands on its own forSG/GC, whose pack defines these three names natively in
component/sercom.hand never includes this header - measured on the GC00build, whose dependency graph names
sercom_pic32cm_sg_gc.hand notsercom_pic32cm_jh.h. Without these six lines it is the JH build that stopscompiling, so the two must land together to keep JH working.