Merge "diag: Validate peripheral received from user for switch logging"