[driver] add a example of switch

add sysfs support