I found only ttyS0, ttyUSB0 can be recognized as serial-port in gadget snap. If I have a ttyGPS0 which used for GPS or ttyCOM0, they can not be recognized as serial-port. And other snaps can access these ports, without any access control.
well, what hardware is it you are talking about ? how do you normally enable the attched device, do you see an entry in /dev when it gets attached (vs booting without it attached) ?
the kernel might not use the same device names you are used to …
Sorry, let me clarify. ttyGPS or ttyCOM0 is symbolic link to ttyS*, there are so many ttyS* in /dev, so other developers can find the right serial-port throuth symbolic link.