- graphics tablet digitisers generally are not and don't include touch digitisers
- tablets are not touch screens
- a stylus (tip) isn't a button
- a stylus can have buttons
By convention, stylus tip interactions are "tools", which seems to be what Linux' BTN_TOOL_* codes are meant to mean. A button on a stylus should never be (directly) translated to a tool -- like how the ~5th button on a mouse is `BTN_EXTRA`, not `BTN_MOUSE`. In this particular case it looks like the thinking is: the device has 2 event codes (which we know as the stylus tip and the barrel button) and it's a stylus^wdigitiser, so map device[0] to `BTN_DIGI` and device[1] to `BTN_DIGI + 1`.
editendum: the thing about the BTN_EXTRA doesn't really map... The "digitiser" event codes are being treated in the same way as mouse event codes (device[i] => event[CLASS + i]). The issue is really that the barrel buttons have no (dedicated) event codes.