Well, I tried that but I am not sure that it is a good idea. I "hacked" it so that only positive values are passed into the kernel API. This is what happened:
jstest /dev/input/js0 shows a range of 268 to 32768 (instead of -32k to +32k.)
evtest /dev/input/event10 shows ranges from 128 to 255 (instead of 0 to 255)
So I don't get 0 still. Might be a problem.
ES can be correctly configured on device configuration with the analog triggers.
But still for example Crazy Taxi on Dreamcast can't be correctly played with analog triggers. In fact, patching the value range didn't have an effect at all. When you accelerate using right trigger you only reach like 15 km/h :)
I assume something like this: all the analog axis are signed 16 bit values ranging from -32k to +32k. The analog trigger is just 8 bit from 0 to 255. So I think that libretro also expects the 16 bit input range. But when the controller only delivers 8 bit you won't be able to trigger the full value range (only get values of a maximum of 255 instead of 32k).
I think they tried a fix here already:
https://github.com/libretro/beetle-psx-libretro/issues/40#issuecomment-252248501