find_ec_sensor_index
int sidx = find_ec_sensor_index(state, type, channel);
int sensor_index = find_ec_sensor_index(state, type, channel);
return find_ec_sensor_index(state, type, channel) >= 0 ? S_IRUGO : 0;