1
我有問題,我註冊IIO事件的上升和下降閾值。 我可以在事件子文件夾中看到sysfs文件並可以讀取它們,但是當我嘗試寫入新閾值時,它會顯示「權限被拒絕」。Linux Kernel IIO事件sysfs文件只可讀
以下設置:
static const struct iio_event_spec as6200_events[] = {
{
.type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_RISING,
.mask_separate = BIT(IIO_EV_INFO_VALUE),
}, {
.type = IIO_EV_TYPE_THRESH,
.dir = IIO_EV_DIR_FALLING,
.mask_separate = BIT(IIO_EV_INFO_VALUE),
}
};
static const struct iio_chan_spec as6200_channels[] = {
{
.type = IIO_TEMP,
.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
BIT(IIO_CHAN_INFO_PROCESSED) |
BIT(IIO_CHAN_INFO_SCALE),
.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SAMP_FREQ),
.event_spec = as6200_events,
.num_event_specs = ARRAY_SIZE(as6200_events),
}
};
發現:當我改變了in_temp_thresh_rising_value文件的權限,它的工作原理通過sudo 666。但爲什麼它不是通過IIO子系統創建的這種權限? – lobi